C# Класс ACAT.Lib.Core.PanelManagement.PanelConfigMap

PanelConfigMap is an xml file that contains a mapping between the name of the class for the scanner and the name of the xml file that contains animation and other info for the scanner. By default, the name of the class is used as the name of the xml file, but using PanelConfigMap, the user can use it to map to any filename. This gives us a way to try out different animations for the same scanner.
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
AreEqual ( String panel1, String panel2 ) : bool

Checks if two scanners are the same

GetConfigFileForPanel ( String panelClass ) : String

Returns the name of the animation config file for the specified scanner

GetConfigFileForScreen ( Type type ) : String

Returns the config file for the specified Type that represents a scanner

GetPanelConfigMapEntry ( String panel ) : ACAT.Lib.Core.PanelManagement.PanelConfigMapEntry

Returns the config map for the specified scanner. Looks up the preferred config map first to see if there is a config entry that has been specifically configured for the scanner. If not, it looks up the map talbe

Load ( Assembly assembly ) : bool

Loads class Types from the specified assembly

Load ( IEnumerable extensionDirs ) : bool

Walks the directories specified in extensionDir, looks for DLL's, loads all the types and looks for Types that are derived from IPanel (which is all the scanners) and caches them

Приватные методы

Метод Описание
AddFormToCache ( System.Guid guid, Type type ) : void

Adds the specified Type to the cache keyed by the Guid.

CleanupOrphans ( ) : void

Cleans up the map tables of entries that are orphans. These are forms that don't have a corresponding animatinon file

GetFormId ( Type type ) : System.Guid

Gets the ACAT descriptor guid for the specifed Type

PanelConfigMap ( ) : System

Initializes a static instance of hte class

addToMapTable ( ACAT.Lib.Core.PanelManagement.PanelConfigMapEntry mapEntry ) : void

Adds the specified mapEntry object to the map table. Also looks up the map table if it already has the formID specified in the mapEntry and updates its config file name with the one in mapEntry

addTypeToCache ( Type type ) : void

Adds the specified type to the cache

findConfigFileByGuid ( System.Guid guid ) : String

Looks up the map table for the specified scanner guid and returns the animation config file

findConfigFileByType ( Type type ) : String

Looks up the map table for the speified Scanner Type and returns its animation config file name

findMapEntryInList ( String configName, IEnumerable list ) : ACAT.Lib.Core.PanelManagement.PanelConfigMapEntry

Finds the specified config file name in the list and returns the map entry object that has the file name

findMapEntryInMapTable ( String configName ) : ACAT.Lib.Core.PanelManagement.PanelConfigMapEntry

Looks up the map table for the specified animation config file and returns the map entry

load ( String dir, bool resursive = true ) : void

Walks the specified directory (rescursively) to look for files

loadTypesFromAssembly ( Assembly assembly ) : bool

Loads relevant types from the assembly and caches them

onDllFound ( String dllName ) : void

Found a DLL. Load the class Types of all the relevant classes from the DLL

onFileFound ( String file ) : void

Callback function for the directory walker that's invoked when a file is found. Checks the file is a dll or an xml file and handles them appropriately

onScreenConfigFileFound ( String configFileName ) : void

Found the panel config file. This is the xml file that contains a mapping of the name and guid of the scanner and the name of the animation file for the scanner, Parses the config file and populates the map table with info from the file.

onXmlFileFound ( String xmlFileName ) : void

Found an XML file. Store the complete path to the file to the location map table

removeMapEntry ( ACAT.Lib.Core.PanelManagement.PanelConfigMapEntry entryToRemove ) : void

Removes the specified map entry from the map table

updateFormTypeReferences ( System.Guid guid, Type type ) : void

Looks up the maptable, find entries that have the specified guid and updates the class Type to the specified type

Описание методов

AreEqual() публичный статический Метод

Checks if two scanners are the same
public static AreEqual ( String panel1, String panel2 ) : bool
panel1 String first scanner
panel2 String scanner to compare
Результат bool

GetConfigFileForPanel() публичный статический Метод

Returns the name of the animation config file for the specified scanner
public static GetConfigFileForPanel ( String panelClass ) : String
panelClass String scanner name/class
Результат String

GetConfigFileForScreen() публичный статический Метод

Returns the config file for the specified Type that represents a scanner
public static GetConfigFileForScreen ( Type type ) : String
type System.Type Type of the scanner
Результат String

GetPanelConfigMapEntry() публичный статический Метод

Returns the config map for the specified scanner. Looks up the preferred config map first to see if there is a config entry that has been specifically configured for the scanner. If not, it looks up the map talbe
public static GetPanelConfigMapEntry ( String panel ) : ACAT.Lib.Core.PanelManagement.PanelConfigMapEntry
panel String Name of the scanner
Результат ACAT.Lib.Core.PanelManagement.PanelConfigMapEntry

Load() публичный статический Метод

Loads class Types from the specified assembly
public static Load ( Assembly assembly ) : bool
assembly System.Reflection.Assembly Assembly to load from
Результат bool

Load() публичный статический Метод

Walks the directories specified in extensionDir, looks for DLL's, loads all the types and looks for Types that are derived from IPanel (which is all the scanners) and caches them
public static Load ( IEnumerable extensionDirs ) : bool
extensionDirs IEnumerable Directories to look
Результат bool