Show / Hide Table of Contents

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
Type Name Description
IElement iElement
IElement addElement
Returns
Type Description
IElement

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
Type Description
IStereotypePropertyInstance

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
Type Description
IStereotypeInstance

DefaultDescription(IElement)

Declaration
public static string DefaultDescription(this IElement element)
Parameters
Type Name Description
IElement element
Returns
Type Description
System.String

Delete(IElement)

Deletes the element

Declaration
public static void Delete(this IElement iElement)
Parameters
Type Name Description
IElement iElement

FindAllElementsOfType<TElement>(IElement)

Declaration
public static List<TElement> FindAllElementsOfType<TElement>(this IElement element)
Parameters
Type Name Description
IElement element
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
Type Name Description
IElement element
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
Type Description
IElement

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
Type Name Description
IElement element
Returns
Type Description
IModel

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
Type Description
IElement

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
Type Name Description
IElement iElement
Returns
Type Description
System.Collections.Generic.List<IRelationship>

GetAllStereotypePropertyInstances(IElement)

Gets all the Stereotype Property Instance Values for a element

Declaration
public static List<IStereotypePropertyInstance> GetAllStereotypePropertyInstances(this IElement element)
Parameters
Type Name Description
IElement element
Returns
Type Description
System.Collections.Generic.List<IStereotypePropertyInstance>

GetModel(IElement)

Gets the model that owns this element

Declaration
public static IModel GetModel(this IElement iElement)
Parameters
Type Name Description
IElement iElement
Returns
Type Description
IModel

GetNotesAsDocx(IElement)

Declaration
public static byte[] GetNotesAsDocx(this IElement element)
Parameters
Type Name Description
IElement element
Returns
Type Description
System.Byte[]

GetNotesAsHTML(IElement)

Declaration
public static string GetNotesAsHTML(this IElement element)
Parameters
Type Name Description
IElement element
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
Type Name Description
IElement element
Returns
Type Description
System.String

GetNotesAsRTF(IElement)

Declaration
public static string GetNotesAsRTF(this IElement element)
Parameters
Type Name Description
IElement element
Returns
Type Description
System.String

GetNotesAsTxt(IElement)

Declaration
public static string GetNotesAsTxt(this IElement element)
Parameters
Type Name Description
IElement element
Returns
Type Description
System.String

GetSolution(IElement)

Gets the solution that owns this element

Declaration
public static ISolution GetSolution(this IElement iElement)
Parameters
Type Name Description
IElement iElement
Returns
Type Description
ISolution
Back to top Generated by DocFX