Export (0) Print
Expand All

UriTemplateEquivalenceComparer Class

A class used to compare UriTemplate instances for structural (instead of reference) equivalence.

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

public class UriTemplateEquivalenceComparer : IEqualityComparer<UriTemplate>

UriTemplate instances are compared using reference equality by default. The UriTemplateEquivalenceComparer class evaluates equivalence using IsEquivalentTo(UriTemplate) instead of the default reference equality check. This class is useful when you wish to compare two UriTemplate instances based on the URIs they match instead of strict reference equality.

The following example shows the difference between reference equality and structural equality. It also shows how to use the UriTemplateEquivalenceComparer as a comparer in a dictionary.

System.Object
  System.UriTemplateEquivalenceComparer

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

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

Community Additions

ADD
Show:
© 2014 Microsoft