Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

UriTemplateTable.MakeReadOnly Method

Makes the UriTemplateTable read only.

Namespace:  System
Assembly:  System.ServiceModel (in System.ServiceModel.dll)
public void MakeReadOnly(
	bool allowDuplicateEquivalentUriTemplates
)

Parameters

allowDuplicateEquivalentUriTemplates
Type: System.Boolean
Specifies whether to allow duplicate equivalent UriTemplate instances in the UriTemplateTable.

When the MakeReadOnly(Boolean) method is called, one of the following types of validation occurs:

  • When MakeReadOnly(Boolean) is called passing in false, the UriTemplateTable checks to make sure the table contains no multiple structurally-equivalent templates. If it finds such templates, an exception is thrown. This type of validation is used in conjunction with MatchSingle(Uri) when you want to ensure only one template matches an incoming URI.

  • When MakeReadOnly(Boolean) is called passing in true, multiple structurally-equivalent templates can be contained within a UriTemplateTable. However, any query strings in the templates must not be ambiguous; identical query strings are allowed. This type of validation is used in conjunction with Match(Uri) when multiple template matches are allowed on the candidate URI.

Only the first call to MakeReadOnly(Boolean) is honored, subsequent calls are ignored without any exception being thrown.

.NET Framework

Supported in: 4, 3.5

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.