StandardModelingAdapter.GetElementReference Method
Get the reference of a given object instance supposed to be exposed by this adapter.
Namespace: Microsoft.VisualStudio.Modeling.Integration
Assembly: Microsoft.VisualStudio.Modeling.Sdk.Integration.10.0 (in Microsoft.VisualStudio.Modeling.Sdk.Integration.10.0.dll)
Syntax
'Déclaration
Public Overrides Function GetElementReference ( _
element As Object _
) As ModelBusReference
public override ModelBusReference GetElementReference(
Object element
)
public:
virtual ModelBusReference^ GetElementReference(
Object^ element
) override
abstract GetElementReference :
element:Object -> ModelBusReference
override GetElementReference :
element:Object -> ModelBusReference
public override function GetElementReference(
element : Object
) : ModelBusReference
Parameters
- element
Type: System.Object
Element for which the Model bus reference should returned. Should not be <c>null</c>
Return Value
Type: Microsoft.VisualStudio.Modeling.Integration.ModelBusReference
A reference on the exposed element passed as a parameter if it is managed by this adapter
Remarks
If </w:t></w:r><w:r><w:rPr><w:rStyle w:val="ParameterReference"/></w:rPr><w:t>element</w:t></w:r><w:r><w:t> is <c>null</c>, an ArgumentNullExceptionArgumentNullException is thrown. If </w:t></w:r><w:r><w:rPr><w:rStyle w:val="ParameterReference"/></w:rPr><w:t>element</w:t></w:r><w:r><w:t> element does not belong to the objects managed by this adapter, an ArgumentExceptionArgumentException is thrown. Also if a valid reference cannot be created for the element, the method will return <c>null</c>. This could, for instance, be the case if GetElementId(ModelElement)GetElementId() returns null of empty
.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.