Class ContentReferenceComparer
Compares ContentReference instances.
Inheritance
Implements
Inherited Members
Namespace: EPiServer.Core
Assembly: EPiServer.dll
Version: 7.19.2Syntax
public abstract class ContentReferenceComparer : IEqualityComparer<ContentReference>, IComparer<ContentReference>
Constructors
ContentReferenceComparer()
Declaration
protected ContentReferenceComparer()
Fields
IgnoreVersion
Comparer that compares all fields of the ContentReference instances but ignores the version information provided by WorkID.
Declaration
public static readonly ContentReferenceComparer IgnoreVersion
Field Value
Type | Description |
---|---|
ContentReferenceComparer |
Standard
Comparer that compares all fields of the ContentReference instances.
Declaration
public static readonly ContentReferenceComparer Standard
Field Value
Type | Description |
---|---|
ContentReferenceComparer |
Methods
Compare(ContentReference, ContentReference)
Compares two ContentReference objects and returns a value indicating whether one is less than, equal to, or greater than the other.
Declaration
public abstract int Compare(ContentReference x, ContentReference y)
Parameters
Type | Name | Description |
---|---|---|
ContentReference | x | The first ContentReference to compare. |
ContentReference | y | The second ContentReference to compare. |
Returns
Type | Description |
---|---|
System.Int32 | A signed integer that indicates the relative values of |
Equals(ContentReference, ContentReference)
Determines whether the two specified ContentReference objects are considered equal.
Declaration
public abstract bool Equals(ContentReference x, ContentReference y)
Parameters
Type | Name | Description |
---|---|---|
ContentReference | x | The first ContentReference to compare. |
ContentReference | y | The second ContentReference to compare. |
Returns
Type | Description |
---|---|
System.Boolean | true if the specified ContentReference objects are equal; otherwise, false. |
GetHashCode(ContentReference)
Returns a hash code for the specified ContentReference instance.
Declaration
public abstract int GetHashCode(ContentReference obj)
Parameters
Type | Name | Description |
---|---|---|
ContentReference | obj | The ContentReference to get the hash code for. |
Returns
Type | Description |
---|---|
System.Int32 | A hash code for the provided ContentReference instance, suitable for use in hashing algorithms and data structures like a hash table. |