C# 클래스 META.ComponentLibraryManager

파일 보기 프로젝트 열기: metamorph-inc/meta-core 1 사용 예제들

공개 메소드들

메소드 설명
CreateComponentFolder ( IMgaProject project ) : String

Creates a unique folder, used for storing component resources, under the project's "components" folder. This operation DOES NOT assign the folder to any component; Consider using EnsureComponentDirectory(...) for this purpose.

EnsureAVMID ( ISIS.GME.Dsml.CyPhyML.Interfaces component ) : String

Given a component, ensures that is has an AVMID unique to its project. If it has an AVMID, and it is unique, it will not be changed. Otherwise, a new one will be assigned.

EnsureComponentAssemblyFolder ( ISIS.GME.Dsml.CyPhyML.Interfaces componentAssembly, string ProjectDirectory = null ) : String

Given a component assembly, ensures that the component assembly has a backend folder for storing resources. Creates a folder if necessary.

EnsureComponentFolder ( ISIS.GME.Dsml.CyPhyML.Interfaces component, string ProjectDirectory = null ) : String

Given a component, ensures that the component has a backend folder for storing resources. Ensures that the Component has an AVMID unique to the project. Creates a folder if necessary.

GetComponentFolderPath ( ISIS.GME.Dsml.CyPhyML.Interfaces component, PathConvention pathConvention = PathConvention.REL_TO_PROJ_ROOT, string ProjectDirectory = null ) : String

Given a component, ensures that the component has a backend folder for storing resources. Ensures that the Component has an AVMID unique to the project. Creates a folder if necessary.

GetProjectRootPath ( IMgaProject project ) : String

Get the absolute path to the root directory of a CyPhy project.

GetRandomComponentAssemblyDir ( ) : string
MakeRelativePath ( string fromPath, string toPath ) : string

Creates a relative path from one file or folder to another.

TryGetOriginalACMFilePath ( ISIS.GME.Dsml.CyPhyML.Interfaces component, string &path, PathConvention pathConvention = PathConvention.REL_TO_COMP_DIR, string ProjectDirectory = null ) : bool

Retrieves the path to the component's original ACM file, stored when it was imported. Note that ANY ACM file found will be flagged as a match, even if it has been updated for some reason.

TryGetResourcePath ( ISIS.GME.Dsml.CyPhyML.Interfaces domainModel, string &path, PathConvention pathConvention = PathConvention.REL_TO_COMP_DIR ) : bool

Given a DomainModel object, find the path to the file resource. This will traverse the UsesResource connection to a Resource object, then return that Resource object's path.

비공개 메소드들

메소드 설명
PathContainsIllegalChar ( string path ) : bool

메소드 상세

CreateComponentFolder() 공개 정적인 메소드

Creates a unique folder, used for storing component resources, under the project's "components" folder. This operation DOES NOT assign the folder to any component; Consider using EnsureComponentDirectory(...) for this purpose.
public static CreateComponentFolder ( IMgaProject project ) : String
project IMgaProject
리턴 String

EnsureAVMID() 공개 정적인 메소드

Given a component, ensures that is has an AVMID unique to its project. If it has an AVMID, and it is unique, it will not be changed. Otherwise, a new one will be assigned.
public static EnsureAVMID ( ISIS.GME.Dsml.CyPhyML.Interfaces component ) : String
component ISIS.GME.Dsml.CyPhyML.Interfaces
리턴 String

EnsureComponentAssemblyFolder() 공개 정적인 메소드

Given a component assembly, ensures that the component assembly has a backend folder for storing resources. Creates a folder if necessary.
public static EnsureComponentAssemblyFolder ( ISIS.GME.Dsml.CyPhyML.Interfaces componentAssembly, string ProjectDirectory = null ) : String
componentAssembly ISIS.GME.Dsml.CyPhyML.Interfaces
ProjectDirectory string Directory in which the /designs/ folder resides. Defaults to project directory of
리턴 String

EnsureComponentFolder() 공개 정적인 메소드

Given a component, ensures that the component has a backend folder for storing resources. Ensures that the Component has an AVMID unique to the project. Creates a folder if necessary.
public static EnsureComponentFolder ( ISIS.GME.Dsml.CyPhyML.Interfaces component, string ProjectDirectory = null ) : String
component ISIS.GME.Dsml.CyPhyML.Interfaces
ProjectDirectory string Directory in which the /components/ folder resides. Defaults to project directory of
리턴 String

GetComponentFolderPath() 공개 정적인 메소드

Given a component, ensures that the component has a backend folder for storing resources. Ensures that the Component has an AVMID unique to the project. Creates a folder if necessary.
public static GetComponentFolderPath ( ISIS.GME.Dsml.CyPhyML.Interfaces component, PathConvention pathConvention = PathConvention.REL_TO_PROJ_ROOT, string ProjectDirectory = null ) : String
component ISIS.GME.Dsml.CyPhyML.Interfaces
pathConvention PathConvention The desired convention for the path.
ProjectDirectory string Directory in which component files reside. Defaults to project directory of
리턴 String

GetProjectRootPath() 공개 정적인 메소드

Get the absolute path to the root directory of a CyPhy project.
public static GetProjectRootPath ( IMgaProject project ) : String
project IMgaProject
리턴 String

GetRandomComponentAssemblyDir() 공개 정적인 메소드

public static GetRandomComponentAssemblyDir ( ) : string
리턴 string

MakeRelativePath() 공개 정적인 메소드

Creates a relative path from one file or folder to another.
public static MakeRelativePath ( string fromPath, string toPath ) : string
fromPath string Contains the directory that defines the start of the relative path.
toPath string Contains the path that defines the endpoint of the relative path.
리턴 string

TryGetOriginalACMFilePath() 공개 정적인 메소드

Retrieves the path to the component's original ACM file, stored when it was imported. Note that ANY ACM file found will be flagged as a match, even if it has been updated for some reason.
public static TryGetOriginalACMFilePath ( ISIS.GME.Dsml.CyPhyML.Interfaces component, string &path, PathConvention pathConvention = PathConvention.REL_TO_COMP_DIR, string ProjectDirectory = null ) : bool
component ISIS.GME.Dsml.CyPhyML.Interfaces
path string The path to the ACM file, according to the PathConvention
pathConvention PathConvention
ProjectDirectory string Directory in which component files reside. Defaults to project directory of
리턴 bool

TryGetResourcePath() 공개 정적인 메소드

Given a DomainModel object, find the path to the file resource. This will traverse the UsesResource connection to a Resource object, then return that Resource object's path.
public static TryGetResourcePath ( ISIS.GME.Dsml.CyPhyML.Interfaces domainModel, string &path, PathConvention pathConvention = PathConvention.REL_TO_COMP_DIR ) : bool
domainModel ISIS.GME.Dsml.CyPhyML.Interfaces
path string The path to the resource, relative to the component's resource folder
pathConvention PathConvention
리턴 bool