C# Class CyPhyMetaLink.CyphyMetaLinkUtils

Mostrar archivo Open project: metamorph-inc/meta-core Class Usage Examples

Public Methods

Method Description
CleanPath ( String path ) : String
CollectComponentRefsRecursive ( ISIS.GME.Dsml.CyPhyML.Interfaces assembly ) : List
CollectComponentsRecursive ( ISIS.GME.Dsml.CyPhyML.Interfaces assembly ) : HashSet
CollectInstanceGUIDs ( CyPhyML.ComponentRef>.Dictionary dict, string prefix, ISIS.GME.Dsml.CyPhyML.Interfaces assembly ) : void
CopyComponent ( ISIS.GME.Dsml.CyPhyML.Interfaces original, bool createNewMgaComponent ) : ISIS.GME.Dsml.CyPhyML.Interfaces.Component
CopyDirectory ( string sourcePath, string destPath ) : void
FindAVMComponent ( MgaProject project, string avmid, ISIS root ) : ISIS.GME.Dsml.CyPhyML.Interfaces.Component
FindCADModelObject ( ISIS.GME.Dsml.CyPhyML.Interfaces component ) : ISIS.GME.Dsml.CyPhyML.Interfaces.CADModel
FindConnector ( ISIS.GME.Dsml.CyPhyML.Interfaces compref, string guid ) : ISIS.GME.Dsml.CyPhyML.Interfaces.Connector
FindDatum ( ISIS.GME.Dsml.CyPhyML.Interfaces cadmodel, string name ) : ISIS.GME.Dsml.CyPhyML.Interfaces.CADDatum
GetComponentAssemblyByGuid ( MgaProject project, string componentAssemblyGuid ) : ISIS.GME.Dsml.CyPhyML.Interfaces.ComponentAssembly
GetComponentByAvmId ( MgaProject project, string avmId ) : ISIS.GME.Dsml.CyPhyML.Interfaces.Component
GetComponentNameByAnyId ( MgaProject project, string id ) : string
GetComponentRefInAssemblyById ( ISIS.GME.Dsml.CyPhyML.Interfaces root, string amalgamatedId ) : ISIS.GME.Dsml.CyPhyML.Interfaces.ComponentRef
GetComponentRefInAssemblyByIdWithoutFollowingReferences ( ISIS.GME.Dsml.CyPhyML.Interfaces root, string instanceId ) : ISIS.GME.Dsml.CyPhyML.Interfaces.ComponentRef
GetContainingAssemblies ( ISIS.GME.Dsml.CyPhyML.Interfaces component ) : IEnumerable

Gets ComponentAssemblys that contain component directly, or through references to ComponentAssemblys

GetImportedComponentsFolder ( MgaProject project ) : ISIS.GME.Dsml.CyPhyML.Interfaces.Components
GetProjectDir ( MgaProject project ) : string
GetResourceID ( ISIS.GME.Dsml.CyPhyML.Interfaces cadModel ) : String
IsCADResource ( ISIS.GME.Dsml.CyPhyML.Interfaces res ) : bool
IsComponent ( MgaObject obj ) : bool
IsComponentRef ( MgaObject obj ) : bool
IsValidComponentRef ( MgaObject obj ) : bool
SetCADModelTypesFromFilenames ( ISIS.GME.Dsml.CyPhyML.Interfaces c ) : void
SetOrCreateXmlAttribute ( XPathNavigator node, string localName, string namespaceURI, string value ) : void

Private Methods

Method Description
CollectComponentRefs ( List complist, ISIS.GME.Dsml.CyPhyML.Interfaces assembly ) : void
CollectComponents ( HashSet complist, ISIS.GME.Dsml.CyPhyML.Interfaces assembly ) : void
VisitAllComponentAssembly ( ISIS.GME.Dsml.CyPhyML.Interfaces root ) : IEnumerable
VisitComponentAssemblies ( MgaProject project ) : IEnumerable
VisitComponentsFolders ( MgaProject project ) : IEnumerable
stringRoughlyEqual ( string a, string b ) : bool

Method Details

CleanPath() public static method

public static CleanPath ( String path ) : String
path String
return String

CollectComponentRefsRecursive() public static method

public static CollectComponentRefsRecursive ( ISIS.GME.Dsml.CyPhyML.Interfaces assembly ) : List
assembly ISIS.GME.Dsml.CyPhyML.Interfaces
return List

CollectComponentsRecursive() public static method

public static CollectComponentsRecursive ( ISIS.GME.Dsml.CyPhyML.Interfaces assembly ) : HashSet
assembly ISIS.GME.Dsml.CyPhyML.Interfaces
return HashSet

CollectInstanceGUIDs() public static method

public static CollectInstanceGUIDs ( CyPhyML.ComponentRef>.Dictionary dict, string prefix, ISIS.GME.Dsml.CyPhyML.Interfaces assembly ) : void
dict CyPhyML.ComponentRef>.Dictionary
prefix string
assembly ISIS.GME.Dsml.CyPhyML.Interfaces
return void

CopyComponent() public static method

public static CopyComponent ( ISIS.GME.Dsml.CyPhyML.Interfaces original, bool createNewMgaComponent ) : ISIS.GME.Dsml.CyPhyML.Interfaces.Component
original ISIS.GME.Dsml.CyPhyML.Interfaces
createNewMgaComponent bool
return ISIS.GME.Dsml.CyPhyML.Interfaces.Component

