Udostępnij za pośrednictwem


Moniker Class

Definition

Moniker contains an expression used to map to its element. The MonikerName must be unique and represent only one element.

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

Constructors

Moniker(MonikerKey, Store)

Constructor

Moniker(String, Guid, Guid, Store)

Constructor

Properties

Column

Even though a Moniker is a concept in the model that doesn't tie to a physical location in serialized format, it is usually used in serialization/deserialization. The location of the moniker in the serialized format can greatly help analyze problems with unresolved monikers, so we store the column number of where the moniker is stored in serialized format.

DomainClassInfo

The DomainClassInfo of the DomainClass that this moniker should resolve to.

DomainModelFullName

The name of the DomainModel that the element represented by this Moniker resides in. This is used to find the MonikerResolver.

DomainRelationshipInfo

The DomainRelationshipInfo this moniker participates in

Id

The Id of this Moniker.

Key

The key of the Moniker

Line

Even though a Moniker is a concept in the model that doesn't tie to a physical location in serialized format, it is usually used in serialization/deserialization. The location of the moniker in the serialized format can greatly help analyze problems with unresolved monikers, so we store the line number of where the moniker is stored in serialized format.

Link

Gets or sets the link which contains role player for this moniker.

Location

Even though a Moniker is a concept in the model that doesn't tie to a physical location in serialized format, it is usually used in serialization/deserialization. The location of the moniker in the serialized format can greatly help analyze problems with unresolved monikers, so we store the location of where the moniker is stored in serialized format. The location is optional, and can be null if not available (e.g. Moniker created in memory).

ModelElement

The model element the moniker resolves to.

MonikerName

The name of the Moniker

Resolved

Set/Get moniker resolve state

Store

The Store that the Moniker is created within.

Methods

CompareTo(Moniker)

Compares two Monikers based upon their Id

ConnectElement()

Connects the element represented by this moniker to the element link

Delete()

Remove the moniker

DeleteLink()

Disconnect the moniker's resolved element from the element link, and delete the link

DisconnectElement()

Disconnects the element represented by this moniker to the element link

Equals(Moniker)

Compares two Monikers based upon their ID to determine if they are equal

Equals(Object)

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

GetHashCode()

Uses the ID to generate the HashCode so that 2 Moniker's with the same ID's will return the same HashCode. Omitting this violates rule: OverrideGetHashCodeOnOverridingEquals.

Resurrect()

Resurrect this moniker.

Operators

Equality(Moniker, Moniker)

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

GreaterThan(Moniker, Moniker)

Compares two Monikers based upon their ID to determine if moniker1's ID is greater than moniker2. Overriding operator > to satisfy CA1036:OverrideMethodsOnComparableTypes

Inequality(Moniker, Moniker)

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

LessThan(Moniker, Moniker)

Applies to