UriTemplateMatch Method (Uri, ICollectionString, ICollectionString, ICollectionString) |
This API is preliminary and subject to change.
Namespace: TunnelVisionLabs.NetAssembly: TunnelVisionLabs.Net.UriTemplate (in TunnelVisionLabs.Net.UriTemplate.dll) Version: 1.0.0-beta004
Syntax public UriTemplateMatch Match(
Uri candidate,
ICollection<string> requiredVariables,
ICollection<string> arrayVariables,
ICollection<string> mapVariables
)
Public Function Match (
candidate As Uri,
requiredVariables As ICollection(Of String),
arrayVariables As ICollection(Of String),
mapVariables As ICollection(Of String)
) As UriTemplateMatch
public:
UriTemplateMatch^ Match(
Uri^ candidate,
ICollection<String^>^ requiredVariables,
ICollection<String^>^ arrayVariables,
ICollection<String^>^ mapVariables
)
member Match :
candidate : Uri *
requiredVariables : ICollection<string> *
arrayVariables : ICollection<string> *
mapVariables : ICollection<string> -> UriTemplateMatch
Parameters
- candidate
- Type: SystemUri
The Uri to match against the template. - requiredVariables
- Type: System.Collections.GenericICollectionString
A collection of variables which must be provided during the expansion process for the resulting URI to be valid. The default value is an empty collection. - 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:
UriTemplateMatchA
UriTemplateMatch object containing the results of the match operation, or
if the match failed.
Exceptions Exception | Condition |
---|
ArgumentNullException | If candidate is . -or- If requiredVariables is . -or- If arrayVariables is . -or- If mapVariables is . |
ArgumentException | If requiredVariables contains a or empty value. -or- 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