다음을 통해 공유


ModelBus Class

ModelBus allows tools to interoperate in a loosely coupled fashion.

Inheritance Hierarchy

System.Object
  Microsoft.VisualStudio.Modeling.Integration.ModelBus

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 Class ModelBus _
    Implements IModelBus, IServiceProvider, SModelBus, IDisposable
public class ModelBus : IModelBus, IServiceProvider, 
    SModelBus, IDisposable
public ref class ModelBus : IModelBus, 
    IServiceProvider, SModelBus, IDisposable
type ModelBus =  
    class 
        interface IModelBus 
        interface IServiceProvider 
        interface SModelBus 
        interface IDisposable 
    end
public class ModelBus implements IModelBus, IServiceProvider, SModelBus, IDisposable

The ModelBus type exposes the following members.

Constructors

  Name Description
Public method ModelBus Constructor -- the application hosting the ModelBus should pass in an IServiceProvider instance so the ModelBus can request services.

Top

Properties

  Name Description
Public property Disposed True if this Moldebus instance has been disposed, false otherwise.
Public property ErrorCallback Delegate supplied by the host. Used to log errors.

Top

Methods

  Name Description
Public method CreateAdapter(ModelBusReference) Implements CreateAdapter method
Public method CreateAdapter(ModelBusReference, IServiceProvider) Implements CreateAdapter method
Public method DeserializeReference Deserializes the supplied string and returns a ModelBusReference.
Public method Dispose()
Protected method Dispose(Boolean) Dispose this ModelBus instance.
Public method Equals Determines whether the specified object is equal to the current object. (Inherited from Object.)
Protected method Finalize Destructor. (Overrides Object.Finalize().)
Public method FindAdapterManagers Finds the list of ModelBusAdapter managers whose ModelBusAdapter scopes are described by the given context information. There may be multiple ModelBusAdapter managers that can work with the model, for example a .xml file can be opened by XML editor or Text editor.
Public method GetAdapterManager Locate a ModelBusAdapterManager instance using its Id.
Public method GetHashCode Serves as the default hash function. (Inherited from Object.)
Public method GetRegisteredAdapterManagers<T> Get the set of loaded, registered adapter managers of type T
Public method GetService Returns Adapters provided by the ModeBus or by its host.
Public method GetType Gets the Type of the current instance. (Inherited from Object.)
Public method LogError Logs an error
Protected method MemberwiseClone Creates a shallow copy of the current Object. (Inherited from Object.)
Public method SerializeReference Serializes the supplied reference to a string that can be persisted by the caller.
Public method ToString Returns a string that represents the current object. (Inherited from Object.)
Public method ValidateReference Validates a given reference using the corresponding adapter. This method updates the LastStatus of a reference in addition to returning it.

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