Udostępnij za pośrednictwem


ModelElement.RemoveExtension Method

Definition

Overloads

RemoveExtension(ModelElement, Guid)

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

RemoveExtension(ModelElement, Type)

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

RemoveExtension(ModelElement, ExtensionElement)

Remove a specified ExtensionElement from the extensions of the specified ModelElement.

RemoveExtension(ModelElement, DomainClassInfo)

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

RemoveExtension(ModelElement, Guid)

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

public:
 static bool RemoveExtension(Microsoft::VisualStudio::Modeling::ModelElement ^ element, Guid extensionClassId);
public static bool RemoveExtension (Microsoft.VisualStudio.Modeling.ModelElement element, Guid extensionClassId);
static member RemoveExtension : Microsoft.VisualStudio.Modeling.ModelElement * Guid -> bool
Public Shared Function RemoveExtension (element As ModelElement, extensionClassId As Guid) As Boolean

Parameters

element
ModelElement

The element whose extension is to be removed

extensionClassId
Guid

The domainc class id 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, Type)

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

public:
 static bool RemoveExtension(Microsoft::VisualStudio::Modeling::ModelElement ^ element, Type ^ extensionType);
public static bool RemoveExtension (Microsoft.VisualStudio.Modeling.ModelElement element, Type extensionType);
static member RemoveExtension : Microsoft.VisualStudio.Modeling.ModelElement * Type -> bool
Public Shared 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

RemoveExtension(ModelElement, ExtensionElement)

Remove a specified ExtensionElement from the extensions of the specified ModelElement.

public:
 static bool RemoveExtension(Microsoft::VisualStudio::Modeling::ModelElement ^ element, Microsoft::VisualStudio::Modeling::ExtensionElement ^ extension);
public static bool RemoveExtension (Microsoft.VisualStudio.Modeling.ModelElement element, Microsoft.VisualStudio.Modeling.ExtensionElement extension);
static member RemoveExtension : Microsoft.VisualStudio.Modeling.ModelElement * Microsoft.VisualStudio.Modeling.ExtensionElement -> bool
Public Shared 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, DomainClassInfo)

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

public:
 static bool RemoveExtension(Microsoft::VisualStudio::Modeling::ModelElement ^ element, Microsoft::VisualStudio::Modeling::DomainClassInfo ^ extensionClass);
public static bool RemoveExtension (Microsoft.VisualStudio.Modeling.ModelElement element, Microsoft.VisualStudio.Modeling.DomainClassInfo extensionClass);
static member RemoveExtension : Microsoft.VisualStudio.Modeling.ModelElement * Microsoft.VisualStudio.Modeling.DomainClassInfo -> bool
Public Shared Function RemoveExtension (element As ModelElement, extensionClass As DomainClassInfo) As Boolean

Parameters

element
ModelElement

The element whose extension is to be removed

extensionClass
DomainClassInfo

The domain 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