Click or drag to resize
UriTemplateMatch Method (Uri, ICollectionString, ICollectionString)
This API is preliminary and subject to change.
Attempts to match a Uri to a UriTemplate.

Namespace: TunnelVisionLabs.Net
Assembly: TunnelVisionLabs.Net.UriTemplate (in TunnelVisionLabs.Net.UriTemplate.dll) Version: 1.0.0-beta004
Syntax
public UriTemplateMatch Match(
	Uri candidate,
	ICollection<string> arrayVariables,
	ICollection<string> mapVariables
)

Parameters

candidate
Type: SystemUri
The Uri to match against the template.
arrayVariables
Type: System.Collections.GenericICollectionString
A collection of variables to treat as associative arrays when matching a candidate URI to the template. Associative arrays are returned as instances of IListT whose values are of type String. The default value is an empty collection.
mapVariables
Type: System.Collections.GenericICollectionString
A collection of variables to treat as associative maps when matching a candidate URI to the template. Associative maps are returned as instances of IDictionaryTKey, TValue whose keys and values are of type String. The default value is an empty collection.

Return Value

Type: UriTemplateMatch
A UriTemplateMatch object containing the results of the match operation, or if the match failed.
Exceptions
ExceptionCondition
ArgumentNullException

If candidate is .

-or-

If arrayVariables is .

-or-

If mapVariables is .

ArgumentException

If arrayVariables contains a or empty value.

-or-

If mapVariables contains a or empty value.

Remarks

For detailed information about the behavior of this method, see the remarks in the documentation for the Match Overload methods.

Version Information

.NET Framework

Supported in: 2.0

Portable Class Library

Supported in: Portable Class Library (Legacy)

URI Template Library

Supported in: 1.0
See Also