다음을 통해 공유


VsTextTemplatingModelingAdapterManager.DoCreateAdapter Method

Definition

Using the ModelBusReference passed as a parameter, creation of a ModelBusAdapter instance is attempted. If successful, the adapter is returned. If not, appropriate exception is thrown.

protected override Microsoft.VisualStudio.Modeling.Integration.ModelBusAdapter DoCreateAdapter (Microsoft.VisualStudio.Modeling.Integration.ModelBusReference reference, IServiceProvider serviceProvider);
override this.DoCreateAdapter : Microsoft.VisualStudio.Modeling.Integration.ModelBusReference * IServiceProvider -> Microsoft.VisualStudio.Modeling.Integration.ModelBusAdapter
Protected Overrides Function DoCreateAdapter (reference As ModelBusReference, serviceProvider As IServiceProvider) As ModelBusAdapter

Parameters

reference
Microsoft.VisualStudio.Modeling.Integration.ModelBusReference

Reference that will be used to created the ModelBusAdapter

serviceProvider
IServiceProvider

Used to create association between the caller and the referenced model

Returns

Microsoft.VisualStudio.Modeling.Integration.ModelBusAdapter

The created non-null ModelBusAdapter instance if successful, exception will be thrown otherwise.

Exceptions

Microsoft.VisualStudio.Modeling.Integration.AdapterCreationException

Thrown when ModelBusAdapter creation failed for some reason.

Thrown when the argument is null.

Applies to