Skip to main content
Definition: LIBS/DotNetUtils/Phoenix.ModelCenter.PlugIn/NameSubstitutionFile.cs (line 19) Mapping of name substitutions. It is recommended that future work use a simple json or xml file format instead of this class. The file format is simple space or tab separated format with one item per line. Comment lines begin with hash (#). Each line should contain two fields. Blank lines are ignored. Inherits from:
  • Dictionary< string, string >

Members

Public functions

Function NameSubstitutionFile

Load from the location of an assembly. This will look for a file by the name of names.txt next to the location of the assembly. Will not work if the assembly is not loaded from a local file system. Parameters:
  • assembly: The assembly.
Parameters:
  • Assembly assembly
Return type:

Function NameSubstitutionFile

Load from the location of an assembly. Will not work if the assembly is not loaded from a local file system. Parameters:
  • assembly: The assembly.
  • fileName: The file name, which should be a relative path relative to the location of the assembly.
Parameters:
  • Assembly assembly
  • string fileName
Return type:

Function NameSubstitutionFile

Load from a path. Parameters:
  • path: The path to the file.
Parameters:
  • string path
Return type:

Function GetSubstitution

Get a substitution for the specified key; if none exists, the key is returned. Parameters:
  • key: The key to search for
Returns: The substitution to use, or the key if there is no substitution Parameters:
  • string key
Return type: string