Table of Contents

Class AnyTextSerializer

Namespace
NMF.AnyText.Grammars
Assembly
NMF.AnyText.dll

Denotes a serializer using AnyText

public class AnyTextSerializer : IModelSerializer
Inheritance
AnyTextSerializer
Implements
Inherited Members

Constructors

AnyTextSerializer(Grammar)

Creates a new instance

public AnyTextSerializer(Grammar grammar)

Parameters

grammar Grammar

the underlying grammar

Methods

Deserialize(Stream, Uri, IModelRepository, bool)

Deserializes the given source into a model

public Model Deserialize(Stream source, Uri modelUri, IModelRepository repository, bool addToRepository)

Parameters

source Stream

the source stream

modelUri Uri

the URI of the model

repository IModelRepository

the repository in the context of which the model is deserialized

addToRepository bool

true, if the model should be added to the repository, otherwise false

Returns

Model

the deserialized model

Serialize(Model, Stream)

Serializes the given model to the given target stream

public void Serialize(Model model, Stream target)

Parameters

model Model

the model to serialize

target Stream

the target stream

SerializeFragment(ModelElement, Stream)

Serialize the given model element as a fragment to the given stream

public void SerializeFragment(ModelElement element, Stream target)

Parameters

element ModelElement

the model element to serialize

target Stream

the target stream