다음을 통해 공유


MonikerKey Class

Definition

MonikerKey is a class representing the key of a moniker.

public ref class MonikerKey sealed : IComparable<Microsoft::VisualStudio::Modeling::MonikerKey ^>
[System.Serializable]
public sealed class MonikerKey : IComparable<Microsoft.VisualStudio.Modeling.MonikerKey>
[<System.Serializable>]
type MonikerKey = class
    interface IComparable<MonikerKey>
Public NotInheritable Class MonikerKey
Implements IComparable(Of MonikerKey)
Inheritance
MonikerKey
Attributes
Implements

Constructors

MonikerKey(String, Guid, Guid, Store)

Constructor

Properties

DomainClassId

The DomainClassId of the element that this Moniker will resolve to.

DomainRelationshipId

The DomainClassId of the relationship this Moniker participates in.

MonikerName

The name of the Moniker

Methods

CompareTo(MonikerKey)

Compares two MonikerKeys

Equals(MonikerKey)

Compares two MonikerKeys

Equals(Object)

Compares this MonikerKey instance to the object passed as parameter. If the object is another MonikerKey, it compares them based upon their Name and ID to determine if they are equal. Omitting Equals violates rule: OverrideMethodsOnComparableTypes.

GetHashCode()

Generates HashCode based on all 3 equality comparison's performed by CompareTo() For a MonikerKey that will return true for CompareTo, the GetHashCode will match value returned by this.GetHashCode Omitting this violates rule: OverrideGetHashCodeOnOverridingEquals.

Operators

Equality(MonikerKey, MonikerKey)

Compares two MonikerKeys based upon their ID to determine if they are equal. Overriding operator == to satisfy CA1036:OverrideMethodsOnComparableTypes

GreaterThan(MonikerKey, MonikerKey)

Compares two MonikerKeys based upon their ID to determine if monikerKey1's ID is greater than monikerKey2. Overriding operator > to satisfy CA1036:OverrideMethodsOnComparableTypes

Inequality(MonikerKey, MonikerKey)

Compares two MonikerKeys based upon their ID to determine if they are unequal. Overriding operator != to satisfy CA1036:OverrideMethodsOnComparableTypes

LessThan(MonikerKey, MonikerKey)

Applies to