C# Class csscript.Settings

Settings is an class that holds CS-Script application settings.
Datei anzeigen Open project: oleg-shilo/cs-script Class Usage Examples

Private Properties

Property Type Description
InitDefaultRefAssemblies string

Public Methods

Method Description
AddSearchDir ( string dir ) : void

Add search directory to the search (probing) path Settings.SearchDirs. For example if Settings.SearchDirs = "c:\scripts" then after call Settings.AddSearchDir("c:\temp") Settings.SearchDirs is "c:\scripts;c:\temp"

ExpandCleanupShellCommand ( ) : string

Returns value of the CleanupShellCommand (with expanding environment variables).

ExpandDefaultRefAssemblies ( ) : string

Returns value of the DefaultRefAssemblies (with expanding environment variables).

ExpandUseAlternativeCompiler ( ) : string

Returns value of the UseAlternativeCompiler (with expanding environment variables).

ExpandUsePostProcessor ( ) : string

Returns value of the UsePostProcessor (with expanding environment variables).

Load ( string fileName ) : Settings

Loads CS-Script application settings from a file. Default settings object is returned if it cannot be loaded from the file.

Load ( string fileName, bool createAlways ) : Settings

Loads CS-Script application settings from a file.

Save ( string fileName ) : void

Saves CS-Script application settings to a file (.dat).

Private Methods

Method Description
InitDefaultRefAssemblies ( ) : string

Method Details

AddSearchDir() public method

Add search directory to the search (probing) path Settings.SearchDirs. For example if Settings.SearchDirs = "c:\scripts" then after call Settings.AddSearchDir("c:\temp") Settings.SearchDirs is "c:\scripts;c:\temp"
public AddSearchDir ( string dir ) : void
dir string Directory path.
return void

ExpandCleanupShellCommand() public method

Returns value of the CleanupShellCommand (with expanding environment variables).
public ExpandCleanupShellCommand ( ) : string
return string

ExpandDefaultRefAssemblies() public method

Returns value of the DefaultRefAssemblies (with expanding environment variables).
public ExpandDefaultRefAssemblies ( ) : string
return string

ExpandUseAlternativeCompiler() public method

Returns value of the UseAlternativeCompiler (with expanding environment variables).
public ExpandUseAlternativeCompiler ( ) : string
return string

ExpandUsePostProcessor() public method

Returns value of the UsePostProcessor (with expanding environment variables).
public ExpandUsePostProcessor ( ) : string
return string

Load() public static method

Loads CS-Script application settings from a file. Default settings object is returned if it cannot be loaded from the file.
public static Load ( string fileName ) : Settings
fileName string File name of the XML file
return Settings

Load() public static method

Loads CS-Script application settings from a file.
public static Load ( string fileName, bool createAlways ) : Settings
fileName string File name of the XML file
createAlways bool Create and return default settings object if it cannot be loaded from the file.
return Settings

Save() public method

Saves CS-Script application settings to a file (.dat).
public Save ( string fileName ) : void
fileName string File name of the .dat file
return void