Share via


StandardModelingAdapter.GetElementReference Method (Object)

 

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.12.0 (in Microsoft.VisualStudio.Modeling.Sdk.Integration.12.0.dll)

Syntax

public override ModelBusReference GetElementReference(
    object element
)
public:
virtual ModelBusReference^ GetElementReference(
    Object^ element
) override
override GetElementReference : 
        element:Object -> ModelBusReference
Public Overrides Function GetElementReference (
    element As Object
) As 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 GetElementId() returns null of empty

See Also

StandardModelingAdapter Class
Microsoft.VisualStudio.Modeling.Integration Namespace

Return to top