We recommend using Visual Studio 2017
This documentation is archived and is not being maintained.

ModelBus Class

ModelBus allows tools to interoperate in a loosely coupled fashion.


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

public class ModelBus : IModelBus, IServiceProvider, 
	SModelBus, IDisposable

The ModelBus type exposes the following members.

Public methodModelBusConstructor -- the application hosting the ModelBus should pass in an IServiceProvider instance so the ModelBus can request services.

Public propertyDisposedTrue if this Moldebus instance has been disposed, false otherwise.
Public propertyErrorCallbackDelegate supplied by the host. Used to log errors.

Public methodCreateAdapter(ModelBusReference)Implements CreateAdapter method
Public methodCreateAdapter(ModelBusReference, IServiceProvider)Implements CreateAdapter method
Public methodDeserializeReferenceDeserializes the supplied string and returns a ModelBusReference.
Public methodDispose()
Protected methodDispose(Boolean)Dispose this ModelBus instance.
Public methodEqualsDetermines whether the specified object is equal to the current object. (Inherited from Object.)
Protected methodFinalizeDestructor. (Overrides Object.Finalize().)
Public methodFindAdapterManagersFinds 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 methodGetAdapterManagerLocate a ModelBusAdapterManager instance using its Id.
Public methodGetHashCodeServes as the default hash function. (Inherited from Object.)
Public methodGetRegisteredAdapterManagers<T>Get the set of loaded, registered adapter managers of type T
Public methodGetServiceReturns Adapters provided by the ModeBus or by its host.
Public methodGetTypeGets the Type of the current instance. (Inherited from Object.)
Public methodLogErrorLogs an error
Protected methodMemberwiseCloneCreates a shallow copy of the current Object. (Inherited from Object.)
Public methodSerializeReferenceSerializes the supplied reference to a string that can be persisted by the caller.
Public methodToStringReturns a string that represents the current object. (Inherited from Object.)
Public methodValidateReferenceValidates a given reference using the corresponding adapter. This method updates the LastStatus of a reference in addition to returning it.

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.