C# Class NMF.Models.Repository.ModelRepository

Represents a standard model repository
Inheritance: IModelRepository
Afficher le fichier Open project: NMFCode/NMF Class Usage Examples

Méthodes publiques

Méthode Description
ModelRepository ( ) : System

Creates a new model repository with the meta repository as parent

ModelRepository ( IModelRepository parent ) : System

Creates a new model repository with a given parent

If no parent repository is provided, the meta repository is used as parent repository

Resolve ( Uri uri, bool loadOnDemand = true ) : IModelElement

Resolves the given Uri and returns the model element

Resolve ( Uri uri, string hintPath, bool loadOnDemand = true ) : IModelElement

Resolves the given Uri and returns the model element

Resolve ( string path ) : Model

Resolves the given file path for a model element

Save ( IModelElement element, Stream stream, Uri uri ) : void

Saves the given model element to the specified stream

Save ( IModelElement element, string path ) : void

Saves the given model element to the specified stream

Save ( IModelElement element, string path, Uri uri ) : void

Saves the given model element to the specified stream

Méthodes protégées

Méthode Description
OnBubbledChange ( BubbledChangeEventArgs e ) : void
OnUnresolvedModelElement ( NMF.Models.Repository.UnresolvedModelElementEventArgs e ) : void

Gets called when a Uri cannot be resolved

Private Methods

Méthode Description
EnsureModelIsKnown ( IModelElement element ) : void
Parent_BubbledChange ( object sender, BubbledChangeEventArgs e ) : void

Method Details

ModelRepository() public méthode

Creates a new model repository with the meta repository as parent
public ModelRepository ( ) : System
Résultat System

ModelRepository() public méthode

Creates a new model repository with a given parent
If no parent repository is provided, the meta repository is used as parent repository
public ModelRepository ( IModelRepository parent ) : System
parent IModelRepository The parent repository
Résultat System

OnBubbledChange() protected méthode

protected OnBubbledChange ( BubbledChangeEventArgs e ) : void
e BubbledChangeEventArgs
Résultat void

OnUnresolvedModelElement() protected méthode

Gets called when a Uri cannot be resolved
protected OnUnresolvedModelElement ( NMF.Models.Repository.UnresolvedModelElementEventArgs e ) : void
e NMF.Models.Repository.UnresolvedModelElementEventArgs The event data
Résultat void

Resolve() public méthode

Resolves the given Uri and returns the model element
public Resolve ( Uri uri, bool loadOnDemand = true ) : IModelElement
uri System.Uri The Uri where to look for the model element
loadOnDemand bool A boolean flag indicating whether the uri should be attempted /// to load, if the model is not already registered with the repository
Résultat IModelElement

Resolve() public méthode

Resolves the given Uri and returns the model element
public Resolve ( Uri uri, string hintPath, bool loadOnDemand = true ) : IModelElement
uri System.Uri The Uri where to look for the model element
hintPath string The path where the model can be found
loadOnDemand bool A boolean flag indicating whether the uri should be attempted /// to load, if the model is not already registered with the repository
Résultat IModelElement

Resolve() public méthode

Resolves the given file path for a model element
public Resolve ( string path ) : Model
path string The file path where to look for models
Résultat Model

Save() public méthode

Saves the given model element to the specified stream
public Save ( IModelElement element, Stream stream, Uri uri ) : void
element IModelElement The model element
stream Stream The stream to save the model element to
uri System.Uri The uri under which the model element shall be retrievable
Résultat void

Save() public méthode

Saves the given model element to the specified stream
public Save ( IModelElement element, string path ) : void
element IModelElement The model element
path string The path where to save the model element
Résultat void

Save() public méthode

Saves the given model element to the specified stream
public Save ( IModelElement element, string path, Uri uri ) : void
element IModelElement The model element
path string The path where to save the model element
uri System.Uri The uri under which the model element can be retrieved
Résultat void