Partilhar via


ModelBusReference Class

Encapsulates a reference to a model. The following variants are supported: reference to a model; reference to an element in a model; reference to a model and a view of that model; reference to an element in a model with a view.

Inheritance Hierarchy

System.Object
  Microsoft.VisualStudio.Modeling.Integration.ModelBusReference

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

Syntax

'Declaração
Public Class ModelBusReference _
    Implements IEquatable(Of ModelBusReference)
public class ModelBusReference : IEquatable<ModelBusReference>
public ref class ModelBusReference : IEquatable<ModelBusReference^>
type ModelBusReference =  
    class
        interface IEquatable<ModelBusReference>
    end
public class ModelBusReference implements IEquatable<ModelBusReference>

The ModelBusReference type exposes the following members.

Constructors

  Name Description
Public method ModelBusReference(String, String, String) Constructor
Public method ModelBusReference(String, String, String, ReferenceContext) Constructor
Public method ModelBusReference(String, String, String, String) Constructor
Public method ModelBusReference(IModelBus, String, String, ModelBusAdapterReference) Constructor
Public method ModelBusReference(IModelBus, String, String, String) Constructor
Public method ModelBusReference(String, String, String, String, ReferenceContext) Constructor
Public method ModelBusReference(IModelBus, String, String, ModelBusAdapterReference, ReferenceContext) Constructor
Public method ModelBusReference(IModelBus, String, String, String, ModelBusAdapterReference) Constructor
Public method ModelBusReference(IModelBus, String, String, String, ReferenceContext) Constructor
Public method ModelBusReference(IModelBus, String, String, String, String) Constructor
Public method ModelBusReference(IModelBus, String, String, String, ModelBusAdapterReference, ReferenceContext) Constructor
Public method ModelBusReference(IModelBus, String, String, String, String, ReferenceContext) Constructor

Top

Properties

  Name Description
Public property AdapterReference Returns the adapter reference contained in the model bus reference, or null if the adapter manager required to deserialize the adapter reference is not registered with the modelbus, or if this model bus reference does not have a ModelBus.
Public property ElementDisplayName User-friendly model display name
Public property IsAdapterReferenceResolved Returns whether the adapter reference has been deserialized or not.
Public property LastStatus The last know reference status. The reference status is unknown until we tried to create an adpapter for the reference - in case of success the state will be valid, other wise invalid
Public property LogicalAdapterId Logical Adapter Id of the ModelBusAdapter that enables access to the model, element or view referenced by this ModelBus Reference.
Public property ModelBus
Public property ModelDisplayName User-friendly model display name
Public property ReferenceContext ReferenceContext object for this reference
Public property SerializedAdapterReference Serialized form of the adapter reference

Top

Methods

  Name Description
Public methodStatic member Deserialize(String, ReferenceContext) Deserializes the serializedReference and returns a new instance of ModelBusReference
Public methodStatic member Deserialize(String, IModelBus, ReferenceContext) Deserializes the serializedReference and returns a new instance of ModelBusReference
Public method Equals(Object) Compares this reference to another object. (Overrides Object.Equals(Object).)
Public method Equals(ModelBusReference) Overrides equality for ModelBusReferences
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 Gets the hash code of this reference instance. If two instances compare equal, they should give the same hash code. (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 methodStatic member Serialize Returns the supplied reference serialized as a string
Public method ToString Returns a string that represents the current object. (Inherited from Object.)

Top

Operators

  Name Description
Public operatorStatic member Equality Compares two ModelBusReference instances for equality.
Public operatorStatic member Inequality Compares two ModelBusReferences instances for inequality.

Top

Extension Methods

  Name Description
Public Extension Method GetDisplayName Extension method that returns the calculated display name (Defined by ModelBusReferenceExtensionMethods.)
Public Extension Method IsValidModelReference Extension method that returns whether the model-part of the reference is valid (Defined by ModelBusReferenceExtensionMethods.)
Public Extension Method IsValidReference Extension method that returns whether the whole reference is valid (Defined by ModelBusReferenceExtensionMethods.)

Top

Remarks

The exact interpretation of a ModelBusReference depends on the derived class of ModelBusAdapter that you use to wrap the model.

For more information, see Integrating Models by using Visual Studio Modelbus.

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.Integration Namespace