Partager via


MonikerKey Class

Represents the key of a Moniker.

Inheritance Hierarchy

System.Object
  Microsoft.VisualStudio.Modeling.MonikerKey

Namespace:  Microsoft.VisualStudio.Modeling
Assembly:  Microsoft.VisualStudio.Modeling.Sdk.10.0 (in Microsoft.VisualStudio.Modeling.Sdk.10.0.dll)

Syntax

'Déclaration
<SerializableAttribute> _
Public NotInheritable Class MonikerKey _
    Implements IComparable(Of MonikerKey)
[SerializableAttribute]
public sealed class MonikerKey : IComparable<MonikerKey>
[SerializableAttribute]
public ref class MonikerKey sealed : IComparable<MonikerKey^>
[<Sealed>]
[<SerializableAttribute>]
type MonikerKey =  
    class
        interface IComparable<MonikerKey>
    end
public final class MonikerKey implements IComparable<MonikerKey>

The MonikerKey type exposes the following members.

Constructors

  Name Description
Public method MonikerKey Initializes a new instance of MonikerKey with the specified GUID and store.

Top

Properties

  Name Description
Public property DomainClassId Gets the GUID of the domain class associated with this MonikerKey.
Public property DomainRelationshipId Gets the GUID of the domain relationship associated with this MonikerKey.
Public property MonikerName Gets the name of the MonikerKey used to resolve the moniker.

Top

Methods

  Name Description
Public method CompareTo Compares one MonikerKey to another one.
Public method 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. (Overrides Object.Equals(Object).)
Public method Equals(MonikerKey) Returns whether or not two MonikerKey objects are identical.
Protected method Finalize Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public method GetHashCode Generates HashCode based on all 3 equality comparisons 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. (Overrides Object.GetHashCode().)
Public method GetType Gets the Type of the current instance. (Inherited from Object.)
Protected method MemberwiseClone Creates a shallow copy of the current Object. (Inherited from Object.)
Public method ToString Returns a string that represents the current object. (Inherited from Object.)

Top

Operators

  Name Description
Public operatorStatic member Equality Compares two MonikerKeys based upon their ID to determine if they are equal. Overriding operator == to satisfy CA1036:OverrideMethodsOnComparableTypes
Public operatorStatic member GreaterThan Compares two MonikerKeys based upon their ID to determine if monikerKey1's ID is greater than monikerKey2. Overriding operator > to satisfy CA1036:OverrideMethodsOnComparableTypes
Public operatorStatic member Inequality Compares two MonikerKeys based upon their ID to determine if they are unequal. Overriding operator != to satisfy CA1036:OverrideMethodsOnComparableTypes
Public operatorStatic member LessThan

Top

Thread Safety

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

See Also

Reference

Microsoft.VisualStudio.Modeling Namespace