Class ContentReferenceComparer
Provides ContentReference equality and comparer instances.
Inheritance
Implements
Inherited Members
Namespace: EPiServer.Core
Assembly: EPiServer.dll
Version: 8.11.0Syntax
public abstract class ContentReferenceComparer : IEqualityComparer<ContentReference>, IComparer<ContentReference>
Constructors
ContentReferenceComparer()
Declaration
protected ContentReferenceComparer()
Fields
Complete
Comparer that compares all fields of two ContentReference instances.
Declaration
public static readonly ContentReferenceComparer Complete
Field Value
Type | Description |
---|---|
ContentReferenceComparer |
Default
Comparer that compares the identity, version and provider of two ContentReference instances.
Declaration
public static readonly ContentReferenceComparer Default
Field Value
Type | Description |
---|---|
ContentReferenceComparer |
IgnoreVersion
Comparer that compares the identity and provider of two 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 two ContentReference instances.
Declaration
[Obsolete("Renamed to Complete.")]
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. |