Class ElementExtensions
Inheritance
System.Object
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace:System.Dynamic.ExpandoObject
Assembly:SilverDawn.SilverModel.UML.dll
Syntax
public static class ElementExtensions
Methods
AddElement(IElement, IElement)
Add an element to another element
Declaration
public static IElement AddElement(this IElement iElement, IElement addElement)
Parameters
Returns
AddPropertyInstance(IElement, Guid, String, String, Guid, String, String, String)
Adds a Stereotype Property Instance to an element
Declaration
public static IStereotypePropertyInstance AddPropertyInstance(this IElement element, Guid generatorId, string generatorName, string type, Guid generatorParameterId, string propertyName, string groupName, string value)
Parameters
Type |
Name |
Description |
IElement |
element |
|
System.Guid |
generatorId |
|
System.String |
generatorName |
|
System.String |
type |
|
System.Guid |
generatorParameterId |
|
System.String |
propertyName |
|
System.String |
groupName |
|
System.String |
value |
|
Returns
ApplyStereotypeInstance(IElement, Guid, String, Generator)
Apply a code generator to an element
Declaration
public static IStereotypeInstance ApplyStereotypeInstance(this IElement element, Guid GeneratorId, string name, Generator gen = null)
Parameters
Type |
Name |
Description |
IElement |
element |
|
System.Guid |
GeneratorId |
The Code Generator Id
|
System.String |
name |
The Code Generator Name
|
SilverDawn.SilverModel.UML.Generators.Generator |
gen |
|
Returns
DefaultDescription(IElement)
Declaration
public static string DefaultDescription(this IElement element)
Parameters
Returns
Type |
Description |
System.String |
|
Delete(IElement)
Declaration
public static void Delete(this IElement iElement)
Parameters
FindAllElementsOfType<TElement>(IElement)
Declaration
public static List<TElement> FindAllElementsOfType<TElement>(this IElement element)
Parameters
Returns
Type |
Description |
System.Collections.Generic.List<TElement> |
|
Type Parameters
Name |
Description |
TElement |
|
FindAllElementsOfType<TElement>(IElement, Boolean)
Finds all elements of a type. e.g. Finds all Interfaces in a model
Declaration
public static List<TElement> FindAllElementsOfType<TElement>(this IElement element, bool recursive)
Parameters
Type |
Name |
Description |
IElement |
element |
|
System.Boolean |
recursive |
|
Returns
Type |
Description |
System.Collections.Generic.List<TElement> |
|
Type Parameters
Name |
Description |
TElement |
|
FindAllInheritedElements<TElement>(IElement)
Finds all the elements that are inherited by an element
Declaration
public static List<TElement> FindAllInheritedElements<TElement>(this IElement element)
Parameters
Returns
Type |
Description |
System.Collections.Generic.List<TElement> |
|
Type Parameters
Name |
Description |
TElement |
|
FindChildElement(IElement, Guid)
Find a child element by Id
Declaration
public static IElement FindChildElement(this IElement iElement, Guid id)
Parameters
Type |
Name |
Description |
IElement |
iElement |
|
System.Guid |
id |
|
Returns
FindParentModel(IElement)
Finds the model that the element is owned by directly or another element in the model
Declaration
public static IModel FindParentModel(this IElement element)
Parameters
Returns
FindParentofType(IElement, Type)
Find the parent element for Type
Declaration
public static IElement FindParentofType(this IElement element, Type t)
Parameters
Type |
Name |
Description |
IElement |
element |
|
System.Type |
t |
|
Returns
FindPropertyValue(IElement, String)
Gets the value of a stereotype property
Declaration
public static string FindPropertyValue(this IElement element, string propertyName)
Parameters
Type |
Name |
Description |
IElement |
element |
|
System.String |
propertyName |
The stereotype property name
|
Returns
Type |
Description |
System.String |
|
FindPropertyValue(IElement, String, String)
Gets the value of a stereotype property
Declaration
public static string FindPropertyValue(this IElement element, string generator, string propertyName)
Parameters
Type |
Name |
Description |
IElement |
element |
|
System.String |
generator |
The Code Generator name
|
System.String |
propertyName |
The stereotype property name
|
Returns
Type |
Description |
System.String |
|
FindTargetRelationships(IElement)
Finds any relationships the element is target in.
Declaration
public static List<IRelationship> FindTargetRelationships(this IElement iElement)
Parameters
Returns
GetAllStereotypePropertyInstances(IElement)
Gets all the Stereotype Property Instance Values for a element
Declaration
public static List<IStereotypePropertyInstance> GetAllStereotypePropertyInstances(this IElement element)
Parameters
Returns
GetModel(IElement)
Gets the model that owns this element
Declaration
public static IModel GetModel(this IElement iElement)
Parameters
Returns
GetNotesAsDocx(IElement)
Declaration
public static byte[] GetNotesAsDocx(this IElement element)
Parameters
Returns
Type |
Description |
System.Byte[] |
|
GetNotesAsHTML(IElement)
Declaration
public static string GetNotesAsHTML(this IElement element)
Parameters
Returns
Type |
Description |
System.String |
|
GetNotesAsHTML(IElement, String)
Add a prefix to each line of the notes html.
Declaration
public static string GetNotesAsHTML(this IElement element, string preFix)
Parameters
Type |
Name |
Description |
IElement |
element |
|
System.String |
preFix |
|
Returns
Type |
Description |
System.String |
|
GetNotesAsMarkDown(IElement)
Declaration
public static string GetNotesAsMarkDown(this IElement element)
Parameters
Returns
Type |
Description |
System.String |
|
GetNotesAsRTF(IElement)
Declaration
public static string GetNotesAsRTF(this IElement element)
Parameters
Returns
Type |
Description |
System.String |
|
GetNotesAsTxt(IElement)
Declaration
public static string GetNotesAsTxt(this IElement element)
Parameters
Returns
Type |
Description |
System.String |
|
GetSolution(IElement)
Gets the solution that owns this element
Declaration
public static ISolution GetSolution(this IElement iElement)
Parameters
Returns