CopyDirectory() public static method

public static CopyDirectory ( string sourcePath, string destPath ) : void
sourcePath string
destPath string
return void

FindAVMComponent() public static method

public static FindAVMComponent ( MgaProject project, string avmid, ISIS root ) : ISIS.GME.Dsml.CyPhyML.Interfaces.Component
project MgaProject
avmid string
root ISIS
return ISIS.GME.Dsml.CyPhyML.Interfaces.Component

FindCADModelObject() public static method

public static FindCADModelObject ( ISIS.GME.Dsml.CyPhyML.Interfaces component ) : ISIS.GME.Dsml.CyPhyML.Interfaces.CADModel
component ISIS.GME.Dsml.CyPhyML.Interfaces
return ISIS.GME.Dsml.CyPhyML.Interfaces.CADModel

FindConnector() public static method

public static FindConnector ( ISIS.GME.Dsml.CyPhyML.Interfaces compref, string guid ) : ISIS.GME.Dsml.CyPhyML.Interfaces.Connector
compref ISIS.GME.Dsml.CyPhyML.Interfaces
guid string
return ISIS.GME.Dsml.CyPhyML.Interfaces.Connector

FindDatum() public static method

public static FindDatum ( ISIS.GME.Dsml.CyPhyML.Interfaces cadmodel, string name ) : ISIS.GME.Dsml.CyPhyML.Interfaces.CADDatum
cadmodel ISIS.GME.Dsml.CyPhyML.Interfaces
name string
return ISIS.GME.Dsml.CyPhyML.Interfaces.CADDatum

GetComponentAssemblyByGuid() public static method

public static GetComponentAssemblyByGuid ( MgaProject project, string componentAssemblyGuid ) : ISIS.GME.Dsml.CyPhyML.Interfaces.ComponentAssembly
project MgaProject
componentAssemblyGuid string
return ISIS.GME.Dsml.CyPhyML.Interfaces.ComponentAssembly

GetComponentByAvmId() public static method

public static GetComponentByAvmId ( MgaProject project, string avmId ) : ISIS.GME.Dsml.CyPhyML.Interfaces.Component
project MgaProject
avmId string
return ISIS.GME.Dsml.CyPhyML.Interfaces.Component

GetComponentNameByAnyId() public static method

public static GetComponentNameByAnyId ( MgaProject project, string id ) : string
project MgaProject
id string
return string

GetComponentRefInAssemblyById() public static method

public static GetComponentRefInAssemblyById ( ISIS.GME.Dsml.CyPhyML.Interfaces root, string amalgamatedId ) : ISIS.GME.Dsml.CyPhyML.Interfaces.ComponentRef
root ISIS.GME.Dsml.CyPhyML.Interfaces
amalgamatedId string
return ISIS.GME.Dsml.CyPhyML.Interfaces.ComponentRef

GetComponentRefInAssemblyByIdWithoutFollowingReferences() public static method

public static GetComponentRefInAssemblyByIdWithoutFollowingReferences ( ISIS.GME.Dsml.CyPhyML.Interfaces root, string instanceId ) : ISIS.GME.Dsml.CyPhyML.Interfaces.ComponentRef
root ISIS.GME.Dsml.CyPhyML.Interfaces
instanceId string
return ISIS.GME.Dsml.CyPhyML.Interfaces.ComponentRef

GetContainingAssemblies() public static method

Gets ComponentAssemblys that contain component directly, or through references to ComponentAssemblys
public static GetContainingAssemblies ( ISIS.GME.Dsml.CyPhyML.Interfaces component ) : IEnumerable
component ISIS.GME.Dsml.CyPhyML.Interfaces
return IEnumerable

GetImportedComponentsFolder() public static method

public static GetImportedComponentsFolder ( MgaProject project ) : ISIS.GME.Dsml.CyPhyML.Interfaces.Components
project MgaProject
return ISIS.GME.Dsml.CyPhyML.Interfaces.Components

GetProjectDir() public static method

public static GetProjectDir ( MgaProject project ) : string
project MgaProject
return string

GetResourceID() public static method

public static GetResourceID ( ISIS.GME.Dsml.CyPhyML.Interfaces cadModel ) : String
cadModel ISIS.GME.Dsml.CyPhyML.Interfaces
return String

IsCADResource() public static method

public static IsCADResource ( ISIS.GME.Dsml.CyPhyML.Interfaces res ) : bool
res ISIS.GME.Dsml.CyPhyML.Interfaces
return bool

IsComponent() public static method

public static IsComponent ( MgaObject obj ) : bool
obj MgaObject
return bool

IsComponentRef() public static method

public static IsComponentRef ( MgaObject obj ) : bool
obj MgaObject
return bool

IsValidComponentRef() public static method

public static IsValidComponentRef ( MgaObject obj ) : bool
obj MgaObject
return bool

SetCADModelTypesFromFilenames() public static method

public static SetCADModelTypesFromFilenames ( ISIS.GME.Dsml.CyPhyML.Interfaces c ) : void
c ISIS.GME.Dsml.CyPhyML.Interfaces
return void

SetOrCreateXmlAttribute() public static method

public static SetOrCreateXmlAttribute ( XPathNavigator node, string localName, string namespaceURI, string value ) : void
node XPathNavigator
localName string
namespaceURI string
value string
return void