Moniker Class
Contains an expression used to map to its element.
Inheritance Hierarchy
System.Object
Microsoft.VisualStudio.Modeling.Moniker
Namespace: Microsoft.VisualStudio.Modeling
Assembly: Microsoft.VisualStudio.Modeling.Sdk.12.0 (in Microsoft.VisualStudio.Modeling.Sdk.12.0.dll)
Syntax
'Declaration
<SerializableAttribute> _
Public NotInheritable Class Moniker _
Implements IComparable(Of Moniker)
[SerializableAttribute]
public sealed class Moniker : IComparable<Moniker>
[SerializableAttribute]
public ref class Moniker sealed : IComparable<Moniker^>
[<Sealed>]
[<SerializableAttribute>]
type Moniker =
class
interface IComparable<Moniker>
end
public final class Moniker implements IComparable<Moniker>
The Moniker type exposes the following members.
Constructors
Name | Description | |
---|---|---|
Moniker(MonikerKey, Store) | Constructor | |
Moniker(String, Guid, Guid, Store) | Constructor |
Top
Properties
Name | Description | |
---|---|---|
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. |
Top
Methods
Name | Description | |
---|---|---|
CompareTo | 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(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. (Overrides Object.Equals(Object).) | |
Equals(Moniker) | Compares two Monikers based upon their ID to determine if they are equal | |
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. (Overrides Object.GetHashCode().) | |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
Resurrect | Resurrect this moniker. | |
ToString | Returns a string that represents the current object. (Inherited from Object.) |
Top
Operators
Name | Description | |
---|---|---|
Equality | Compares two Monikers based upon their ID to determine if they are equal. Overriding operator == to satisfy CA1036:OverrideMethodsOnComparableTypes | |
GreaterThan | Compares two Monikers based upon their ID to determine if moniker1's ID is greater than moniker2. Overriding operator > to satisfy CA1036:OverrideMethodsOnComparableTypes | |
Inequality | Compares two Monikers based upon their ID to determine if they are unequal. Overriding operator != to satisfy CA1036:OverrideMethodsOnComparableTypes | |
LessThan |
Top
Remarks
The MonikerName property value must be unique and represent only one element.
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.