IModelBus.CreateAdapter Method (ModelBusReference)
Attempts to create and return a new adapter instance for the supplied reference, which can be a model reference or a model element reference.
Namespace: Microsoft.VisualStudio.Modeling.Integration
Assembly: Microsoft.VisualStudio.Modeling.Sdk.Integration.10.0 (in Microsoft.VisualStudio.Modeling.Sdk.Integration.10.0.dll)
Syntax
'Declaración
Function CreateAdapter ( _
reference As ModelBusReference _
) As ModelBusAdapter
ModelBusAdapter CreateAdapter(
ModelBusReference reference
)
ModelBusAdapter^ CreateAdapter(
ModelBusReference^ reference
)
abstract CreateAdapter :
reference:ModelBusReference -> ModelBusAdapter
function CreateAdapter(
reference : ModelBusReference
) : ModelBusAdapter
Parameters
- reference
Type: Microsoft.VisualStudio.Modeling.Integration.ModelBusReference
A reference to the model or an element within it
Return Value
Type: Microsoft.VisualStudio.Modeling.Integration.ModelBusAdapter
The adapter that was created, or null if one could not be created
Remarks
This method will throw an exception if an Adapter cannot be created. This might happen if an AdapterManager that can handle this reference is not found, or if the reference is invalid.
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.