Show / Hide Table of Contents

Class ModelExtensions

Denotes common extensions to model elements

Inheritance
object
ModelExtensions
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: NMF.Models
Assembly: NMF.Models.dll
Syntax
public static class ModelExtensions

Methods

| Edit this page View Source

AncestorTree(IModelElement)

Gets an incrementalizable collection with all ancestor elements

Declaration
public static IEnumerableExpression<ModelTreeItem> AncestorTree(this IModelElement element)
Parameters
Type Name Description
IModelElement element

The leaf element

Returns
Type Description
IEnumerableExpression<ModelTreeItem>

A collection including the element and all its ancestors

| Edit this page View Source

Ancestors(IModelElement)

Gets an incrementalizable collection with all ancestor elements

Declaration
public static IEnumerableExpression<IModelElement> Ancestors(this IModelElement element)
Parameters
Type Name Description
IModelElement element

The leaf element

Returns
Type Description
IEnumerableExpression<IModelElement>

A collection including the element and all its ancestors

| Edit this page View Source

Descendants(IModelElement)

Gets an incrementalizable collection with all descendent elements

Declaration
public static IEnumerableExpression<IModelElement> Descendants(this IModelElement element)
Parameters
Type Name Description
IModelElement element

The root model element

Returns
Type Description
IEnumerableExpression<IModelElement>

An incrementalizable collection with all descendent elements

| Edit this page View Source

Serialize(IModelSerializer, IModelElement, Stream, Uri)

Serializes the given model element to the given path

Declaration
public static void Serialize(this IModelSerializer serializer, IModelElement element, Stream target, Uri uri)
Parameters
Type Name Description
IModelSerializer serializer

The serializer

IModelElement element

The model element

Stream target

The target to which the model element should be serialized

Uri uri

The uri under which the element should be serialized

| Edit this page View Source

Serialize(IModelSerializer, IModelElement, string)

Serializes the given model element to the given path

Declaration
public static void Serialize(this IModelSerializer serializer, IModelElement element, string path)
Parameters
Type Name Description
IModelSerializer serializer

The serializer

IModelElement element

The model element

string path

The path

| Edit this page View Source

Serialize(IModelSerializer, IModelElement, string, Uri)

Serializes the given model element to the given path

Declaration
public static void Serialize(this IModelSerializer serializer, IModelElement element, string path, Uri uri)
Parameters
Type Name Description
IModelSerializer serializer

The serializer

IModelElement element

The model element

string path

The path

Uri uri

The uri under which the element should be serialized

  • Edit this page
  • View Source
In this article
Back to top Generated by DocFX