다음을 통해 공유


ModelElementExtensionMethods.RemoveExtension Method

Definition

Overloads

RemoveExtension(ModelElement, DomainClassInfo)

Remove any extension of the specified ModelElement that is of a particular type.

RemoveExtension(ModelElement, ExtensionElement)

Remove a specified ExtensionElement from the extensions of this ModelElement.

RemoveExtension(ModelElement, Guid)

Remove any extension of the specified ModelElement that is of a particular type.

RemoveExtension(ModelElement, Type)

Remove any extension of this ModelElement that is of a particular type.

RemoveExtension(ModelElement, DomainClassInfo)

Remove any extension of the specified ModelElement that is of a particular type.

public:
[System::Runtime::CompilerServices::Extension]
 static bool RemoveExtension(Microsoft::VisualStudio::Modeling::ModelElement ^ element, Microsoft::VisualStudio::Modeling::DomainClassInfo ^ extensionClass);
public static bool RemoveExtension (this Microsoft.VisualStudio.Modeling.ModelElement element, Microsoft.VisualStudio.Modeling.DomainClassInfo extensionClass);
static member RemoveExtension : Microsoft.VisualStudio.Modeling.ModelElement * Microsoft.VisualStudio.Modeling.DomainClassInfo -> bool
<Extension()>
Public Function RemoveExtension (element As ModelElement, extensionClass As DomainClassInfo) As Boolean

Parameters

element
ModelElement

The element whose extension is to be removed

extensionClass
DomainClassInfo

The domainc class of the type of ExtensionElement to remove

Returns

true if an extension of the particular type was found and removed, else false

Remarks

Note that assuming the Extensions collection is maintained through the Extensibility API then there can be only one extension of a particular type present, so only the first found is removed.

Applies to

RemoveExtension(ModelElement, ExtensionElement)

Remove a specified ExtensionElement from the extensions of this ModelElement.

public:
[System::Runtime::CompilerServices::Extension]
 static bool RemoveExtension(Microsoft::VisualStudio::Modeling::ModelElement ^ element, Microsoft::VisualStudio::Modeling::ExtensionElement ^ extension);
public static bool RemoveExtension (this Microsoft.VisualStudio.Modeling.ModelElement element, Microsoft.VisualStudio.Modeling.ExtensionElement extension);
static member RemoveExtension : Microsoft.VisualStudio.Modeling.ModelElement * Microsoft.VisualStudio.Modeling.ExtensionElement -> bool
<Extension()>
Public Function RemoveExtension (element As ModelElement, extension As ExtensionElement) As Boolean

Parameters

element
ModelElement

The element whose extension is to be removed

extension
ExtensionElement

The extension to be removed

Returns

true if the specified extension was found and removed, else false

Applies to

RemoveExtension(ModelElement, Guid)

Remove any extension of the specified ModelElement that is of a particular type.

public:
[System::Runtime::CompilerServices::Extension]
 static bool RemoveExtension(Microsoft::VisualStudio::Modeling::ModelElement ^ element, Guid extensionClassId);
public static bool RemoveExtension (this Microsoft.VisualStudio.Modeling.ModelElement element, Guid extensionClassId);
static member RemoveExtension : Microsoft.VisualStudio.Modeling.ModelElement * Guid -> bool
<Extension()>
Public Function RemoveExtension (element As ModelElement, extensionClassId As Guid) As Boolean

Parameters

element
ModelElement

The element whose extension is to be removed

extensionClassId
Guid

Returns

true if an extension of the particular type was found and removed, else false

Remarks

Note that assuming the Extensions collection is maintained through the Extensibility API then there can be only one extension of a particular type present, so only the first found is removed.

Applies to

RemoveExtension(ModelElement, Type)

Remove any extension of this ModelElement that is of a particular type.

public:
[System::Runtime::CompilerServices::Extension]
 static bool RemoveExtension(Microsoft::VisualStudio::Modeling::ModelElement ^ element, Type ^ extensionType);
public static bool RemoveExtension (this Microsoft.VisualStudio.Modeling.ModelElement element, Type extensionType);
static member RemoveExtension : Microsoft.VisualStudio.Modeling.ModelElement * Type -> bool
<Extension()>
Public Function RemoveExtension (element As ModelElement, extensionType As Type) As Boolean

Parameters

element
ModelElement

The element whose extension is to be removed

extensionType
Type

The type of ExtensionElement to remove

Returns

true if an extension of the particular type was found and removed, else false

Remarks

Note that assuming the Extensions collection is maintained through the Extensibility API then there can be only one extension of a particular type present, so only the first found is removed.

Applies to