IGLib 1.4
The IGLib base library for development of numerical, technical and business applications.

IG::Lib::UtilSystem Class Reference

General utilities. More...

List of all members.

Static Public Member Functions

static void SetUsername (string username)
 Sets name of the current user. This method is provided to enable testing code under another user name. Setting to null anihilates effect of previous calls. After call to this method, user name can be set to null in order to retrieve the true user logged in for subsequent operations.Warning: you should use this only exceptionally, e.g. for testing, and only in testing or demo sections of code.
static string GetComputerName ()
 Returns name of the computer on which application is running.
static string GetMacAddressFastest ()
 Returns the MAC address of the network interface card with maximal speed. The returned string represents hexadecimal MAC address without ':', '-' or other punctation marks.
static string GetIpAddressLocal ()
 Returns the current local IP address of computer.
static string GetUserDomainName ()
 Returns the domain name associated with the current user.
static string GetDomainName ()
 Returns the network domain name associated with the current user.
static string GetSystemInfoString ()
 Returns a string containing basic system information - name of the current user, computer name, domain name, IP address, MAC address, and runtime version.
static string GetRuntimeVersionString ()
 Gets the version of the runtime on which the current application executes.
static Process ExecuteSystemCommand (string command, params string[] args)
 Executes system command with arguments synchronously (blocks until the process that is created exits).
static Process ExecuteSystemCommandAsync (string command, params string[] args)
 Executes system command with arguments asynchronously (returns immediately and does not wait for the process to complete).
static Process ExecuteSystemCommand (bool asynchronous, string command, params string[] args)
 Executes system command with arguments.
static Process ExecuteSystemCommand (string workingDirectory, bool asynchronous, string command, params string[] args)
 Executes system command with arguments.
static Process ExecuteSystemCommand (string workingDirectory, bool asynchronous, bool useShell, string command, params string[] args)
 Executes system command with arguments.
static Process ExecuteSystemCommand (string workingDirectory, bool asynchronous, bool useShell, bool createNoWindow, string redirectedOutputPath, bool redirectStandardOutput, string command, params string[] args)
 Executes system command with arguments.
static void OpenFileInDefaultBrowser (string filePath)
 Opens the specified file in the system's default browser.
static void OpenUrlInDefaultBrowser (string url)
 Upens the specified URL (Unique Resource locator, e.g. a web address) in the default browser.
static void GetAllProcesses (ref List< Process > processList)
 Gets all runnning processes, and puts them to the specified list.
static void GetProcesses (string processName, ref List< Process > processList)
 Gets all processes with the specified name, and puts them to tehe specified list.
static void GetProcesses (string processName, bool caseSensitive, ref List< Process > processList)
 Gets all processes with the specified name, and puts them to tehe specified list.
static void GetProcesses (string processName, bool caseSensitive, bool isFullString, ref List< Process > processList)
 Gets all processes with the specified name, and puts them to tehe specified list.
static bool IsProcessRunning (string processName)
 Returns true if at least one process with the specified name is running, false otherwise.
static bool IsProcessRunning (string processName, bool caseSensitive)
 Returns true if at least one process with the specified name is running, false otherwise.
static bool IsProcessRunning (string processName, bool isFullString, bool caseSensitive)
 Returns true if at least one process with the specified name is running, false otherwise.
static void KillFirstProcess (string processName)
 Kills the first running process found that has the specified process name. Nothing happens if there are no such processes running. Exceptions are cought and eventually reported on console if the OutputLevel >= 1.
static void KillFirstProcess (string processName, bool caseSensitive)
 Kills the first running process found that has the specified process name. Nothing happens if there are no such processes running. Exceptions are cought and eventually reported on console if the OutputLevel >= 1.
static void KillFirstProcess (string processName, bool caseSensitive, bool isFullString)
 Kills the first running process found that has the specified process name. Nothing happens if there are no such processes running. Exceptions are cought and eventually reported on console if the OutputLevel >= 1.
static void KillAllProcesses (string processName)
 Kills all running process have the specified process name. Nothing happens if there are no such processes running. Exceptions are cought and eventually reported on console if the OutputLevel >= 1.
static void KillAllProcesses (string processName, bool caseSensitive)
 Kills all running processes that have the specified process name. Nothing happens if there are no such processes running. Exceptions are cought and eventually reported on console if the OutputLevel >= 1.
static void KillAllProcesses (string processName, bool isFullString, bool caseSensitive)
 Kills all running processes that have the specified process name. Nothing happens if there are no such processes running. Exceptions are cought and eventually reported on console if the OutputLevel >= 1.
static void GetAllApplications (ref List< Process > processList)
 Gets all runnning applications, and puts them to the specified list. Applications are regarded all processes with visible main window and window title defined.
static void GetApplications (string processName, ref List< Process > processList)
 Gets all applications with the specified process name, and puts them to the specified list. Applications are regarded all processes with visible main window and window title defined.
static void GetApplications (string processName, bool caseSensitive, ref List< Process > processList)
 Gets all applications with the specified proces name, and puts them to tehe specified list. Applications are regarded all processes with visible main window and window title defined.
static void GetApplications (string processName, bool caseSensitive, bool isFullString, ref List< Process > processList)
 Gets all applications with the specified proces name, and puts them to tehe specified list. Applications are regarded all processes with visible main window and window title defined.
static bool IsApplicationRunning (string processName)
 Returns true if at least one application with the specified process name is running, false otherwise. Applications are regarded all processes with visible main window and window title defined.
static bool IsApplicationRunning (string processName, bool caseSensitive)
 Returns true if at least one application with the specified process name is running, false otherwise. Applications are regarded all processes with visible main window and window title defined.
static bool IsApplicationRunning (string processName, bool caseSensitive, bool isFullString)
 Returns true if at least one application with the specified process name is running, false otherwise. Applications are regarded all processes with visible main window and window title defined.
static void KillFirstApplication (string processName)
 Kills the first running application found that has the specified process name. Applications are regarded all processes with visible main window and window title defined.Nothing happens if there are no such processes running. Exceptions are cought and eventually reported on console if the OutputLevel >= 1.
static void KillFirstApplication (string processName, bool caseSensitive)
 Kills the first running application found that has the specified process name. Applications are regarded all processes with visible main window and window title defined.Nothing happens if there are no such processes running. Exceptions are cought and eventually reported on console if the OutputLevel >= 1.
static void KillFirstApplication (string processName, bool caseSensitive, bool isFullString)
 Kills the first running application found that has the specified process name. Applications are regarded all processes with visible main window and window title defined.Nothing happens if there are no such processes running. Exceptions are cought and eventually reported on console if the OutputLevel >= 1.
