IGLib
1.5
The IGLib base library for development of numerical, technical and business applications.
|
General utilities. More...
Classes | |
class | MissingAssembly |
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. More... | |
static string | GetComputerName () |
Returns name of the computer on which application is running. More... | |
static string | GetMacAddressFastest () |
Returns the MAC address of the network interface card with maximal speed. More... | |
static string | GetIpAddressLocal () |
Returns the current local IP address of computer. More... | |
static string | GetUserDomainName () |
Returns the domain name associated with the current user. More... | |
static string | GetDomainName () |
Returns the network domain name associated with the current user. More... | |
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. More... | |
static string | GetRuntimeVersionString () |
Gets the version of the runtime on which the current application executes. More... | |
static Process | ExecuteSystemCommand (string command, params string[] args) |
Executes system command with arguments synchronously (blocks until the process that is created exits). More... | |
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). More... | |
static Process | ExecuteSystemCommand (bool asynchronous, string command, params string[] args) |
Executes system command with arguments. More... | |
static Process | ExecuteSystemCommand (string workingDirectory, bool asynchronous, string command, params string[] args) |
Executes system command with arguments. More... | |
static Process | ExecuteSystemCommand (string workingDirectory, bool asynchronous, bool useShell, string command, params string[] args) |
Executes system command with arguments. More... | |
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. More... | |
static void | OpenFileInDefaultBrowser (string filePath) |
Opens the specified file in the system's default browser. More... | |
static void | OpenUrlInDefaultBrowser (string url) |
Opens the specified URL (Unique Resource locator, e.g. a web address) in the default browser. More... | |
static string | GetCurrentProcessExecutableName () |
Returns name of the executable file (with extension) for the current process. More... | |
static string | GetCurrentProcessExecutablePath () |
Returns the absolute path of the executable file (with extension) for the current process. More... | |
static string | GetCurrentProcessExecutableWithoutExtension () |
Returns name of the executable file (with extension) for the current process. More... | |
static void | GetAllProcesses (ref List< Process > processList) |
Gets all runnning processes, and puts them to the specified list. More... | |
static void | GetProcesses (string processName, ref List< Process > processList) |
Gets all processes with the specified name, and puts them to tehe specified list. More... | |
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. More... | |
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. More... | |
static bool | IsProcessRunning (string processName) |
Returns true if at least one process with the specified name is running, false otherwise. More... | |
static bool | IsProcessRunning (string processName, bool caseSensitive) |
Returns true if at least one process with the specified name is running, false otherwise. More... | |
static bool | IsProcessRunning (string processName, bool isFullString, bool caseSensitive) |
Returns true if at least one process with the specified name is running, false otherwise. More... | |
static void | KillFirstProcess (string processName) |
Kills the first running process found that has the specified process name. More... | |
static void | KillFirstProcess (string processName, bool caseSensitive) |
Kills the first running process found that has the specified process name. More... | |
static void | KillFirstProcess (string processName, bool caseSensitive, bool isFullString) |
Kills the first running process found that has the specified process name. More... | |
static void | KillAllProcesses (string processName) |
Kills all running process have the specified process name. More... | |
static void | KillAllProcesses (string processName, bool caseSensitive) |
Kills all running processes that have the specified process name. More... | |
static void | KillAllProcesses (string processName, bool isFullString, bool caseSensitive) |
Kills all running processes that have the specified process name. More... | |
static void | GetAllApplications (ref List< Process > processList) |
Gets all runnning applications, and puts them to the specified list. More... | |
static void | GetApplications (string processName, ref List< Process > processList) |
Gets all applications with the specified process name, and puts them to the specified list. More... | |
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. More... | |
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. More... | |
static bool | IsApplicationRunning (string processName) |
Returns true if at least one application with the specified process name is running, false otherwise. More... | |
static bool | IsApplicationRunning (string processName, bool caseSensitive) |
Returns true if at least one application with the specified process name is running, false otherwise. More... | |
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. More... | |
static void | KillFirstApplication (string processName) |
Kills the first running application found that has the specified process name. More... | |
static void | KillFirstApplication (string processName, bool caseSensitive) |
Kills the first running application found that has the specified process name. More... | |
static void | KillFirstApplication (string processName, bool caseSensitive, bool isFullString) |
Kills the first running application found that has the specified process name. More... | |
static void | KillAllApplications (string processName) |
Kills the all running applications that has the specified process name. More... | |
static void | KillAllApplications (string processName, bool caseSensitive) |
Kills all running applications that have the specified process name. More... | |
static void | KillAllApplications (string processName, bool caseSensitive, bool isFullString) |
Kills all running applications that have the specified process name. More... | |
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. More... | |
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. More... | |
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. More... | |
static bool | IsApplicationRunningByWindowTitle (string mainWindowTitle) |
Returns true if at least one application with the specified main window title is running, false otherwise. More... | |
static bool | IsApplicationRunningByWindowTitle (string mainWindowTitle, bool caseSensitive) |
Returns true if at least one application with the specified main window title is running, false otherwise. More... | |
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. More... | |
static void | KillFirstApplicationByWindowTitle (string mainWindowTitle) |
Kills the first running application found that has the specified main window title. More... | |
static void | KillFirstApplicationByWindowTitle (string mainWindowTitle, bool caseSensitive) |
Kills the first running application found that has the specified main window title. More... | |
static void | KillFirstApplicationByWindowTitle (string mainWindowTitle, bool caseSensitive, bool isFullString) |
Kills the first running application found that has the specified main window title. More... | |
static void | KillAllApplicationsByWindowTitle (string mainWindowTitle) |
Kills the all running applications that has the specified main window title. More... | |
static void | KillAllApplicationsByWindowTitle (string mainWindowTitle, bool caseSensitive) |
Kills all running applications that have the specified main window title. More... | |
static void | KillAllApplicationsByWindowTitle (string mainWindowTitle, bool caseSensitive, bool isFullString) |
Kills all running applications that have the specified main window title. More... | |
static Assembly | GetAssemblyByName (string assemblyName, bool caseSensitive=false, bool loadIfNecessary=true) |
static Assembly[] | GetLoadedAssemblies () |
Returns a list of all currently loaded assemblies in the applicattion. More... | |
static Assembly[] | GetReferencedAssembliesWithoutGac () |
Returns an array containing the executable assembly and all its DIRECTLY referenced assemblies. Assemblies from the Global Assembly Cache (GAC) are NOT included. More... | |
static Assembly[] | GetReferencedAssembliesRecursiveWithoutGac () |
Returns an array containing the executable assembly and all its referenced assemblies (directly or indirectly). Assemblies from the Global Assembly Cache (GAC) are NOT included. More... | |
static Assembly[] | GetReferencedAssemblies () |
Returns an array containing the executable assembly and all its DIRECTLY referenced assemblies. Assemblies from the Global Assembly Cache (GAC) are also included. More... | |
static Assembly[] | GetReferencedAssembliesRecursive () |
Returns an array containing the executable assembly and all its referenced assemblies (directly or indirectly), More... | |
static List< string > | GetReferencedAssembliesFlat (Assembly assembly) |
Get assemblies referenced by the specified assembly. Not recursive. More... | |
static Dictionary< string, Assembly > | GetReferencedAssemblies (Assembly assembly, bool ignoreGac=true, bool recursive=true) |
Creates and returns a dictionary containing all assemblies referenced (directly or indirectly) by the specified assembly. Recursive. More... | |
static List< MissingAssembly > | GetMissingAssemblies (Assembly assembly, bool recursive=true) |
Get missing assemblies. More... | |
static string | SimpleAssemblyName (string fullName) |
Returns a simple assembly name that corresponds to the specified full name of the assembly. More... | |
static string | GetAssemblyName (Assembly assembly) |
Returns name of the specified assembly. More... | |
static string | GetAssemblyFileName (Assembly assembly) |
Returns file name of the specified assembly. More... | |
static string | GetAssemblyDirectory (Assembly assembly) |
Returns the directory containing the specified assembly. More... | |
static string | GetAssemblyAssemblyName (Assembly assembly) |
Returns assembly name of the specified assembly. More... | |
static string | GetAssemblyVersion (Assembly assembly, int numLevels=2) |
Returns version (from the file info) of the specified assembly. More... | |
static string | GetAssemblyTitle (Assembly assembly) |
Returns descriptive title of the specified assembly (from the AssemblyInfo file). More... | |
static string | GetAssemblyDescription (Assembly assembly) |
Returns description of the specified assembly (from assembly info). More... | |
static string | GetAssemblyCompany (Assembly assembly) |
Returns company attribute of the specified assembly. More... | |
static string | GetAssemblyCopyrightInfo (Assembly assembly) |
Returns copyright information of the specified assembly. More... | |
static string | GetAssemblyInfo (Assembly assembly, int infoLevel=3, int versionLevel=0) |
Returns a (possibly multiline) string containing basic information about the specified assembly, such as file name, directory, assembly name, and version. More... | |
static string | GetExecutableFileName () |
Returns file name of the current executable. More... | |
static string | GetExecutableDirectory () |
Returns the directory containing the executable that started the current application. More... | |
static string | GetExecutableAssemblyName () |
Returns assembly name of the current executable. More... | |
static string | GetExecutableVersion (int numLevels=2) |
Returns version (from the file info) of the current executable. More... | |
static string | GetExecutableTitle () |
Returns descriptive title of the current executable (from the AssemblyInfo file). More... | |
static string | GetExecutableDescription () |
Returns description of the current executable (from the AssemblyInfo file). More... | |
static string | GetExecutableCompany () |
Returns company attribute of the currentt executable. More... | |
static string | GetExecutableCopyrightInfo () |
Returns copyright information of the current executable. More... | |
static string | GetExecutableInfo (int infoLevel=3, int versionLevel=0) |
Returns a (possibly multiline) string containing basic information about the current executable, such as executable file name and directory. More... | |
static string | GetIglibFileName () |
Returns file name of the IGLib assembly. More... | |
static string | GetIglibDirectory () |
Returns the directory containing the IGLib assembly. More... | |
static string | GetIglibAssemblyName () |
Returns assembly name of the IGLib assembly. More... | |
static string | GetIglibVersion (int numLevels=2) |
Returns version (from the file info) of the IGLib assembly. More... | |
static string | GetIglibTitle () |
Returns descriptive title of the IGLib assembly (from the AssemblyInfo file). More... | |
static string | GetIglibDescription () |
Returns description of the IGLib assembly (from assembly info). More... | |
static string | GetIglibCompany () |
Returns company attribute of the IGLib assembly. More... | |
static string | GetIglibCopyrightInfo () |
Returns copyright information of the IGLib assembly. More... | |
static string | GetIglibInfo (int infoLevel=3, int versionLevel=0) |
Returns a (possibly multiline) string containing basic information about the IGLib base library, such as file name, directory, assembly name, and version. More... | |
static string | GetApplicationInfo (int infoLevel=3, bool includeIglibInfo=true, int versionLevel=2, IList< Assembly > additionalAssemblies=null) |
Returns a (possibly multiline) string containing basic information about the current application, such as file name, directory, assembly name, and version. Information about IGLib can be included, too. More... | |
static ThreadPriority | ProcessToThreadPriority (ProcessPriorityClass processPriority) |
Converts the specified ProcessPriorityClass enum value to the approcimately equivalent ThreadPriority value and returns it. More... | |
static ProcessPriorityClass | ThreadToProcessPriority (ThreadPriority threadPriority) |
Converts the specified ThreadPriority enum value to the approcimately equivalent ProcessPriorityClass value and returns it. More... | |
static ThreadPriority | GetThreadPriorityFromProcess () |
Returns the thread priority value that is equivallent to the current process' priority class. More... | |
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. More... | |
static void | OnThreadPriorityChange () |
This delegate is called when the global thread priority changes (property UtilSystem.ThreadPriority), but can also be called manually. More... | |
static void | AddOnThreadPriorityChange (ThreadStart onPriorityChangeMethod) |
Adds the specified method that is executed when the global thread priority changes. More... | |
static void | RemoveOnThreadPriorityChange (ThreadStart onPriorityChangeMethod) |
Removes the specified method that is executed when the global thread priority changes. More... | |
static bool | IsTextFile (string filePath) |
Detects if the specified file is a text file and detects the encoding. More... | |
static bool | IsTextFile (string filePath, int numChecked) |
Detects if the specified file is a text file and detects the encoding. More... | |
static bool | IsTextFile (string filePath, out Encoding encoding) |
Detects if the specified file is a text file and detects the encoding. More... | |
static bool | IsTextFile (string filePath, int numChecked, out Encoding encoding) |
Detects if the specified file is a text file and detects the encoding. More... | |
static string | GetWorkspaceDirectoryPath () |
Returns the workspace directory, which is primarily located through the environment variable contained in WorkspaceDirectoryEnvironmentVar (usually named WORKSPACE). More... | |
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. More... | |
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. More... | |
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. More... | |
static string | GetStandardizedDirectoryPath (string directoryPath) |
Returns the specified directory path in standard form (absolute path, system's path separator, ended with path separator). More... | |
static void | StandardizeDirectoryPath (ref string directoryPath) |
Converts the specified path to standard form (absolute path, system's path separator, ended with path separator). More... | |
static void | SetCurrentDirectory (string directoryPath) |
Changes directory to the specified directory. More... | |
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! More... | |
static void | ExampleRelativePath () |
Tests calculation More... | |
static void | CopyDirectory (string sourceDirectoryPath, string targetDirectoryPath) |
Recursively copies contents of the source directory to the target directory. More... | |
static void | CopyRecursive (DirectoryInfo source, DirectoryInfo target) |
Recursively copies contents of the source directory to the target directory. More... | |
static void | CopyDirectorySafe (string sourceDirectoryPath, string targetDirectoryPath, out int numErrors, out string errorsString) |
Recursively copies contents of the source directory to the target directory. More... | |
static void | CopyRecursiveSafe (DirectoryInfo source, DirectoryInfo target, ref int numErrors, ref string errorsString) |
Recursively copies contents of the source directory to the target directory. More... | |
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. More... | |
static void | ExampleCopyDir () |
Examp More... | |
static void | SaveBinary< ObjectType > (ObjectType objectToSave, string fileName) |
Save the specified serialized object in binary form to the specified file. More... | |
static void | SaveBinary< ObjectType > (ObjectType objectToSave, Stream stream) |
Save the specified serialized object in binary form to the specified stream. More... | |
static ObjectType | LoadBinary< ObjectType > (string fileName) |
Loads the from specified file. More... | |
static ObjectType | LoadBinary< ObjectType > (Stream stream) |
Load network from specified file. More... | |
static void | SaveBinary (object objectToSave, string fileName) |
Save the specified serialized object in binary form to the specified file. More... | |
static void | SaveBinary (object objectToSave, Stream stream) |
Save the specified serialized object in binary form to the specified stream. More... | |
static object | LoadBinary (string fileName) |
Loads the from specified file. More... | |
static object | LoadBinary (Stream stream) |
Load network from specified file. More... | |
Properties | |
static bool | UserNameNotRetrieved [get] |
Whether user name has already been retrieved ans stored. More... | |
static string | UserName [get] |
Gets name of the current user. More... | |
static string | UserNameLowerCase [get] |
Gets name of the current user with all letters converted to lower case (in order to avoid ambiguities). More... | |
static bool | IsUserIgor [get] |
Returns true if the current user logged on the computer is Igor, or false otherwise. More... | |
static bool | IsUserTadej [get] |
Returns true if the current user logged on the computer is Tadej, or false otherwise. More... | |
static bool | IsWindowsOs [get] |
Returns true if the operating system is a Windows variant, false otherwise. More... | |
static bool | IsLinuxOs [get] |
Returns true if the operating system is a Linux variant, false otherwise. More... | |
static bool | IsMaxOs [get] |
Returns true if the operating system is a MacOs variant, false otherwise. More... | |
static Assembly | ExecutableAssembly [get] |
Returns assembly of the current executable, obtained by Assembly.GetEntryAssembly(). More... | |
static Assembly | IglibAssembly [get] |
Returns assembly of the current executable, obtained by Assembly.GetEntryAssembly(). More... | |
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. More... | |
static ThreadPriority | ThreadPriority [get, set] |
Global thread priority. More... | |
Static Private Member Functions | |
static void | RetrieveUserName () |
Retrieves and stores information about current user name. More... | |
static void | DetectOs () |
Detects operating system. More... | |
static void | InternalGetReferencedAssembliesRecursive (Assembly assembly, bool recursive=true) |
Internal recursive method to get all referenced assemblies, and all dependent assemblies of dependent assemblies, etc. More... | |
static string | GetRepairedDirectoryPath (string directoryPath) |
Repairs the specified directory path, if applicable, and returns the repaired directory path. More... | |
static void | RepairDirectoryPath (ref string directoryPath) |
Repairs the specified directory path, if applicable. More... | |
Private Attributes | |
const int | MinNumCheckedIsTextFile = 100 |
Minimal number of checked bytes when determining whether a file is a text file. More... | |
const string | WorkspaceDirectoryEnvironmentVar = "WORKSPACE" |
const string | WorkspaceProjectsDirectoryEnvironmentVar = "WORKSPACEPROJECTS" |
const string | WorkspaceProjectsDirName = "workspaceprojects" |
Static Private Attributes | |
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 volatile Assembly | _executingAssembly = null |
static volatile Assembly | _iglibAssembly = null |
static volatile Assembly[] | _referencedAssembliesDirectWithoutGac |
Assemblies directly referenced by the current executale assembly. Calculated only once, lazy evaluation. More... | |
static volatile Assembly[] | _referencedAssembliesRecursiveWithoutGac |
Assemblies directly or indirectly referenced by the current executale assembly. Calculated only once, lazy evaluation. More... | |
static volatile Assembly[] | _referencedAssembliesDirect |
Assemblies directly referenced by the current executale assembly. Assemblies from global assembly cache are also included. Calculated only once, lazy evaluation. More... | |
static volatile Assembly[] | _referencedAssembliesRecursive |
Assemblies directly or indirectly referenced by the current executale assembly. Calculated only once, lazy evaluation. More... | |
static Dictionary< string, Assembly > | _dependentAssemblyList |
static List< MissingAssembly > | _missingAssemblyList |
static bool | _dynamicThreadPriority = true |
static ThreadPriority | _threadPriority = ProcessToThreadPriority(Process.GetCurrentProcess().PriorityClass) |
static ThreadStart | _onThreadPriorityChange |
General utilities.
$A Igor Apr10;
|
inlinestaticprivate |
Retrieves and stores information about current user name.
|
inlinestatic |
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.
username | Name of the user to be set. Null annihilates previous calls and causes that system provided user name is returned by subsequent queries. |
Referenced by IG.Lib.ApplicationCommandlineBase.SetUserName().
|
inlinestatic |
Returns name of the computer on which application is running.
Referenced by IG.Script.ScriptAppBase.SystemFunctionComputerName().
|
inlinestatic |
Returns the MAC address of the network interface card with maximal speed.
The returned string represents hexadecimal MAC address without ':', '-' or other punctation marks.
References IG.Lib.Util.OutputLevel.
Referenced by IG.Script.ScriptAppBase.SystemFunctionMACAddress().
|
inlinestatic |
Returns the current local IP address of computer.
Referenced by IG.Script.ScriptAppBase.SystemFunctionIpAddress().
|
inlinestatic |
Returns the domain name associated with the current user.
|
inlinestatic |
Returns the network domain name associated with the current user.
Referenced by IG.Script.ScriptAppBase.SystemFunctionDomainName().
|
inlinestatic |
Returns a string containing basic system information - name of the current user, computer name, domain name, IP address, MAC address, and runtime version.
Referenced by IG.Script.ScriptAppBase.SystemFunctionSystemInfo().
|
inlinestaticprivate |
Detects operating system.
References IG.Lib.Util.LockGlobal.
|
inlinestatic |
Gets the version of the runtime on which the current application executes.
Referenced by IG.Script.ScriptAppBase.SystemFunctionRuntimeVersion().
|
inlinestatic |
Executes system command with arguments synchronously (blocks until the process that is created exits).
command | Command string, usually a path to executable or other type of command. |
args | Arguments to system command. |
Referenced by IG.Lib.CommandLineApplicationInterpreter.ExecuteSystemCommand(), and IG.Num.SimKosecFileManagerBase.RunSimulator().
|
inlinestatic |
Executes system command with arguments asynchronously (returns immediately and does not wait for the process to complete).
command | Command string, usually a path to executable or other type of command. |
args | Arguments to system command. |
|
inlinestatic |
Executes system command with arguments.
asynchronous | If 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. |
command | Command string, usually a path to executable or other type of command. |
args | Arguments to system command. |
|
inlinestatic |
Executes system command with arguments.
workingDirectory | Working directory of the process that is run. If null or empty string then working sirectory is not specified (the current working directory is used). |
asynchronous | If 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. |
command | Command string, usually a path to executable or other type of command. |
args | Arguments to system command. |
|
inlinestatic |
Executes system command with arguments.
workingDirectory | Working directory of the process that is run. If null or empty string then working sirectory is not specified (the current working directory is used). |
asynchronous | If 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. |
useShell | Whether to use the command shell (open in a new window) for execution. |
command | Command string, usually a path to executable or other type of command. |
args | Arguments to system command. |
|
inlinestatic |
Executes system command with arguments.
workingDirectory | Working directory of the process that is run. If null or empty string then working sirectory is not specified (the current working directory is used). |
asynchronous | If 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. |
useShell | Whether to use the command shell (open in a new window) for execution. |
createNoWindow | If true then window is not created. |
redirectedOutputPath | Path to the file where standard output is redirected (null means that output is not redirected to a file). |
redirectStandardOutput | Whether 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. |
command | Command string, usually a path to executable or other type of command. |
args | Arguments to system command. |
References IG.Lib.UtilSystem.IsWindowsOs.
|
inlinestatic |
Opens the specified file in the system's default browser.
filePath | Path of the file to be opened. |
Referenced by IG.Lib.HtmlWriter.Example().
|
inlinestatic |
Opens the specified URL (Unique Resource locator, e.g. a web address) in the default browser.
<url>Adress of page to be shown.</url>
|
inlinestatic |
Returns name of the executable file (with extension) for the current process.
Referenced by IG.Lib.CommandLineApplicationInterpreter.CmdAbout(), IG.Lib.CommandLineApplicationInterpreter.CmdApplicationInfo(), IG.Lib.CommandLineApplicationInterpreter.CmdAsyncCompleted(), IG.Lib.CommandLineApplicationInterpreter.CmdAsyncWaitResults(), IG.Lib.CommandLineApplicationInterpreter.CmdClearVariable(), IG.Lib.CommandLineApplicationInterpreter.CmdComment(), IG.Lib.CommandLineApplicationInterpreter.CmdExit(), IG.Lib.CommandLineApplicationInterpreter.CmdExpressionEvaluatorInteractive(), IG.Lib.CommandLineApplicationInterpreter.CmdGetVariable(), IG.Lib.CommandLineApplicationInterpreter.CmdHelp(), IG.Lib.CommandLineApplicationInterpreter.CmdIsModuleLoaded(), IG.Lib.CommandLineApplicationInterpreter.CmdLoadModule(), IG.Lib.CommandLineApplicationInterpreter.CmdLoadScript(), IG.Lib.CommandLineApplicationInterpreter.CmdModuleTestCommand(), IG.Lib.CommandLineApplicationInterpreter.CmdPipeClientCreate(), IG.Lib.CommandLineApplicationInterpreter.CmdPipeClientGetServerResponse(), IG.Lib.CommandLineApplicationInterpreter.CmdPipeClientInfo(), IG.Lib.CommandLineApplicationInterpreter.CmdPipeClientsRemove(), IG.Lib.CommandLineApplicationInterpreter.CmdPipeServerCreate(), IG.Lib.CommandLineApplicationInterpreter.CmdPipeServerInfo(), IG.Lib.CommandLineApplicationInterpreter.CmdPipeServersRemove(), IG.Lib.CommandLineApplicationInterpreter.CmdPrintCommands(), IG.Lib.CommandLineApplicationInterpreter.CmdPrintParallelCommands(), IG.Lib.CommandLineApplicationInterpreter.CmdPrintVariable(), IG.Lib.CommandLineApplicationInterpreter.CmdRunAsync(), IG.Lib.CommandLineApplicationInterpreter.CmdRunFile(), IG.Lib.CommandLineApplicationInterpreter.CmdRunInteractive(), IG.Lib.CommandLineApplicationInterpreter.CmdRunInternalScriptClass(), IG.Lib.CommandLineApplicationInterpreter.CmdRunLoadedScript(), IG.Lib.CommandLineApplicationInterpreter.CmdRunParallel(), IG.Lib.CommandLineApplicationInterpreter.CmdRunParallelRepeat(), IG.Lib.CommandLineApplicationInterpreter.CmdRunRepeat(), IG.Lib.CommandLineApplicationInterpreter.CmdRunRepeatVerbose(), IG.Lib.CommandLineApplicationInterpreter.CmdRunScriptFile(), IG.Lib.CommandLineApplicationInterpreter.CmdRunSystem(), IG.Lib.CommandLineApplicationInterpreter.CmdSetPriority(), IG.Lib.CommandLineApplicationInterpreter.CmdSetVariable(), IG.Lib.CommandLineApplicationInterpreter.CmdSleepSeconds(), IG.Lib.CommandLineApplicationInterpreter.CmdTest(), IG.Lib.CommandLineApplicationInterpreter.CmdTestFromTestModules(), IG.Lib.CommandLineApplicationInterpreter.CmdTestLU(), IG.Lib.CommandLineApplicationInterpreter.CmdTestProduct(), IG.Lib.CommandLineApplicationInterpreter.CmdTestQR(), IG.Lib.CommandLineApplicationInterpreter.CmdTestSpeed(), IG.Lib.CommandLineApplicationInterpreter.CmdTestSpeedLong(), IG.Lib.CommandLineApplicationInterpreter.CmdThtrowExceptions(), IG.Lib.CommandLineApplicationInterpreter.CmdTryRun(), IG.Lib.CommandLineApplicationInterpreter.CmdWrite(), and IG.Lib.CommandLineApplicationInterpreter.WriteLoadableScriptReferencedAssemblies().
|
inlinestatic |
Returns the absolute path of the executable file (with extension) for the current process.
|
inlinestatic |
Returns name of the executable file (with extension) for the current process.
|
inlinestatic |
Gets all runnning processes, and puts them to the specified list.
processList | List on which the processes are put. If nul then it is allocated first. If not empty then it is cleared firts. |
Referenced by IG.Script.ScriptAppBase.ProcessFunctionListProcesses().
|
inlinestatic |
Gets all processes with the specified name, and puts them to tehe specified list.
processName | Name of the processes to be put on the list. Name is case sensitive. |
processList | List on which the processes matching the name are put. If nul then it is allocated first. If not empty then it is cleared firts. |
Referenced by IG.Script.ScriptAppBase.ProcessFunctionKillProcesses(), and IG.Script.ScriptAppBase.ProcessFunctionListProcesses().
|
inlinestatic |
Gets all processes with the specified name, and puts them to tehe specified list.
processName | Name of the processes to be put on the list. |
caseSensitive | Whether name is case sensitive. |
processList | List on which the processes matching the name are put. If nul then it is allocated first. If not empty then it is cleared firts. |
|
inlinestatic |
Gets all processes with the specified name, and puts them to tehe specified list.
processName | Name of the processes to be put on the list. |
caseSensitive | Whether name is case sensitive. |
isFullString | Whether the processName is a full process name (if false, it can be only its substring). |
processList | List on which the processes matching the name are put. If nul then it is allocated first. If not empty then it is cleared firts. |
|
inlinestatic |
Returns true if at least one process with the specified name is running, false otherwise.
processName | Name of the process for which we check whether it is running. Name is case sensitive. |
|
inlinestatic |
Returns true if at least one process with the specified name is running, false otherwise.
processName | Name of the process for which we check whether it is running. |
caseSensitive | Whether process name is case sensitive. |
|
inlinestatic |
Returns true if at least one process with the specified name is running, false otherwise.
processName | Name of the process for which we check whether it is running. |
caseSensitive | Whether process name is case sensitive. |
isFullString | Whether the processName is a full process name (if false, it can be only its substring). |
|
inlinestatic |
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 Util.OutputLevel >= 1.
processName | Name of the process to be killed. Name is case sensitive. |
References IG.Lib.Util.OutputLevel.
|
inlinestatic |
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 Util.OutputLevel >= 1.
processName | Name of the process for which we check whether it is running. |
caseSensitive | Whether process name is case sensitive. |
References IG.Lib.Util.OutputLevel.
|
inlinestatic |
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 Util.OutputLevel >= 1.
processName | Name of the process for which we check whether it is running. |
caseSensitive | Whether process name is case sensitive. |
isFullString | Whether the processName is a full process name (if false, it can be only its substring). |
References IG.Lib.Util.OutputLevel.
|
inlinestatic |
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 Util.OutputLevel >= 1.
processName | Name of the process to be killed. Name is case sensitive. |
References IG.Lib.Util.OutputLevel.
|
inlinestatic |
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 Util.OutputLevel >= 1.
processName | Name of the process for which we check whether it is running. |
caseSensitive | Whether process name is case sensitive. |
References IG.Lib.Util.OutputLevel.
|
inlinestatic |
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 Util.OutputLevel >= 1.
processName | Name of the process for which we check whether it is running. |
caseSensitive | Whether process name is case sensitive. |
isFullString | Whether the processName is a full process name (if false, it can be only its substring). |
References IG.Lib.Util.OutputLevel.
|
inlinestatic |
Gets all runnning applications, and puts them to the specified list.
Applications are regarded all processes with visible main window and window title defined.
processList | List on which the processes are put. If nul then it is allocated first. If not empty then it is cleared firts. |
Referenced by IG.Script.ScriptAppBase.ProcessFunctionListApplications(), and IG.Script.ScriptAppBase.ProcessFunctionListApplicationsByWindow().
|
inlinestatic |
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.
processName | Name of the processes to be put on the list. Name is case sensitive. |
processList | List 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. |
Referenced by IG.Script.ScriptAppBase.ProcessFunctionKillApplications(), and IG.Script.ScriptAppBase.ProcessFunctionListApplications().
|
inlinestatic |
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.
processName | Name of the processes to be put on the list. |
caseSensitive | Whether name is case sensitive. |
processList | List 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. |
|
inlinestatic |
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.
processName | Name of the processes to be put on the list. |
caseSensitive | Whether name is case sensitive. |
isFullString | Whether the processName is a full name (if false, it can be only a substring of the process name). |
processList | List 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. |
|
inlinestatic |
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.
processName | Name of the process for which we check whether it is running. Name is case sensitive. |
|
inlinestatic |
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.
processName | Name of the process for which we check whether it is running. |
caseSensitive | Whether process name is case sensitive. |
|
inlinestatic |
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.
processName | Name of the process for which we check whether it is running. |
caseSensitive | Whether process name is case sensitive. |
isFullString | Whether the processName is a full name (if false, it can be only a substring of the process name). |
|
inlinestatic |
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 Util.OutputLevel >= 1.
processName | Name of the process to be killed. Name is case sensitive. |
References IG.Lib.Util.OutputLevel.
|
inlinestatic |
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 Util.OutputLevel >= 1.
processName | Name of the process for which we check whether it is running. |
caseSensitive | Whether process name is case sensitive. |
References IG.Lib.Util.OutputLevel.
|
inlinestatic |
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 Util.OutputLevel >= 1.
processName | Name of the process for which we check whether it is running. |
caseSensitive | Whether process name is case sensitive. |
isFullString | Whether the processName is a full name (if false, it can be only a substring of the process name). |
References IG.Lib.Util.OutputLevel.
|
inlinestatic |
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 Util.OutputLevel >= 1.
processName | Name of the process to be killed. Name is case sensitive. |
References IG.Lib.Util.OutputLevel.
|
inlinestatic |
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 Util.OutputLevel >= 1.
processName | Name of the process for which we check whether it is running. |
caseSensitive | Whether process name is case sensitive. |
References IG.Lib.Util.OutputLevel.
|
inlinestatic |
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 Util.OutputLevel >= 1.
processName | Name of the process for which we check whether it is running. |
caseSensitive | Whether process name is case sensitive. |
isFullString | Whether the processName is a full name (if false, it can be only a substring of the process name). |
References IG.Lib.Util.OutputLevel.
|
inlinestatic |
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.
mainWindowTitle | Applications' main window title. Name is case sensitive. |
processList | List 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. |
Referenced by IG.Script.ScriptAppBase.ProcessFunctionKillApplicationsByWindow(), and IG.Script.ScriptAppBase.ProcessFunctionListApplicationsByWindow().
|
inlinestatic |
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.
mainWindowTitle | Applications' main window title. |
caseSensitive | Whether name is case sensitive. |
processList | List 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. |
|
inlinestatic |
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.
mainWindowTitle | Applications' main window title. |
caseSensitive | Whether name is case sensitive. |
isFullString | Whether the mainWindowTitle is a full window title (if false, it can be only its substring). |
processList | List 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. |
|
inlinestatic |
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.
mainWindowTitle | Application's main window title. Name is case sensitive. |
|
inlinestatic |
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.
mainWindowTitle | Application's main window title. |
caseSensitive | Whether process name is case sensitive. |
|
inlinestatic |
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.
mainWindowTitle | Application's main window title. |
caseSensitive | Whether process name is case sensitive. |
|
inlinestatic |
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 Util.OutputLevel >= 1.
mainWindowTitle | Application's main window title. Name is case sensitive. |
References IG.Lib.Util.OutputLevel.
|
inlinestatic |
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 Util.OutputLevel >= 1.
mainWindowTitle | Application's main window title. |
caseSensitive | Whether process name is case sensitive. |
References IG.Lib.Util.OutputLevel.
|
inlinestatic |
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 Util.OutputLevel >= 1.
mainWindowTitle | Application's main window title. |
caseSensitive | Whether process name is case sensitive. |
References IG.Lib.Util.OutputLevel.
|
inlinestatic |
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 Util.OutputLevel >= 1.
mainWindowTitle | Application's main window title. Name is case sensitive. |
References IG.Lib.Util.OutputLevel.
|
inlinestatic |
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 Util.OutputLevel >= 1.
mainWindowTitle | Application's main window title. |
caseSensitive | Whether process name is case sensitive. |
References IG.Lib.Util.OutputLevel.
|
inlinestatic |
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 Util.OutputLevel >= 1.
mainWindowTitle | Application's main window title. |
caseSensitive | Whether process name is case sensitive. |
isFullString | Whether the mainWindowTitle is a full window title (if false, it can be only its substring). |
References IG.Lib.Util.OutputLevel.
|
inlinestatic |
|
inlinestatic |
Returns a list of all currently loaded assemblies in the applicattion.
|
inlinestatic |
Returns an array containing the executable assembly and all its DIRECTLY referenced assemblies. Assemblies from the Global Assembly Cache (GAC) are NOT included.
Array of assemblies is calculated only once (the first time it is needed) and is stored internally for to speed up further uses.
See:
http://stackoverflow.com/questions/383686/how-do-you-loop-through-currently-loaded-assemblies
Assembly names, http://msdn.microsoft.com/en-us/library/k8xx4k69%28v=vs.110%29.aspx
References IG.Lib.Util.LockGlobal.
|
inlinestatic |
Returns an array containing the executable assembly and all its referenced assemblies (directly or indirectly). Assemblies from the Global Assembly Cache (GAC) are NOT included.
Array of assemblies is calculated only once (the first time it is needed) and is stored internally for to speed up further uses.
See:
http://stackoverflow.com/questions/383686/how-do-you-loop-through-currently-loaded-assemblies
Assembly names, http://msdn.microsoft.com/en-us/library/k8xx4k69%28v=vs.110%29.aspx
References IG.Lib.Util.LockGlobal.
|
inlinestatic |
Returns an array containing the executable assembly and all its DIRECTLY referenced assemblies. Assemblies from the Global Assembly Cache (GAC) are also included.
Array of assemblies is calculated only once (the first time it is needed) and is stored internally to speed up further uses.
See:
http://stackoverflow.com/questions/383686/how-do-you-loop-through-currently-loaded-assemblies
Assembly names, http://msdn.microsoft.com/en-us/library/k8xx4k69%28v=vs.110%29.aspx
References IG.Lib.Util.LockGlobal.
|
inlinestatic |
Returns an array containing the executable assembly and all its referenced assemblies (directly or indirectly),
Assemblies from the Global Assembly Cache (GAC) are also included.
Array of assemblies is calculated only once (the first time it is needed) and is stored internally to speed up further uses.
See:
http://stackoverflow.com/questions/383686/how-do-you-loop-through-currently-loaded-assemblies
Assembly names, http://msdn.microsoft.com/en-us/library/k8xx4k69%28v=vs.110%29.aspx
References IG.Lib.Util.LockGlobal.
|
inlinestatic |
Get assemblies referenced by the specified assembly. Not recursive.
assembly | Assembly whose referenced assemblies are obtained. |
References IG.Lib.Util.LockGlobal.
|
inlinestatic |
Creates and returns a dictionary containing all assemblies referenced (directly or indirectly) by the specified assembly. Recursive.
assembly | Assembly whose referenced assemblies are obtained recursively. |
References IG.Lib.Util.LockGlobal.
|
inlinestatic |
Get missing assemblies.
References IG.Lib.Util.LockGlobal.
|
inlinestaticprivate |
Internal recursive method to get all referenced assemblies, and all dependent assemblies of dependent assemblies, etc.
References IG.Lib.Util.LockGlobal.
|
inlinestatic |
Returns a simple assembly name that corresponds to the specified full name of the assembly.
Simple name is only the assemblyname, not including assembly version, pulbic key token, or culture.
fullName |
|
inlinestatic |
Returns name of the specified assembly.
assembly | Assembly whose name is returned. |
|
inlinestatic |
Returns file name of the specified assembly.
assembly | Assembly whose file name is returned. |
|
inlinestatic |
Returns the directory containing the specified assembly.
assembly | Assembly whose directory is returned. |
|
inlinestatic |
Returns assembly name of the specified assembly.
assembly | Assembly whose name is returned. |
|
inlinestatic |
Returns version (from the file info) of the specified assembly.
numLevels | Nmber of levels included in the returned version string. |
assembly | Assembly whose version is returned. |
|
inlinestatic |
Returns descriptive title of the specified assembly (from the AssemblyInfo file).
assembly | Assembly whose title is returned. |
|
inlinestatic |
Returns description of the specified assembly (from assembly info).
assembly | Assembly whose description is returned. |
|
inlinestatic |
Returns company attribute of the specified assembly.
assembly | Assembly whose company is returned. |
|
inlinestatic |
Returns copyright information of the specified assembly.
assembly | Assembly whose copyright information is returned. |
|
inlinestatic |
Returns a (possibly multiline) string containing basic information about the specified assembly, such as file name, directory, assembly name, and version.
infoLevel | Level of information put into the string: |
1: assembly name and version, executable file.
2: executable directory, title, description.
3: creator, copyright info.
versionLevel | Level version nformation included. By default (value 0), one level more than infoLevel . |
assembly | Assembly whose information in readable form is returned. |
|
inlinestatic |
Returns file name of the current executable.
|
inlinestatic |
Returns the directory containing the executable that started the current application.
Referenced by IG.Lib.ScriptLoaderBase.GetExecutableDirectory().
|
inlinestatic |
Returns assembly name of the current executable.
|
inlinestatic |
Returns version (from the file info) of the current executable.
numLevels | Nmber of levels included in the returned version string. |
|
inlinestatic |
Returns descriptive title of the current executable (from the AssemblyInfo file).
|
inlinestatic |
Returns description of the current executable (from the AssemblyInfo file).
|
inlinestatic |
Returns company attribute of the currentt executable.
|
inlinestatic |
Returns copyright information of the current executable.
|
inlinestatic |
Returns a (possibly multiline) string containing basic information about the current executable, such as executable file name and directory.
infoLevel | Level of information put into the string: |
1: assembly name and version, executable file.
2: executable directory, title, description.
3: creator, copyright info.
versionLevel | Level version nformation included. By default (vlue 0), one level more than infoLevel . |
|
inlinestatic |
Returns file name of the IGLib assembly.
|
inlinestatic |
Returns the directory containing the IGLib assembly.
|
inlinestatic |
Returns assembly name of the IGLib assembly.
|
inlinestatic |
Returns version (from the file info) of the IGLib assembly.
numLevels | Nmber of levels included in the returned version string. |
|
inlinestatic |
Returns descriptive title of the IGLib assembly (from the AssemblyInfo file).
|
inlinestatic |
Returns description of the IGLib assembly (from assembly info).
|
inlinestatic |
Returns company attribute of the IGLib assembly.
|
inlinestatic |
Returns copyright information of the IGLib assembly.
|
inlinestatic |
Returns a (possibly multiline) string containing basic information about the IGLib base library, such as file name, directory, assembly name, and version.
infoLevel | Level of information put into the string: |
1: assembly name and version, executable file.
2: executable directory, title, description.
3: creator, copyright info.
versionLevel | Level version nformation included. By default (value 0), one level more than infoLevel . |
|
inlinestatic |
Returns a (possibly multiline) string containing basic information about the current application, such as file name, directory, assembly name, and version. Information about IGLib can be included, too.
infoLevel | Level of information put into the string: |
1: assembly name and version, executable file.
2: executable directory.
includeIglibInfo | Whether info about IGLib is included. If false then only application info is included. |
versionLevel | Level version nformation included. 2 by default, 0: one level more than infoLevel . |
additionalAssemblies | Additional assemblies that should be described in the returned info string. |
Referenced by IG.Lib.CommandLineApplicationInterpreter.CmdAbout(), and IG.Lib.CommandLineApplicationInterpreter.CmdApplicationInfo().
|
inlinestatic |
Converts the specified ProcessPriorityClass enum value to the approcimately equivalent ThreadPriority value and returns it.
processPriority | Process priority value to be converted to thread priority. |
|
inlinestatic |
Converts the specified ThreadPriority enum value to the approcimately equivalent ProcessPriorityClass value and returns it.
threadPriority | Thread priority value to be converted to thread priority. |
|
inlinestatic |
Returns the thread priority value that is equivallent to the current process' priority class.
|
inlinestatic |
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).
References IG.Lib.Util.LockGlobal.
|
inlinestatic |
This delegate is called when the global thread priority changes (property UtilSystem.ThreadPriority), but can also be called manually.
References IG.Lib.Util.LockGlobal.
|
inlinestatic |
Adds the specified method that is executed when the global thread priority changes.
onPriorityChangeMethod | Method that is added. |
References IG.Lib.Util.LockGlobal.
Referenced by IG.Num.ParallelJobDispatcherBase< JobContainerType >.RegisterSystemPriorityUpdating(), and IG.Lib.CommandLineApplicationInterpreter.RegisterSystemPriorityUpdating().
|
inlinestatic |
Removes the specified method that is executed when the global thread priority changes.
onPriorityChangeMethod | Method that is removed. |
References IG.Lib.Util.LockGlobal.
Referenced by IG.Num.ParallelJobDispatcherBase< JobContainerType >.UnregisterSystemPriorityUpdating(), and IG.Lib.CommandLineApplicationInterpreter.UnregisterSystemPriorityUpdating().
|
inlinestatic |
Detects if the specified file is a text file and detects the encoding.
filePath | The file name. |
Referenced by IG.Forms.HashGeneratorControl.GenerateFilePreview().
|
inlinestatic |
Detects if the specified file is a text file and detects the encoding.
filePath | The file name. |
numChecked | The max. number of bytes to use for testing (if 0 then complete file is used). |
|
inlinestatic |
Detects if the specified file is a text file and detects the encoding.
filePath | The file name. |
encoding | The detected encoding. |
|
inlinestatic |
Detects if the specified file is a text file and detects the encoding.
filePath | The file name. |
numChecked | The max. number of bytes to use for testing (if 0 then complete file is used). |
encoding | The detected encoding. |
Source:
http://stackoverflow.com/questions/910873/how-can-i-determine-if-a-file-is-binary-or-text-in-c
To detect file encoding, see Rick Strahl's blog:
http://www.west-wind.com/weblog/posts/2007/Nov/28/Detecting-Text-Encoding-for-StreamReader
|
inlinestatic |
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.
|
inlinestatic |
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.
relativePath | Path of the file or directory relative to the workspace directory. |
If this argument represents an absolute path then the argument itself is returned.
|
inlinestatic |
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.
Referenced by IG.Script.ScriptAppBase.DataStructuresFunctionTestCsvReadDefinitionAndData(), and IG.Script.ScriptAppBase.DataStructuresFunctionTestCsvWriteDefinitionAndData().
|
inlinestatic |
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.
relativePath | Path of the file or directory relative to the workspace projects directory. |
If this argument represents an absolute path then the argument itself is returned.
|
inlinestaticprivate |
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.
directoryPath | Directory path to be repaired. |
|
inlinestaticprivate |
Repairs the specified directory path, if applicable.
If the specified path ends with directory separator then the last character is removed.
directoryPath | Directory path to be repaired. Eventually repaired path is stored back to this variable. |
|
inlinestatic |
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.
directoryPath | Path to the directory, which can be specified in any acceptale form. |
|
inlinestatic |
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.
directoryPath | Path 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).
Referenced by IG.Script.ScriptAppBase.DataStructuresFunctionTestCsvReadDefinitionAndData(), IG.Script.ScriptAppBase.DataStructuresFunctionTestCsvWriteDefinitionAndData(), IG.Lib.ArrayDto< ElementType, ElementBaseType, ElementDtoType >.ExampleVectorArray(), and IG.Lib.ListDto< ElementType, ElementBaseType, ElementDtoType >.ExampleVectorArray().
|
inlinestatic |
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).
directoryPath | Path of the directory specified, can be a relaitve path. |
|
inlinestatic |
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!
fromPath | Path of the directory with respect to which the full path is calculated. It must be a directory path, file paths are not good. |
toPath | Path for which relative path is calculated. |
Referenced by IG.Num.SimKosecFileManagerBase.RunSimulator(), and IG.Num.NeuralApproximatorBase.SaveJson().
|
inlinestatic |
Tests calculation
|
inlinestatic |
Recursively copies contents of the source directory to the target directory.
sourceDirectoryPath | Path to the source directory. |
targetDirectoryPath | Path to the target directory. |
|
inlinestatic |
Recursively copies contents of the source directory to the target directory.
source | Source directory. |
target | Target directory. |
References IG.Lib.Util.OutputLevel.
|
inlinestatic |
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.
sourceDirectoryPath | Path to the source directory. |
targetDirectoryPath | Path to the target directory. |
numErrors | Variable where number of exceptions cathced during the call is written. |
errorsString | String 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 Util.OutputLevel>0 then all errors are reporter on console.
References IG.Lib.Util.OutputLevel.
|
inlinestatic |
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.
source | Source directory. |
target | Target directory. |
numErrors | Variable where number of exceptions cathced during the call is written. Value of the variable increments for each exception catched. |
errorsString | String 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 Util.OutputLevel>0 then all errors are reporter on console.
References IG.Lib.Util.OutputLevel.
|
inlinestatic |
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.
baseDirPath | Path of the base directory within which the structure is created. |
rootDirName | Name of the root directoy of the created directory structure. |
|
inlinestatic |
Examp
sourceDirPath | |
targetDirPath |
References IG.Lib.Util.OutputLevel, IG.Lib.StopWatch.Start(), IG.Lib.StopWatch.Stop(), and IG.Lib.StopWatch.Time.
|
inlinestatic |
Save the specified serialized object in binary form to the specified file.
objectToSave | Object to be saved. |
fileName | File name to save the object into. |
ObjectType | Type of the object to be saved. |
The object is saved using .NET serialization (binary formatter is used).
|
inlinestatic |
Save the specified serialized object in binary form to the specified stream.
objectToSave | Object to be saved. |
stream | Stream to save the object into. |
ObjectType | Type of the object to be saved. |
The object is saved using .NET serialization (binary formatter is used).
|
inlinestatic |
Loads the from specified file.
fileName | File name to load network from. |
ObjectType | Type of the object to be saved. |
Neural network is loaded from file using .NET serialization (binary formater is used).
|
inlinestatic |
Load network from specified file.
stream | Stream to load network from. |
ObjectType | Type of the object to be saved. |
Neural network is loaded from file using .NET serialization (binary formater is used).
|
inlinestatic |
Save the specified serialized object in binary form to the specified file.
objectToSave | Object to be saved. |
fileName | File name to save the object into. |
The object is saved using .NET serialization (binary formatter is used).
Referenced by IG.Num.SampledDataSet.SaveBinary().
|
inlinestatic |
Save the specified serialized object in binary form to the specified stream.
objectToSave | Object to be saved. |
stream | Stream to save the object into. |
The object is saved using .NET serialization (binary formatter is used).
|
inlinestatic |
Loads the from specified file.
fileName | File name to load network from. |
Neural network is loaded from file using .NET serialization (binary formater is used).
Referenced by IG.Num.SampledDataSet.LoadBinary().
|
inlinestatic |
Load network from specified file.
stream | Stream to load network from. |
Neural network is loaded from file using .NET serialization (binary formater is used).
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
Assemblies directly referenced by the current executale assembly. Calculated only once, lazy evaluation.
|
staticprivate |
Assemblies directly or indirectly referenced by the current executale assembly. Calculated only once, lazy evaluation.
|
staticprivate |
Assemblies directly referenced by the current executale assembly. Assemblies from global assembly cache are also included. Calculated only once, lazy evaluation.
|
staticprivate |
Assemblies directly or indirectly referenced by the current executale assembly. Calculated only once, lazy evaluation.
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
private |
Minimal number of checked bytes when determining whether a file is a text file.
|
private |
|
private |
|
private |
|
staticgetprivate |
Whether user name has already been retrieved ans stored.
|
staticget |
Gets name of the current user.
Referenced by IG.Script.ScriptAppBase.SystemFunctionUserName().
|
staticget |
Gets name of the current user with all letters converted to lower case (in order to avoid ambiguities).
|
staticget |
Returns true if the current user logged on the computer is Igor, or false otherwise.
|
staticget |
Returns true if the current user logged on the computer is Tadej, or false otherwise.
|
staticget |
Returns true if the operating system is a Windows variant, false otherwise.
Referenced by IG.Lib.UtilSystem.ExecuteSystemCommand().
|
staticget |
Returns true if the operating system is a Linux variant, false otherwise.
|
staticget |
Returns true if the operating system is a MacOs variant, false otherwise.
|
staticget |
Returns assembly of the current executable, obtained by Assembly.GetEntryAssembly().
|
staticget |
Returns assembly of the current executable, obtained by Assembly.GetEntryAssembly().
|
staticgetset |
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.
|
staticgetset |
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.
Referenced by IG.Lib.CommandLineApplicationInterpreter.CmdSetPriority(), IG.Num.ParallelJobDispatcherBase< JobContainerType >.UpdateThreadPriorityFromSystem(), and IG.Lib.CommandLineApplicationInterpreter.UpdateThreadPriorityFromSystem().