Share via


ModelingAdapter Class

Wraps a domain-specific language model. Derive from this class to create an adapter for your DSL.

Inheritance Hierarchy

System.Object
  Microsoft.VisualStudio.Modeling.Integration.ModelBusAdapter
    Microsoft.VisualStudio.Modeling.Integration.ModelingAdapter
      Microsoft.VisualStudio.Modeling.Integration.StandardModelingAdapter

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

Syntax

'Declaration
Public MustInherit Class ModelingAdapter _
    Inherits ModelBusAdapter
public abstract class ModelingAdapter : ModelBusAdapter
public ref class ModelingAdapter abstract : public ModelBusAdapter
[<AbstractClass>]
type ModelingAdapter =  
    class 
        inherit ModelBusAdapter 
    end
public abstract class ModelingAdapter extends ModelBusAdapter

The ModelingAdapter type exposes the following members.

Constructors

  Name Description
Protected method ModelingAdapter(ModelBusReference, ModelBusAdapterManager) Constructor
Protected method ModelingAdapter(ModelBusReference, ModelBusAdapterManager, ModelingDocumentHandler) Constructor

Top

Properties

  Name Description
Public property AdapterManager ModelBusAdapterManager instance that creates this ModelBusAdapter instance. (Inherited from ModelBusAdapter.)
Public property DisplayName The display name of the ModelBusAdapter (Inherited from ModelBusAdapter.)
Public property Disposed True if this ModelBusAdapter instance has been disposed, false otherwise. (Inherited from ModelBusAdapter.)
Public property DocumentHandler ModelingDocumentHandler used by this ModelingAdapter. The DocumentHandler is used by the ModelBusAdapter to configure the model wrapped by it. You can set this property only if it has not been set already.
Public property Reference (Inherited from ModelBusAdapter.)

Top

Methods

  Name Description
Public method Dispose() (Inherited from ModelBusAdapter.)
Protected method Dispose(Boolean) Clean-up this ModelBusAdapter instance. Triggers a dispose of the DocumentHandler, if it has one. (Overrides ModelBusAdapter.Dispose(Boolean).)
Public method Equals(Object) Determines whether the specified object is equal to the current object. (Inherited from Object.)
Public method Equals(ModelBusAdapter) True if this ModelBusAdapter is the same as the given ModelBusAdapter instance, false otherwise. (Inherited from ModelBusAdapter.)
Protected method Finalize Destructor. (Inherited from ModelBusAdapter.)
Public method GetDefaultView Obtains the DefaultView associated with this Model, if one is available. (Inherited from ModelBusAdapter.)
Public method GetElementReference Get the reference of a given object instance supposed to be exposed by this adapter. (Inherited from ModelBusAdapter.)
Protected method GetElementReferences Get back all referenced objects that conform to a given data contract. (Inherited from ModelBusAdapter.)
Public method GetHashCode Serves as the default hash function. (Inherited from Object.)
Public method GetReferences (Inherited from ModelBusAdapter.)
Protected method GetReferenceStatus Returns the ReferenceStatus for the current reference. If this is an element reference then tries ResolveElementReference. (Inherited from ModelBusAdapter.)
Public method GetType Gets the Type of the current instance. (Inherited from Object.)
Public method GetView Gets a specific view associated with this Model based on the ModelBusView reference (Inherited from ModelBusAdapter.)
Protected method MemberwiseClone Creates a shallow copy of the current Object. (Inherited from Object.)
Public method ResolveElementReference(ModelBusReference) Given an identifier for an Element, returns the actual object represented by this reference. (Inherited from ModelBusAdapter.)
Public method ToString Returns a string that represents the current object. (Inherited from Object.)
Public method TrySetDocumentHandler If the ModelingDocumentHandler is not already set (by the constructor for e.g.), then sets it to the value passed as a parameter. Otherwise, returns false.

Top

Remarks

Create an adapter on a specified model using an instance of IModelBus.

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