static void KillAllApplications (string processName)
 Kills the all running applications that has the specified process name. Applications are regarded all processes with visible main window and window title defined.Nothing happens if there are no such processes running. Exceptions are cought and eventually reported on console if the OutputLevel >= 1.
static void KillAllApplications (string processName, bool caseSensitive)
 Kills all running applications that have the specified process name. Applications are regarded all processes with visible main window and window title defined.Nothing happens if there are no such processes running. Exceptions are cought and eventually reported on console if the OutputLevel >= 1.
static void KillAllApplications (string processName, bool caseSensitive, bool isFullString)
 Kills all running applications that have the specified process name. Applications are regarded all processes with visible main window and window title defined.Nothing happens if there are no such processes running. Exceptions are cought and eventually reported on console if the OutputLevel >= 1.
static void GetApplicationsByWindowTitle (string mainWindowTitle, ref List< Process > processList)
 Gets all applications with the specified main window title, and puts them to the specified list. Applications are regarded all processes with visible main window and window title defined.
static void GetApplicationsByWindowTitle (string mainWindowTitle, bool caseSensitive, ref List< Process > processList)
 Gets all applications with the specified main window title, and puts them to tehe specified list. Applications are regarded all processes with visible main window and window title defined.
static void GetApplicationsByWindowTitle (string mainWindowTitle, bool caseSensitive, bool isFullString, ref List< Process > processList)
 Gets all applications with the specified main window title, and puts them to tehe specified list. Applications are regarded all processes with visible main window and window title defined.
static bool IsApplicationRunningByWindowTitle (string mainWindowTitle)
 Returns true if at least one application with the specified main window title is running, false otherwise. Applications are regarded all processes with visible main window and window title defined.
static bool IsApplicationRunningByWindowTitle (string mainWindowTitle, bool caseSensitive)
 Returns true if at least one application with the specified main window title is running, false otherwise. Applications are regarded all processes with visible main window and window title defined.
static bool IsApplicationRunningByWindowTitle (string mainWindowTitle, bool caseSensitive, bool isFullString)
 Returns true if at least one application with the specified main window title is running, false otherwise. Applications are regarded all processes with visible main window and window title defined.
static void KillFirstApplicationByWindowTitle (string mainWindowTitle)
 Kills the first running application found that has the specified main window title. Applications are regarded all processes with visible main window and window title defined.Nothing happens if there are no such processes running. Exceptions are cought and eventually reported on console if the OutputLevel >= 1.
static void KillFirstApplicationByWindowTitle (string mainWindowTitle, bool caseSensitive)
 Kills the first running application found that has the specified main window title. Applications are regarded all processes with visible main window and window title defined.Nothing happens if there are no such processes running. Exceptions are cought and eventually reported on console if the OutputLevel >= 1.
static void KillFirstApplicationByWindowTitle (string mainWindowTitle, bool caseSensitive, bool isFullString)
 Kills the first running application found that has the specified main window title. Applications are regarded all processes with visible main window and window title defined.Nothing happens if there are no such processes running. Exceptions are cought and eventually reported on console if the OutputLevel >= 1.
static void KillAllApplicationsByWindowTitle (string mainWindowTitle)
 Kills the all running applications that has the specified main window title. Applications are regarded all processes with visible main window and window title defined.Nothing happens if there are no such processes running. Exceptions are cought and eventually reported on console if the OutputLevel >= 1.
static void KillAllApplicationsByWindowTitle (string mainWindowTitle, bool caseSensitive)
 Kills all running applications that have the specified main window title. Applications are regarded all processes with visible main window and window title defined.Nothing happens if there are no such processes running. Exceptions are cought and eventually reported on console if the OutputLevel >= 1.
static void KillAllApplicationsByWindowTitle (string mainWindowTitle, bool caseSensitive, bool isFullString)
 Kills all running applications that have the specified main window title. Applications are regarded all processes with visible main window and window title defined.Nothing happens if there are no such processes running. Exceptions are cought and eventually reported on console if the OutputLevel >= 1.
static ThreadPriority ProcessToThreadPriority (ProcessPriorityClass processPriority)
 Converts the specified ProcessPriorityClass enum value to the approcimately equivalent ThreadPriority value and returns it.
static ProcessPriorityClass ThreadToProcessPriority (ThreadPriority threadPriority)
 Converts the specified ThreadPriority enum value to the approcimately equivalent ProcessPriorityClass value and returns it.
static ThreadPriority GetThreadPriorityFromProcess ()
 Returns the thread priority value that is equivallent to the current process' priority class.
static void UpdateThreadPriorityFromProcess ()
 Updates the global thread priority (the UtilSystem.ThreadPriority property ) in such a way that it is the same as the current process priority. If the priority is changed by this call then the event handlers are also executed (the delegate UtilSystem.OnThreadPriorityChange is called).
static void OnThreadPriorityChange ()
 This delegate is called when the global thread priority changes (property UtilSystem.ThreadPriority), but can also be called manually.
static void AddOnThreadPriorityChange (ThreadStart onPriorityChangeMethod)
 Adds the specified method that is executed when the global thread priority changes.
static void RemoveOnThreadPriorityChange (ThreadStart onPriorityChangeMethod)
 Removes the specified method that is executed when the global thread priority changes.
static string GetWorkspaceDirectoryPath ()
 Returns the workspace directory, which is primarily located through the environment variable contained in WorkspaceDirectoryEnvironmentVar (usually named WORKSPACE). If the workspace directory can not be located then nulll is returned.Workspace directory is base directory for code development.
static string GetWorkspacePath (string relativePath)
 Returns a complete path of a file or directory specified by a relative path to the workspace directory, or null if the workspace directory can not be located. The workspace directory is obtained by calling the GetWorkspaceDirectoryPath method.
static string GetWorkspaceProjectsDirectoryPath ()
 Returns the workspace projects directory, which is primarily located through the workspace directory (returned by the GetWorkspaceDirectoryPath method) as a directory located in the same directory and named WorkspaceProjectsDirName. Workspace projects directory is base directory for various project data.
static string GetWorkspaceProjectsPath (string relativePath)
 Returns a complete path of a file or directory specified by a relative path to the workspace projects directory, or null if the workspace projects directory can not be located. The workspace projects directory is obtained by calling the GetWorkspaceDirectoryPath method.
static string GetExecutableDirectory ()
 Returns the directory containing the executable that started the current application.
