Share via


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)

Inheritance Hierarchy

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

Syntax

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

Constructors

Name Description
System_CAPS_pubmethod ModelBus(IServiceProvider, Action<ErrorCategory, String>, IConfiguration)

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

Properties

Name Description
System_CAPS_pubproperty Disposed

True if this Moldebus instance has been disposed, false otherwise.

System_CAPS_pubproperty ErrorCallback

Delegate supplied by the host. Used to log errors.

Methods

Name Description
System_CAPS_pubmethod CreateAdapter(ModelBusReference)

Implements CreateAdapter method

System_CAPS_pubmethod CreateAdapter(ModelBusReference, IServiceProvider)

Implements CreateAdapter method

System_CAPS_pubmethod DeserializeReference(String, ReferenceContext)

Deserializes the supplied string and returns a ModelBusReference.

System_CAPS_pubmethod Dispose()

System_CAPS_protmethod Dispose(Boolean)

Dispose this ModelBus instance.

System_CAPS_pubmethod Equals(Object)

(Inherited from Object.)

System_CAPS_protmethod Finalize()

Destructor.(Overrides Object.Finalize().)

System_CAPS_pubmethod FindAdapterManagers(Object[])

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.

System_CAPS_pubmethod GetAdapterManager(String)

Locate a ModelBusAdapterManager instance using its Id.

System_CAPS_pubmethod GetHashCode()

(Inherited from Object.)

System_CAPS_pubmethod GetRegisteredAdapterManagers<T>()

Get the set of loaded, registered adapter managers of type T

System_CAPS_pubmethod GetService(Type)

Returns Adapters provided by the ModeBus or by its host.

System_CAPS_pubmethod GetType()

(Inherited from Object.)

System_CAPS_pubmethod LogError(ErrorCategory, String)

Logs an error

System_CAPS_protmethod MemberwiseClone()

(Inherited from Object.)

System_CAPS_pubmethod SerializeReference(ModelBusReference)

Serializes the supplied reference to a string that can be persisted by the caller.

System_CAPS_pubmethod ToString()

(Inherited from Object.)

System_CAPS_pubmethod ValidateReference(ModelBusReference, ValidateReferenceOption)

Validates a given reference using the corresponding adapter. This method updates the LastStatus of a reference in addition to returning it.

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

Microsoft.VisualStudio.Modeling.Integration Namespace

Return to top