This documentation is archived and is not being maintained.

UriTemplateTable.Match Method

Attempts to match a candidate Uri to the UriTemplateTable.

Namespace:  System
Assembly:  System.ServiceModel.Web (in System.ServiceModel.Web.dll)

public Collection<UriTemplateMatch> Match(
	Uri uri
)

Parameters

uri
Type: System.Uri

The candidate URI.

This method may return multiple matches.

The following example shows how to call the Match(Uri) method.

Dim results As Collection(Of UriTemplateMatch) = Nothing 
Dim weatherInSeattle As Uri = New Uri("http://localhost/weather/Washington/Seattle")

results = table.Match(weatherInSeattle)
If results IsNot Nothing Then
    Console.WriteLine("Matching templates:")
    For Each match As UriTemplateMatch In results
        Console.WriteLine("    0}", match.Template)
    Next 
End If

Windows 7, Windows Vista, Windows XP SP2, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

.NET Framework

Supported in: 3.5
Show: