IModelBus.CreateAdapter Method (ModelBusReference, IServiceProvider)

 

Attempts to create and return a new adapter instance for the supplied reference. Allows a service provider to be supplied.

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

Syntax

ModelBusAdapter CreateAdapter(
    ModelBusReference reference,
    IServiceProvider serviceProvider
)
ModelBusAdapter^ CreateAdapter(
    ModelBusReference^ reference,
    IServiceProvider^ serviceProvider
)
abstract CreateAdapter : 
        reference:ModelBusReference *
        serviceProvider:IServiceProvider -> ModelBusAdapter
Function CreateAdapter (
    reference As ModelBusReference,
    serviceProvider As IServiceProvider
) As ModelBusAdapter

Parameters

Return Value

Type: Microsoft.VisualStudio.Modeling.Integration.ModelBusAdapter

The adapter that was created, or null if one could not be created

Remarks

The IServiceProvider should be used by callers to supply services that implement a private protocol between the caller and the Adapter being created by the AdapterManager. If an AdapterManager does not require any special services from the caller or if the client does not wish to invoke the private protocol, then this API should not be used. Instead, use the overloaded CreateAdapter() which just accepts a ModelBusReference. Note to implementors: In order to retrieve general purpose Services, use the ModelBus's ServiceProvider or any other standard ServiceProvider instead.

See Also

CreateAdapter Overload
IModelBus Interface
Microsoft.VisualStudio.Modeling.Integration Namespace

Return to top