Condividi tramite


ModelBusAdapter Class

A ModelBusAdapter is an object that serves as a bridge between the ModelBus and the underlying model. ModelBusAdapter instances are created by ModelBusAdapterManager, and the operations a ModelBusAdapter exposes are defined by the ModelBusAdapter contract of the ModelBusAdapterManager.

Inheritance Hierarchy

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

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

Syntax

'Dichiarazione
Public MustInherit Class ModelBusAdapter _
    Implements IEquatable(Of ModelBusAdapter), IDisposable
public abstract class ModelBusAdapter : IEquatable<ModelBusAdapter>, 
    IDisposable
public ref class ModelBusAdapter abstract : IEquatable<ModelBusAdapter^>, 
    IDisposable
[<AbstractClass>]
type ModelBusAdapter =  
    class
        interface IEquatable<ModelBusAdapter>
        interface IDisposable
    end
public abstract class ModelBusAdapter implements IEquatable<ModelBusAdapter>, IDisposable

The ModelBusAdapter type exposes the following members.

Constructors

  Name Description
Protected method ModelBusAdapter Constructor

Top

Properties

  Name Description
Public property AdapterManager ModelBusAdapterManager instance that creates this ModelBusAdapter instance.
Public property DisplayName The display name of the ModelBusAdapter
Public property Disposed True if this ModelBusAdapter instance has been disposed, false otherwise.
Public property Reference

Top

Methods

  Name Description
Public method Dispose()
Protected method Dispose(Boolean) Dispose this ModelBusAdapter instance. The base class does nothing. Derived ModelBusAdapter implementations can choose to do additional work, including persist unsaved data, free up resources, etc.
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.
Protected method Finalize Destructor. (Overrides Object.Finalize().)
Public method GetDefaultView Obtains the DefaultView associated with this Model, if one is available.
Public method GetElementReference Get the reference of a given object instance supposed to be exposed by this adapter.
Protected method GetElementReferences Get back all referenced objects that conform to a given data contract.
Public method GetHashCode Serves as a hash function for a particular type. (Inherited from Object.)
Protected method GetReferenceStatus Returns the ReferenceStatus for the current reference. If this is an element reference then tries ResolveElementReference.
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
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.
Public method ResolveElementReference<T>(ModelBusReference) Given an identifier for an Element, returns the actual object represented by this reference (strong typed helper method)
Public method ToString Returns a string that represents the current object. (Inherited from Object.)

Top

Remarks

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