static string GetStandardizedDirectoryPath (string directoryPath)
 Returns the specified directory path in standard form (absolute path, system's path separator, ended with path separator). This method should always result in the same string for the same directory (regardles of the original form), therefore it is useful e.g. for naming a mutex used for locking access to a directory.
static void StandardizeDirectoryPath (ref string directoryPath)
 Converts the specified path to standard form (absolute path, system's path separator, ended with path separator). This method should always result in the same string for the same directory (regardles of the original form), therefore it is useful e.g. for naming a mutex used for locking access to a directory.
static void SetCurrentDirectory (string directoryPath)
 Changes directory to the specified directory.
static string GetRelativePath (string fromPath, string toPath)
 Calculates and returns relativa path from one path to another. WARNING: First path (with respect to this relative path is calculated) must be a directory path!
static void ExampleRelativePath ()
 Tests calculation.
static void CopyDirectory (string sourceDirectoryPath, string targetDirectoryPath)
 Recursively copies contents of the source directory to the target directory.
static void CopyRecursive (DirectoryInfo source, DirectoryInfo target)
 Recursively copies contents of the source directory to the target directory.
static void CopyDirectorySafe (string sourceDirectoryPath, string targetDirectoryPath, out int numErrors, out string errorsString)
 Recursively copies contents of the source directory to the target directory. Fail safe variant, does not throw exceptions and does not break execution when any individual basic operation fails.
static void CopyRecursiveSafe (DirectoryInfo source, DirectoryInfo target, ref int numErrors, ref string errorsString)
 Recursively copies contents of the source directory to the target directory. Fail safe variant, does not throw exceptions and does not break execution when any individual basic operation fails.
static string CreateTestdirectoryStructure (string baseDirPath, string rootDirName)
 Creates a test directory structure for testing operatios such as recursive copying. Returns path of the created directory structure, or null if something is wrong.
static void ExampleCopyDir ()
 Examp.

Properties

static int OutputLevel [get, set]
 Gets or sets the level of output for some operations of this class. When accessed for the first time, the current value of Util.OutputLevel is returned.If set to less than 0 then the first subsequent set access will return the current the current value of Util.OutputLevel.
static bool UserNameNotRetrieved [get]
 Whether user name has already been retrieved ans stored.
static string UserName [get]
 Gets name of the current user.
static string UserNameLowerCase [get]
 Gets name of the current user with all letters converted to lower case (in order to avoid ambiguities).
static bool IsUserIgor [get]
 Returns true if the current user logged on the computer is Igor, or false otherwise.
static bool IsUserTadej [get]
 Returns true if the current user logged on the computer is Tadej, or false otherwise.
static bool IsWindowsOs [get]
 Returns true if the operating system is a Windows variant, false otherwise.
static bool IsLinuxOs [get]
 Returns true if the operating system is a Linux variant, false otherwise.
static bool IsMaxOs [get]
 Returns true if the operating system is a MacOs variant, false otherwise.
static bool DynamicThreadPriority [get, set]
 Whether the ThreadPriority property should be obtained dynamically from the process priority each time its getter is called, or the value that is set should be used until it is not changed explicitly. Default is true.By setting the ThreadPriority property, this flag is automatically set to false.
static ThreadPriority ThreadPriority [get, set]
 Global thread priority. Gets or sets priority that should be given to the newly created threads that use this instrument.If the DynamicThreadPriority property is set to true then each time the getter is called, the value of the property will be obtained anew from the process priority class. Otherwise, the value that has been set last is used.Setting the property value will automatically set the DynamicThreadPriority to false.

Static Private Member Functions

static void RetrieveUserName ()
 Retrieves and stores information about current user name.
static void DetectOs ()
 Detects operating system.
static string GetRepairedDirectoryPath (string directoryPath)
 Repairs the specified directory path, if applicable, and returns the repaired directory path. If the specified path ends with directory separator then the last character is removed.
static void RepairDirectoryPath (ref string directoryPath)
 Repairs the specified directory path, if applicable. If the specified path ends with directory separator then the last character is removed.

Private Attributes

const string WorkspaceDirectoryEnvironmentVar = "WORKSPACE"
const string WorkspaceProjectsDirectoryEnvironmentVar = "WORKSPACEPROJECTS"
const string WorkspaceProjectsDirName = "workspaceprojects"

Static Private Attributes

static int _outputLevel = 0
static string _userName = null
static string _userNameLowerCase = null
static bool _isOsDetected = false
static bool _isWindowsOs = false
static bool _isLinuxOs = false
static bool _isMacOs = false
static bool _dynamicThreadPriority = true
static ThreadPriority _threadPriority = ProcessToThreadPriority(Process.GetCurrentProcess().PriorityClass)
static ThreadStart _onThreadPriorityChange

Detailed Description

General utilities.

$A Igor Apr10;


Member Function Documentation

static void IG::Lib::UtilSystem::RetrieveUserName ( ) [inline, static, private]

Retrieves and stores information about current user name.

static void IG::Lib::UtilSystem::SetUsername ( string  username) [inline, static]

Sets name of the current user. This method is provided to enable testing code under another user name. Setting to null anihilates effect of previous calls. After call to this method, user name can be set to null in order to retrieve the true user logged in for subsequent operations.Warning: you should use this only exceptionally, e.g. for testing, and only in testing or demo sections of code.

Parameters:
usernameName of the user to be set. Null annihilates previous calls and causes that system provided user name is returned by subsequent queries.
static string IG::Lib::UtilSystem::GetComputerName ( ) [inline, static]

Returns name of the computer on which application is running.

static string IG::Lib::UtilSystem::GetMacAddressFastest ( ) [inline, static]

Returns the MAC address of the network interface card with maximal speed. The returned string represents hexadecimal MAC address without ':', '-' or other punctation marks.

static string IG::Lib::UtilSystem::GetIpAddressLocal ( ) [inline, static]

Returns the current local IP address of computer.

static string IG::Lib::UtilSystem::GetUserDomainName ( ) [inline, static]

Returns the domain name associated with the current user.

Returns:
static string IG::Lib::UtilSystem::GetDomainName ( ) [inline, static]

Returns the network domain name associated with the current user.

Returns:
static string IG::Lib::UtilSystem::GetSystemInfoString ( ) [inline, static]

Returns a string containing basic system information - name of the current user, computer name, domain name, IP address, MAC address, and runtime version.

Returns:
static void IG::Lib::UtilSystem::DetectOs ( ) [inline, static, private]

Detects operating system.

static string IG::Lib::UtilSystem::GetRuntimeVersionString ( ) [inline, static]

Gets the version of the runtime on which the current application executes.

static Process IG::Lib::UtilSystem::ExecuteSystemCommand ( string  command,
params string[]  args 
) [inline, static]

Executes system command with arguments synchronously (blocks until the process that is created exits).

Parameters:
commandCommand string, usually a path to executable or other type of command.
argsArguments to system command.
static Process IG::Lib::UtilSystem::ExecuteSystemCommandAsync ( string  command,
params string[]  args 
) [inline, static]

Executes system command with arguments asynchronously (returns immediately and does not wait for the process to complete).

Parameters:
commandCommand string, usually a path to executable or other type of command.
argsArguments to system command.
static Process IG::Lib::UtilSystem::ExecuteSystemCommand ( bool  asynchronous,
string  command,
params string[]  args 
) [inline, static]

Executes system command with arguments.

Parameters:
asynchronousIf true then the system command is executed asynchronously (the method returns immediately, and the caller can wait for the executed process by calling WaitForExit() on the returned object). If false then method blocks until the process completes.
commandCommand string, usually a path to executable or other type of command.
argsArguments to system command.
Returns:
Process object that can be used to access and manimulate the process that has been executed by this method.
static Process IG::Lib::UtilSystem::ExecuteSystemCommand ( string  workingDirectory,
bool  asynchronous,
string  command,
params string[]  args 
) [inline, static]

Executes system command with arguments.

Parameters:
workingDirectoryWorking directory of the process that is run. If null or empty string then working sirectory is not specified (the current working directory is used).
asynchronousIf true then the system command is executed asynchronously (the method returns immediately, and the caller can wait for the executed process by calling WaitForExit() on the returned object). If false then method blocks until the process completes.
commandCommand string, usually a path to executable or other type of command.
argsArguments to system command.
Returns:
Process object that can be used to access and manimulate the process that has been executed by this method.
static Process IG::Lib::UtilSystem::ExecuteSystemCommand ( string  workingDirectory,
bool  asynchronous,
bool  useShell,
string  command,
params string[]  args 
) [inline, static]

Executes system command with arguments.

Parameters:
workingDirectoryWorking directory of the process that is run. If null or empty string then working sirectory is not specified (the current working directory is used).
asynchronousIf true then the system command is executed asynchronously (the method returns immediately, and the caller can wait for the executed process by calling WaitForExit() on the returned object). If false then method blocks until the process completes.
useShellWhether to use the command shell (open in a new window) for execution.
commandCommand string, usually a path to executable or other type of command.
argsArguments to system command.
Returns:
Process object that can be used to access and manimulate the process that has been executed by this method.
static Process IG::Lib::UtilSystem::ExecuteSystemCommand ( string  workingDirectory,
bool  asynchronous,
bool  useShell,
bool  createNoWindow,
string  redirectedOutputPath,
bool  redirectStandardOutput,
string  command,
params string[]  args 
) [inline, static]

Executes system command with arguments.

Parameters:
workingDirectoryWorking directory of the process that is run. If null or empty string then working sirectory is not specified (the current working directory is used).
asynchronousIf true then the system command is executed asynchronously (the method returns immediately, and the caller can wait for the executed process by calling WaitForExit() on the returned object). If false then method blocks until the process completes.
useShellWhether to use the command shell (open in a new window) for execution.
createNoWindowIf true then window is not created.
redirectedOutputPathPath to the file where standard output is redirected (null means that output is not redirected to a file).
redirectStandardOutputWhether standard output is redirected (in this case, there will be no output to the console). Enables suppressing output to console without redirecting it to a specified file.
commandCommand string, usually a path to executable or other type of command.
argsArguments to system command.
Returns:
Process object that can be used to access and manimulate the process that has been executed by this method.
static void IG::Lib::UtilSystem::OpenFileInDefaultBrowser ( string  filePath) [inline, static]

Opens the specified file in the system's default browser.

Parameters:
filePathPath of the file to be opened.
static void IG::Lib::UtilSystem::OpenUrlInDefaultBrowser ( string  url) [inline, static]

Upens the specified URL (Unique Resource locator, e.g. a web address) in the default browser.

static void IG::Lib::UtilSystem::GetAllProcesses ( ref List< Process >  processList) [inline, static]

Gets all runnning processes, and puts them to the specified list.

Parameters:
processListList on which the processes are put. If nul then it is allocated first. If not empty then it is cleared firts.
static void IG::Lib::UtilSystem::GetProcesses ( string  processName,
ref List< Process >  processList 
) [inline, static]

Gets all processes with the specified name, and puts them to tehe specified list.

Parameters:
processNameName of the processes to be put on the list. Name is case sensitive.
processListList on which the processes matching the name are put. If nul then it is allocated first. If not empty then it is cleared firts.
static void IG::Lib::UtilSystem::GetProcesses ( string  processName,
bool  caseSensitive,
ref List< Process >  processList 
) [inline, static]

Gets all processes with the specified name, and puts them to tehe specified list.

Parameters:
processNameName of the processes to be put on the list.
caseSensitiveWhether name is case sensitive.
processListList on which the processes matching the name are put. If nul then it is allocated first. If not empty then it is cleared firts.
static void IG::Lib::UtilSystem::GetProcesses ( string  processName,
bool  caseSensitive,
bool  isFullString,
ref List< Process >  processList 
) [inline, static]

Gets all processes with the specified name, and puts them to tehe specified list.

Parameters:
processNameName of the processes to be put on the list.
caseSensitiveWhether name is case sensitive.
isFullStringWhether the processName is a full process name (if false, it can be only its substring).
processListList on which the processes matching the name are put. If nul then it is allocated first. If not empty then it is cleared firts.
static bool IG::Lib::UtilSystem::IsProcessRunning ( string  processName) [inline, static]

Returns true if at least one process with the specified name is running, false otherwise.

Parameters:
processNameName of the process for which we check whether it is running. Name is case sensitive.
Returns:
True if at least one process with the specified name is running, false otherwise.
static bool IG::Lib::UtilSystem::IsProcessRunning ( string  processName,
bool  caseSensitive 
) [inline, static]

Returns true if at least one process with the specified name is running, false otherwise.

Parameters:
processNameName of the process for which we check whether it is running.
caseSensitiveWhether process name is case sensitive.
Returns:
True if at least one process with the specified name is running, false otherwise.
static bool IG::Lib::UtilSystem::IsProcessRunning ( string  processName,
bool  isFullString,
bool  caseSensitive 
) [inline, static]

Returns true if at least one process with the specified name is running, false otherwise.

Parameters:
processNameName of the process for which we check whether it is running.
caseSensitiveWhether process name is case sensitive.
isFullStringWhether the processName is a full process name (if false, it can be only its substring).
Returns:
True if at least one process with the specified name is running, false otherwise.
static void IG::Lib::UtilSystem::KillFirstProcess ( string  processName) [inline, static]

Kills the first running process found that has the specified process name. Nothing happens if there are no such processes running. Exceptions are cought and eventually reported on console if the OutputLevel >= 1.

Parameters:
processNameName of the process to be killed. Name is case sensitive.
static void IG::Lib::UtilSystem::KillFirstProcess ( string  processName,
bool  caseSensitive 
) [inline, static]

Kills the first running process found that has the specified process name. Nothing happens if there are no such processes running. Exceptions are cought and eventually reported on console if the OutputLevel >= 1.

Parameters:
processNameName of the process for which we check whether it is running.
caseSensitiveWhether process name is case sensitive.
static void IG::Lib::UtilSystem::KillFirstProcess ( string  processName,
bool  caseSensitive,
bool  isFullString 
) [inline, static]

Kills the first running process found that has the specified process name. Nothing happens if there are no such processes running. Exceptions are cought and eventually reported on console if the OutputLevel >= 1.

Parameters:
processNameName of the process for which we check whether it is running.
caseSensitiveWhether process name is case sensitive.
isFullStringWhether the processName is a full process name (if false, it can be only its substring).
static void IG::Lib::UtilSystem::KillAllProcesses ( string  processName) [inline, static]

Kills all running process have the specified process name. Nothing happens if there are no such processes running. Exceptions are cought and eventually reported on console if the OutputLevel >= 1.

Parameters:
processNameName of the process to be killed. Name is case sensitive.
static void IG::Lib::UtilSystem::KillAllProcesses ( string  processName,
bool  caseSensitive 
) [inline, static]

Kills all running processes that have the specified process name. Nothing happens if there are no such processes running. Exceptions are cought and eventually reported on console if the OutputLevel >= 1.

Parameters:
processNameName of the process for which we check whether it is running.
caseSensitiveWhether process name is case sensitive.
static void IG::Lib::UtilSystem::KillAllProcesses ( string  processName,
bool  isFullString,
bool  caseSensitive 
) [inline, static]

Kills all running processes that have the specified process name. Nothing happens if there are no such processes running. Exceptions are cought and eventually reported on console if the OutputLevel >= 1.

Parameters:
processNameName of the process for which we check whether it is running.
caseSensitiveWhether process name is case sensitive.
isFullStringWhether the processName is a full process name (if false, it can be only its substring).
static void IG::Lib::UtilSystem::GetAllApplications ( ref List< Process >  processList) [inline, static]

Gets all runnning applications, and puts them to the specified list. Applications are regarded all processes with visible main window and window title defined.

Parameters:
processListList on which the processes are put. If nul then it is allocated first. If not empty then it is cleared firts.
static void IG::Lib::UtilSystem::GetApplications ( string  processName,
ref List< Process >  processList 
) [inline, static]

Gets all applications with the specified process name, and puts them to the specified list. Applications are regarded all processes with visible main window and window title defined.

Parameters:
processNameName of the processes to be put on the list. Name is case sensitive.
processListList on which the application processes matching the name are put. If nul then it is allocated first. If not empty then it is cleared firts.
static void IG::Lib::UtilSystem::GetApplications ( string  processName,
bool  caseSensitive,
ref List< Process >  processList 
) [inline, static]

Gets all applications with the specified proces name, and puts them to tehe specified list. Applications are regarded all processes with visible main window and window title defined.

Parameters:
processNameName of the processes to be put on the list.
caseSensitiveWhether name is case sensitive.
processListList on which the application processes matching the name are put. If nul then it is allocated first. If not empty then it is cleared firts.
static void IG::Lib::UtilSystem::GetApplications ( string  processName,
bool  caseSensitive,
bool  isFullString,
ref List< Process >  processList 
) [inline, static]

Gets all applications with the specified proces name, and puts them to tehe specified list. Applications are regarded all processes with visible main window and window title defined.

Parameters:
processNameName of the processes to be put on the list.
caseSensitiveWhether name is case sensitive.
isFullStringWhether the processName is a full name (if false, it can be only a substring of the process name).
processListList on which the application processes matching the name are put. If nul then it is allocated first. If not empty then it is cleared firts.
static bool IG::Lib::UtilSystem::IsApplicationRunning ( string  processName) [inline, static]

Returns true if at least one application with the specified process name is running, false otherwise. Applications are regarded all processes with visible main window and window title defined.

Parameters:
processNameName of the process for which we check whether it is running. Name is case sensitive.
Returns:
True if at least one process with the specified name is running, false otherwise.
static bool IG::Lib::UtilSystem::IsApplicationRunning ( string  processName,
bool  caseSensitive 
) [inline, static]

Returns true if at least one application with the specified process name is running, false otherwise. Applications are regarded all processes with visible main window and window title defined.

Parameters:
processNameName of the process for which we check whether it is running.
caseSensitiveWhether process name is case sensitive.
Returns:
True if at least one process with the specified name is running, false otherwise.
static bool IG::Lib::UtilSystem::IsApplicationRunning ( string  processName,
bool  caseSensitive,
bool  isFullString 
) [inline, static]

Returns true if at least one application with the specified process name is running, false otherwise. Applications are regarded all processes with visible main window and window title defined.

Parameters:
processNameName of the process for which we check whether it is running.
caseSensitiveWhether process name is case sensitive.
isFullStringWhether the processName is a full name (if false, it can be only a substring of the process name).
Returns:
True if at least one process with the specified name is running, false otherwise.
static void IG::Lib::UtilSystem::KillFirstApplication ( string  processName) [inline, static]

Kills the first running application found that has the specified process name. Applications are regarded all processes with visible main window and window title defined.Nothing happens if there are no such processes running. Exceptions are cought and eventually reported on console if the OutputLevel >= 1.

Parameters:
processNameName of the process to be killed. Name is case sensitive.
static void IG::Lib::UtilSystem::KillFirstApplication ( string  processName,
bool  caseSensitive 
) [inline, static]

Kills the first running application found that has the specified process name. Applications are regarded all processes with visible main window and window title defined.Nothing happens if there are no such processes running. Exceptions are cought and eventually reported on console if the OutputLevel >= 1.

Parameters:
processNameName of the process for which we check whether it is running.
caseSensitiveWhether process name is case sensitive.
static void IG::Lib::UtilSystem::KillFirstApplication ( string  processName,
bool  caseSensitive,
bool  isFullString 
) [inline, static]

Kills the first running application found that has the specified process name. Applications are regarded all processes with visible main window and window title defined.Nothing happens if there are no such processes running. Exceptions are cought and eventually reported on console if the OutputLevel >= 1.

Parameters:
processNameName of the process for which we check whether it is running.
caseSensitiveWhether process name is case sensitive.
isFullStringWhether the processName is a full name (if false, it can be only a substring of the process name).
static void IG::Lib::UtilSystem::KillAllApplications ( string  processName) [inline, static]

Kills the all running applications that has the specified process name. Applications are regarded all processes with visible main window and window title defined.Nothing happens if there are no such processes running. Exceptions are cought and eventually reported on console if the OutputLevel >= 1.

Parameters:
processNameName of the process to be killed. Name is case sensitive.
static void IG::Lib::UtilSystem::KillAllApplications ( string  processName,
bool  caseSensitive 
) [inline, static]

Kills all running applications that have the specified process name. Applications are regarded all processes with visible main window and window title defined.Nothing happens if there are no such processes running. Exceptions are cought and eventually reported on console if the OutputLevel >= 1.

Parameters:
processNameName of the process for which we check whether it is running.
caseSensitiveWhether process name is case sensitive.
static void IG::Lib::UtilSystem::KillAllApplications ( string  processName,
bool  caseSensitive,
bool  isFullString 
) [inline, static]

Kills all running applications that have the specified process name. Applications are regarded all processes with visible main window and window title defined.Nothing happens if there are no such processes running. Exceptions are cought and eventually reported on console if the OutputLevel >= 1.

Parameters:
processNameName of the process for which we check whether it is running.
caseSensitiveWhether process name is case sensitive.
isFullStringWhether the processName is a full name (if false, it can be only a substring of the process name).
static void IG::Lib::UtilSystem::GetApplicationsByWindowTitle ( string  mainWindowTitle,
ref List< Process >  processList 
) [inline, static]

Gets all applications with the specified main window title, and puts them to the specified list. Applications are regarded all processes with visible main window and window title defined.

Parameters:
mainWindowTitleApplications' main window title. Name is case sensitive.
processListList on which the application processes matching the name are put. If nul then it is allocated first. If not empty then it is cleared firts.
static void IG::Lib::UtilSystem::GetApplicationsByWindowTitle ( string  mainWindowTitle,
bool  caseSensitive,
ref List< Process >  processList 
) [inline, static]

Gets all applications with the specified main window title, and puts them to tehe specified list. Applications are regarded all processes with visible main window and window title defined.

Parameters:
mainWindowTitleApplications' main window title.
caseSensitiveWhether name is case sensitive.
processListList on which the application processes matching the name are put. If nul then it is allocated first. If not empty then it is cleared firts.
static void IG::Lib::UtilSystem::GetApplicationsByWindowTitle ( string  mainWindowTitle,
bool  caseSensitive,
bool  isFullString,
ref List< Process >  processList 
) [inline, static]

Gets all applications with the specified main window title, and puts them to tehe specified list. Applications are regarded all processes with visible main window and window title defined.

Parameters:
mainWindowTitleApplications' main window title.
caseSensitiveWhether name is case sensitive.
isFullStringWhether the mainWindowTitle is a full window title (if false, it can be only its substring).
processListList on which the application processes matching the name are put. If nul then it is allocated first. If not empty then it is cleared firts.
static bool IG::Lib::UtilSystem::IsApplicationRunningByWindowTitle ( string  mainWindowTitle) [inline, static]

Returns true if at least one application with the specified main window title is running, false otherwise. Applications are regarded all processes with visible main window and window title defined.

Parameters:
mainWindowTitleApplication's main window title. Name is case sensitive.
Returns:
True if at least one process with the specified name is running, false otherwise.
static bool IG::Lib::UtilSystem::IsApplicationRunningByWindowTitle ( string  mainWindowTitle,
bool  caseSensitive 
) [inline, static]

Returns true if at least one application with the specified main window title is running, false otherwise. Applications are regarded all processes with visible main window and window title defined.

Parameters:
mainWindowTitleApplication's main window title.
caseSensitiveWhether process name is case sensitive.
Returns:
True if at least one process with the specified name is running, false otherwise.
static bool IG::Lib::UtilSystem::IsApplicationRunningByWindowTitle ( string  mainWindowTitle,
bool  caseSensitive,
bool  isFullString 
) [inline, static]

Returns true if at least one application with the specified main window title is running, false otherwise. Applications are regarded all processes with visible main window and window title defined.

Parameters:
mainWindowTitleApplication's main window title.
caseSensitiveWhether process name is case sensitive.
Returns:
True if at least one process with the specified name is running, false otherwise.
static void IG::Lib::UtilSystem::KillFirstApplicationByWindowTitle ( string  mainWindowTitle) [inline, static]

Kills the first running application found that has the specified main window title. Applications are regarded all processes with visible main window and window title defined.Nothing happens if there are no such processes running. Exceptions are cought and eventually reported on console if the OutputLevel >= 1.

Parameters:
mainWindowTitleApplication's main window title. Name is case sensitive.
static void IG::Lib::UtilSystem::KillFirstApplicationByWindowTitle ( string  mainWindowTitle,
bool  caseSensitive 
) [inline, static]

Kills the first running application found that has the specified main window title. Applications are regarded all processes with visible main window and window title defined.Nothing happens if there are no such processes running. Exceptions are cought and eventually reported on console if the OutputLevel >= 1.

Parameters:
mainWindowTitleApplication's main window title.
caseSensitiveWhether process name is case sensitive.
static void IG::Lib::UtilSystem::KillFirstApplicationByWindowTitle ( string  mainWindowTitle,
bool  caseSensitive,
bool  isFullString 
) [inline, static]

Kills the first running application found that has the specified main window title. Applications are regarded all processes with visible main window and window title defined.Nothing happens if there are no such processes running. Exceptions are cought and eventually reported on console if the OutputLevel >= 1.

Parameters:
mainWindowTitleApplication's main window title.
caseSensitiveWhether process name is case sensitive.
static void IG::Lib::UtilSystem::KillAllApplicationsByWindowTitle ( string  mainWindowTitle) [inline, static]

Kills the all running applications that has the specified main window title. Applications are regarded all processes with visible main window and window title defined.Nothing happens if there are no such processes running. Exceptions are cought and eventually reported on console if the OutputLevel >= 1.

Parameters:
mainWindowTitleApplication's main window title. Name is case sensitive.
static void IG::Lib::UtilSystem::KillAllApplicationsByWindowTitle ( string  mainWindowTitle,
bool  caseSensitive 
) [inline, static]

Kills all running applications that have the specified main window title. Applications are regarded all processes with visible main window and window title defined.Nothing happens if there are no such processes running. Exceptions are cought and eventually reported on console if the OutputLevel >= 1.

Parameters:
mainWindowTitleApplication's main window title.
caseSensitiveWhether process name is case sensitive.
static void IG::Lib::UtilSystem::KillAllApplicationsByWindowTitle ( string  mainWindowTitle,
bool  caseSensitive,
bool  isFullString 
) [inline, static]

Kills all running applications that have the specified main window title. Applications are regarded all processes with visible main window and window title defined.Nothing happens if there are no such processes running. Exceptions are cought and eventually reported on console if the OutputLevel >= 1.

Parameters:
mainWindowTitleApplication's main window title.
caseSensitiveWhether process name is case sensitive.
isFullStringWhether the mainWindowTitle is a full window title (if false, it can be only its substring).
static ThreadPriority IG::Lib::UtilSystem::ProcessToThreadPriority ( ProcessPriorityClass  processPriority) [inline, static]

Converts the specified ProcessPriorityClass enum value to the approcimately equivalent ThreadPriority value and returns it.

Parameters:
processPriorityProcess priority value to be converted to thread priority.
static ProcessPriorityClass IG::Lib::UtilSystem::ThreadToProcessPriority ( ThreadPriority  threadPriority) [inline, static]

Converts the specified ThreadPriority enum value to the approcimately equivalent ProcessPriorityClass value and returns it.

Parameters:
threadPriorityThread priority value to be converted to thread priority.
static ThreadPriority IG::Lib::UtilSystem::GetThreadPriorityFromProcess ( ) [inline, static]

Returns the thread priority value that is equivallent to the current process' priority class.

static void IG::Lib::UtilSystem::UpdateThreadPriorityFromProcess ( ) [inline, static]

Updates the global thread priority (the UtilSystem.ThreadPriority property ) in such a way that it is the same as the current process priority. If the priority is changed by this call then the event handlers are also executed (the delegate UtilSystem.OnThreadPriorityChange is called).

static void IG::Lib::UtilSystem::OnThreadPriorityChange ( ) [inline, static]

This delegate is called when the global thread priority changes (property UtilSystem.ThreadPriority), but can also be called manually.

static void IG::Lib::UtilSystem::AddOnThreadPriorityChange ( ThreadStart  onPriorityChangeMethod) [inline, static]

Adds the specified method that is executed when the global thread priority changes.

Parameters:
onPriorityChangeMethodMethod that is added.
static void IG::Lib::UtilSystem::RemoveOnThreadPriorityChange ( ThreadStart  onPriorityChangeMethod) [inline, static]

Removes the specified method that is executed when the global thread priority changes.

Parameters:
onPriorityChangeMethodMethod that is removed.
static string IG::Lib::UtilSystem::GetWorkspaceDirectoryPath ( ) [inline, static]

Returns the workspace directory, which is primarily located through the environment variable contained in WorkspaceDirectoryEnvironmentVar (usually named WORKSPACE). If the workspace directory can not be located then nulll is returned.Workspace directory is base directory for code development.

static string IG::Lib::UtilSystem::GetWorkspacePath ( string  relativePath) [inline, static]

Returns a complete path of a file or directory specified by a relative path to the workspace directory, or null if the workspace directory can not be located. The workspace directory is obtained by calling the GetWorkspaceDirectoryPath method.

Parameters:
relativePathPath of the file or directory relative to the workspace directory.

If this argument represents an absolute path then the argument itself is returned.

Returns:
static string IG::Lib::UtilSystem::GetWorkspaceProjectsDirectoryPath ( ) [inline, static]

Returns the workspace projects directory, which is primarily located through the workspace directory (returned by the GetWorkspaceDirectoryPath method) as a directory located in the same directory and named WorkspaceProjectsDirName. Workspace projects directory is base directory for various project data.

static string IG::Lib::UtilSystem::GetWorkspaceProjectsPath ( string  relativePath) [inline, static]

Returns a complete path of a file or directory specified by a relative path to the workspace projects directory, or null if the workspace projects directory can not be located. The workspace projects directory is obtained by calling the GetWorkspaceDirectoryPath method.

Parameters:
relativePathPath of the file or directory relative to the workspace projects directory.

If this argument represents an absolute path then the argument itself is returned.

Returns:
static string IG::Lib::UtilSystem::GetExecutableDirectory ( ) [inline, static]

Returns the directory containing the executable that started the current application.

static string IG::Lib::UtilSystem::GetRepairedDirectoryPath ( string  directoryPath) [inline, static, private]

Repairs the specified directory path, if applicable, and returns the repaired directory path. If the specified path ends with directory separator then the last character is removed.

Parameters:
directoryPathDirectory path to be repaired.
Returns:
The repaired directory path, or the original string if no reparations were necessary.
static void IG::Lib::UtilSystem::RepairDirectoryPath ( ref string  directoryPath) [inline, static, private]

Repairs the specified directory path, if applicable. If the specified path ends with directory separator then the last character is removed.

Parameters:
directoryPathDirectory path to be repaired. Eventually repaired path is stored back to this variable.
static string IG::Lib::UtilSystem::GetStandardizedDirectoryPath ( string  directoryPath) [inline, static]

Returns the specified directory path in standard form (absolute path, system's path separator, ended with path separator). This method should always result in the same string for the same directory (regardles of the original form), therefore it is useful e.g. for naming a mutex used for locking access to a directory.

Parameters:
directoryPathPath to the directory, which can be specified in any acceptale form.
Returns:
Standard form of the specified directory path: absolute path, with system's path separators, ending with path separator.
static void IG::Lib::UtilSystem::StandardizeDirectoryPath ( ref string  directoryPath) [inline, static]

Converts the specified path to standard form (absolute path, system's path separator, ended with path separator). This method should always result in the same string for the same directory (regardles of the original form), therefore it is useful e.g. for naming a mutex used for locking access to a directory.

Parameters:
directoryPathPath to the directory, which can be specified in any acceptale form.

Result of this method is directory path that DOES NOT END WITH DIRECTORY SEPARATOR.

If the original path string on Windows OS is "d:" and the current directory is on the d: drive, then the result will be "d:" and not the current directory (this would be returned by the Path.GetFullPath).

static void IG::Lib::UtilSystem::SetCurrentDirectory ( string  directoryPath) [inline, static]

Changes directory to the specified directory.

This method overcomes problems with the fact that calling Directory.SetCurrentDirectory e.g. on "d:" (on Windows OS) when current directory is on the disk d: will not change the current directory (a backslash must be added to do so).

Parameters:
directoryPathPath of the directory specified, can be a relaitve path.
static string IG::Lib::UtilSystem::GetRelativePath ( string  fromPath,
string  toPath 
) [inline, static]

Calculates and returns relativa path from one path to another. WARNING: First path (with respect to this relative path is calculated) must be a directory path!

Parameters:
fromPathPath of the directory with respect to which the full path is calculated. It must be a directory path, file paths are not good.
toPathPath for which relative path is calculated.
Returns:
Relative path of the second argument with respect to the first argument.
static void IG::Lib::UtilSystem::ExampleRelativePath ( ) [inline, static]

Tests calculation.

static void IG::Lib::UtilSystem::CopyDirectory ( string  sourceDirectoryPath,
string  targetDirectoryPath 
) [inline, static]

Recursively copies contents of the source directory to the target directory.

Parameters:
sourceDirectoryPathPath to the source directory.
targetDirectoryPathPath to the target directory.
static void IG::Lib::UtilSystem::CopyRecursive ( DirectoryInfo  source,
DirectoryInfo  target 
) [inline, static]

Recursively copies contents of the source directory to the target directory.

Parameters:
sourceSource directory.
targetTarget directory.
static void IG::Lib::UtilSystem::CopyDirectorySafe ( string  sourceDirectoryPath,
string  targetDirectoryPath,
out int  numErrors,
out string  errorsString 
) [inline, static]

Recursively copies contents of the source directory to the target directory. Fail safe variant, does not throw exceptions and does not break execution when any individual basic operation fails.

Parameters:
sourceDirectoryPathPath to the source directory.
targetDirectoryPathPath to the target directory.
numErrorsVariable where number of exceptions cathced during the call is written.
errorsStringString variable where information about all errors that occurred during operation is stored.

This is a safe variant of the method. Basic operations are embedded in try/catch blocks. If any individual basic operation fails (such as copying a single file or creating a target subdirectory) then copying of the remaining directory structure is not interrupted.

It should be well considered whether this variant or the plain variant (which fails and throws exception when an individual operation fails) should be used. Problem with this version is that it does not throw wxception if a part of directory structure could not be copied, so the caller will not know that. Use of this variant could be beneficial when it is likely that copying of some special parts (such as hidden or system files) is likely to fail but this is not relefant for function of the copied directory.

If UtilSystem.OutputLevel>0 then all errors are reporter on console.

static void IG::Lib::UtilSystem::CopyRecursiveSafe ( DirectoryInfo  source,
DirectoryInfo  target,
ref int  numErrors,
ref string  errorsString 
) [inline, static]

Recursively copies contents of the source directory to the target directory. Fail safe variant, does not throw exceptions and does not break execution when any individual basic operation fails.

Parameters:
sourceSource directory.
targetTarget directory.
numErrorsVariable where number of exceptions cathced during the call is written. Value of the variable increments for each exception catched.
errorsStringString variable where information about all errors that occurred during operation is stored. For each exception catched, a short error report is appended to its value.

This is a safe variant of the method. Basic operations are embedded in try/catch blocks. If any individual basic operation fails (such as copying a single file or creating a target subdirectory) then copying of the remaining directory structure is not interrupted.

It should be well considered whether this variant or the plain variant (which fails and throws exception when an individual operation fails) should be used. Problem with this version is that it does not throw wxception if a part of directory structure could not be copied, so the caller will not know that. Use of this variant could be beneficial when it is likely that copying of some special parts (such as hidden or system files) is likely to fail but this is not relefant for function of the copied directory.

If UtilSystem.OutputLevel>0 then all errors are reporter on console.

static string IG::Lib::UtilSystem::CreateTestdirectoryStructure ( string  baseDirPath,
string  rootDirName 
) [inline, static]

Creates a test directory structure for testing operatios such as recursive copying. Returns path of the created directory structure, or null if something is wrong.

Parameters:
baseDirPathPath of the base directory within which the structure is created.
rootDirNameName of the root directoy of the created directory structure.
Returns:
Path of the root directory of the created test directory structure, or null if the directory structure could not be created for some reason.
static void IG::Lib::UtilSystem::ExampleCopyDir ( ) [inline, static]

Examp.

Parameters:
sourceDirPath
targetDirPath

Member Data Documentation

int IG::Lib::UtilSystem::_outputLevel = 0 [static, private]
string IG::Lib::UtilSystem::_userName = null [static, private]
string IG::Lib::UtilSystem::_userNameLowerCase = null [static, private]
bool IG::Lib::UtilSystem::_isOsDetected = false [static, private]
bool IG::Lib::UtilSystem::_isWindowsOs = false [static, private]
bool IG::Lib::UtilSystem::_isLinuxOs = false [static, private]
bool IG::Lib::UtilSystem::_isMacOs = false [static, private]
bool IG::Lib::UtilSystem::_dynamicThreadPriority = true [static, private]
ThreadPriority IG::Lib::UtilSystem::_threadPriority = ProcessToThreadPriority(Process.GetCurrentProcess().PriorityClass) [static, private]
ThreadStart IG::Lib::UtilSystem::_onThreadPriorityChange [static, private]
const string IG::Lib::UtilSystem::WorkspaceDirectoryEnvironmentVar = "WORKSPACE" [private]
const string IG::Lib::UtilSystem::WorkspaceProjectsDirectoryEnvironmentVar = "WORKSPACEPROJECTS" [private]
const string IG::Lib::UtilSystem::WorkspaceProjectsDirName = "workspaceprojects" [private]

Property Documentation

int IG::Lib::UtilSystem::OutputLevel [static, get, set]

Gets or sets the level of output for some operations of this class. When accessed for the first time, the current value of Util.OutputLevel is returned.If set to less than 0 then the first subsequent set access will return the current the current value of Util.OutputLevel.

bool IG::Lib::UtilSystem::UserNameNotRetrieved [static, get, private]

Whether user name has already been retrieved ans stored.

string IG::Lib::UtilSystem::UserName [static, get]

Gets name of the current user.

string IG::Lib::UtilSystem::UserNameLowerCase [static, get]

Gets name of the current user with all letters converted to lower case (in order to avoid ambiguities).

bool IG::Lib::UtilSystem::IsUserIgor [static, get]

Returns true if the current user logged on the computer is Igor, or false otherwise.

bool IG::Lib::UtilSystem::IsUserTadej [static, get]

Returns true if the current user logged on the computer is Tadej, or false otherwise.

bool IG::Lib::UtilSystem::IsWindowsOs [static, get]

Returns true if the operating system is a Windows variant, false otherwise.

bool IG::Lib::UtilSystem::IsLinuxOs [static, get]

Returns true if the operating system is a Linux variant, false otherwise.

bool IG::Lib::UtilSystem::IsMaxOs [static, get]

Returns true if the operating system is a MacOs variant, false otherwise.

bool IG::Lib::UtilSystem::DynamicThreadPriority [static, get, set]

Whether the ThreadPriority property should be obtained dynamically from the process priority each time its getter is called, or the value that is set should be used until it is not changed explicitly. Default is true.By setting the ThreadPriority property, this flag is automatically set to false.

ThreadPriority IG::Lib::UtilSystem::ThreadPriority [static, get, set]

Global thread priority. Gets or sets priority that should be given to the newly created threads that use this instrument.If the DynamicThreadPriority property is set to true then each time the getter is called, the value of the property will be obtained anew from the process priority class. Otherwise, the value that has been set last is used.Setting the property value will automatically set the DynamicThreadPriority to false.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Enumerations Properties Events