C# 클래스 NMF.Models.Repository.ModelRepository

Represents a standard model repository
상속: IModelRepository
파일 보기 프로젝트 열기: NMFCode/NMF 1 사용 예제들

공개 메소드들

메소드 설명
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

보호된 메소드들

메소드 설명
OnBubbledChange ( BubbledChangeEventArgs e ) : void
OnUnresolvedModelElement ( NMF.Models.Repository.UnresolvedModelElementEventArgs e ) : void

Gets called when a Uri cannot be resolved

비공개 메소드들

메소드 설명
EnsureModelIsKnown ( IModelElement element ) : void
Parent_BubbledChange ( object sender, BubbledChangeEventArgs e ) : void

메소드 상세

ModelRepository() 공개 메소드

Creates a new model repository with the meta repository as parent
public ModelRepository ( ) : System
리턴 System

ModelRepository() 공개 메소드

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
리턴 System

OnBubbledChange() 보호된 메소드

protected OnBubbledChange ( BubbledChangeEventArgs e ) : void
e BubbledChangeEventArgs
리턴 void

OnUnresolvedModelElement() 보호된 메소드

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

Resolve() 공개 메소드

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
리턴 IModelElement

Resolve() 공개 메소드

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
리턴 IModelElement

Resolve() 공개 메소드

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

Save() 공개 메소드

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
리턴 void

Save() 공개 메소드

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
리턴 void

Save() 공개 메소드

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
리턴 void