ProfileStereotypeExtensions.ApplyStereotype Method

Applies the stereotype to element. Creates an IStereotypeInstance that represents the extension of the model element by the stereotype.

Namespace:  Microsoft.VisualStudio.ArchitectureTools.Extensibility.Uml
Assembly:  Microsoft.VisualStudio.ArchitectureTools.Extensibility (in Microsoft.VisualStudio.ArchitectureTools.Extensibility.dll)

public static IStereotypeInstance ApplyStereotype(
	this IElement element,
	IStereotype stereotype
)

Parameters

element
Type: Microsoft.VisualStudio.Uml.Classes.IElement
stereotype
Type: Microsoft.VisualStudio.Uml.Profiles.IStereotype

The stereotype to be applied.

Return Value

Type: Microsoft.VisualStudio.Uml.Classes.IStereotypeInstance
An IStereotypeInstance represents the link between a stereotype and an element.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type IElement. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2015 Microsoft