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

- Main Page
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros
Classes | Static Public Member Functions | Properties | Static Private Member Functions | Private Attributes | Static Private Attributes | List of all members
IG.Lib.UtilSystem Class Reference

General utilities. More...

## Classes
class | MissingAssembly
class | ResolutionIdentity
| Provides identity for assembly resolution attempts. More...

## 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 Process | OpenFileInDefaultApplication (string filePath)
| Opens the specified file in the default system's application for handling this kind of prcesses, and returns the process that opened the file. More...
static Process | OpenFileInDefaultBrowser (string filePath)
| Opens the specified file in the system's default browser. More...
static Process | 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 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 Assembly | GetAssemblyByName (string assemblyName, bool caseSensitive=false, bool loadIfNecessary=true, bool byFileName=false)
| Finnds and returns assembly specified by file name. More...
static Assembly | GetAssemblyByFileName (string assemblyName, bool caseSensitive=false, bool loadIfNecessary=true)
| Finnds and returns assembly specified by file name. More...
static Assembly | GetAssemblyByNameOrFileName (string assemblyName, bool caseSensitive=false, bool loadIfNecessary=true, bool byName=true, bool byFileName=true)
| Finnds and returns assembly specified by name. More...
static Assembly[] | GetLoadedAssemblies ()
| Returns a list of all currently loaded assemblies in the applicattion. More...
static IList< Assembly > | GetLoadedAssemblies (IList< Assembly > assemblyList, bool clearBefore=true)
| Adds all loaded assembly from the current application domain to the specified list, and returns the list. 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 IList< Assembly > | GetReferencedAssembliesWithoutGac (IList< Assembly > assemblyList, bool clearBefore=true)
| Adds the executable assembly and all its referenced assemblies (directly or indirectly) without those from GAC to the specified list, and returns the list. 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 IList< Assembly > | GetReferencedAssemblies (IList< Assembly > assemblyList, bool clearBefore=true)
| Adds the executable assembly and all its DIRECTLY referenced assemblies without those from GAC to the specified list, and returns the list. More...
static Assembly[] | GetReferencedAssembliesRecursive ()
| Returns an array containing the executable assembly and all its referenced assemblies (directly or indirectly), which roughly coincides with all assemblies that can be potentially used by the current application. Assemblies from the Global Assembly Cache (GAC) are also included. More...
static IList< Assembly > | GetReferencedAssembliesRecursive (IList< Assembly > assemblyList, bool clearBefore=true)
| Adds the executable assembly and all its referenced (directly or indirectly) assemblies to the specified list, and returns the list. This roughly coincides with all assemblies that can be potentially used by the current application. 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 - those referenced assemblies that could not be loaded. More...
static string | SimpleAssemblyName (string fullName)
| Returns a simple assembly name that corresponds to the specified full name of the assembly. More...
static void | RegisterAssemblyResolveHandler ()
| Registers tis class' event handler for resolving assembly load failures. More...
static void | UnregisterAssemblyResolveHandler ()
| Unregisters tis class' event handler for resolving assembly load failures. More...
static void | AddAssemblyResolutionPath (string path)
| Adds a new directory where assemblies to be loaded are looked for. More...
static void | RemoveAssemblyResolutionPath (string path)
| Removes the specified directory where assemblies to be loaded are looked for. More...
static Assembly | LoadAssembly (string fullName, int outputLevel=2, bool reflectionOnly=false)
| Loads the specified assembly. More...
static Assembly[] | LoadAssemblies (string[] fullNames, int outputLevel=2, bool reflectionOnly=false)
| Loads all the assemblies specified by arguments, and returns the array of loaded assemblies. More...
static string | GetAssemblyName (Assembly assembly)
| Returns the simple 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 | GetAssemblyAssemblyFullName (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 Type | GetType (string className, string nameSpace=null, bool ignoreCase=true, bool tryWithoutNamespace=true)
| Finds a type with the specified class name and returns it. More...
static Type | GetType (string className, bool ignoreCase=false)
| Finds a type with the specified class name and returns it. More...
static object | InstantiateObject (Type objectType, Type superClass=null, Type notSuperClass=null)
| Instantiates an object of the specified type and performs checks on type inheritance if this is specified by parameters. More...
static bool | IsPathResxResource (string resourcePath)
| Returns a flag indicating whether the specified resource path represents a resource included through a resource file (extension .resx, which compiles to file with extension .resourced). More...
static bool | IsPathResxResourceFile (string resourcePath)
| Returns a flag indicating whether the specified resource path represents a compiled resource file that was compiled via the XML resource file (extension .resx, which compiles to file with extension .resourced). More...
static bool | IsPathEmbeddedResource (string resourcePath)
| Returns a flag indicating whether the specified resource path represents an embedded resource (a resource that is compiled into assembly as a stand-alone file). More...
static string | GetResxResourceName (string resourcePath)
| Returns name of the resource with the specified path that was compiled to assembly throuwh a .resx file (XML resource file). More...
static string | GetResxResourceFilePath (string resourcePath)
| Returns path of the resource file, given the specified path of a resource (or its resource file) that was compiled to assembly through a .resx file (XML resource file). More...
static string | GetEmbeddedResourceName (string resourcePath)
| Returns name of the embedded resource (i.e., its filename) with the specified path. More...
static string | GetEmbeddedResourceDirectory (string resourcePath)
| Returns path of the embedded resource' directory for a resource with the specified path. More...
static Stream | AssemblyEmbeddedFileResourceStream (Assembly assembly, string resourceName)
| Returns a stream containing the embedded file resource included in the specified assembly. More...
static Stream | AssemblyEmbeddedFileResourceStream (string resourceName)
| Returns a stream containing the embedded file resource included in the currently executing assembly. More...
static IList< string > | GetAssemblyResourceFiles (Assembly assembly, ref IList< string > resourceNames, bool clearBefore=true)
| The same as GetAssemblyResourceFiles(Assembly, IList{string}, bool,), except that list of resource files is passed by references and a newly created list is assigned to the argument when a null valued variable is passed. More...
static IList< string > | GetAssemblyResourceFiles (Assembly assembly, IList< string > resourceNames=null, bool clearBefore=true)
| Returns names of the resource files (generated from .resx files, with .resources extensions) in the specified assemnly and stores them on the provided list. More...
static IList< string > | GetAssemblyEmbeddedFileResources (Assembly assembly, ref IList< string > resourceNames, bool clearBefore=true, bool includeResourceFiles=false)
| The same as GetAssemblyEmbeddedFileResources(Assembly, IList{string}, bool, bool), except that list of resources is passed by references and a newly created list is assigned to the argument when a null valued variable is passed. More...
static IList< string > | GetAssemblyEmbeddedFileResources (Assembly assembly, IList< string > resourceNames=null, bool clearBefore=true, bool includeResourceFiles=false)
| Returns names of the embedded resources in the specified assemnly and stores them on the provided collection. More...
static IList< string > | GetAssemblyResxResources (Assembly assembly, ref IList< string > resourceNames, bool clearBefore=true)
| The same as GetAssemblyResxResources(Assembly, IList{string}, bool), except that list of resources is passed by references and a newly created list is assigned to the argument when a null valued variable is passed. More...
static IList< string > | GetAssemblyResxResources (Assembly assembly, IList< string > resourceNames=null, bool clearBefore=true)
| Returns names of the resources included in the specified assemnly through a .resx file and stores them on the provided collection. More...
static string | GetAssemblyResourcesInfo (Assembly assembly, bool includeEmbedded=true, bool includeResx=true, int outputLevel=1)
| Returns a string containing informatio nabout resources contained in the specified assembly, such as images, sounds, strings, and various files. Information returned is on embedded resources (i.e., files that are compiled into assembly and are accessed by path in a directory-like structure and full file names, eventually with extension) and resources that are compiled into .resix files and are thus accessed by a fully qualified name of a property in a Resources class. More...
static bool | IsBitmapExtensionDotNet (string extension)
| Returns true if the speicified file extesion (without a '.') represents one of the standard .NET recognized bitmap file extensions; false if not. More...
static bool | IsSoundExtensionDotNet (string extension)
| Returns true if the speicified file extesion (without a '.') represents one of the standard .NET recognized sound file extensions; false if not. 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 | GetAbsolutePath (string path)
| Returns the absolute path of the specified path (which can be relative or absolute or whatever legal form). 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 int | ListFilesRecursively (string directoryPath, ref List< string > pathList, List< string > auxList, int numLevels=0, bool includeList=false, bool clearOnBeginning=true, bool RelativePaths=false, bool listDirectories=true, bool listFiles=true, IList< string > searchPatterns=null)
| Recursively lists files and directories within the specified directories, and stores their paths in the specified list, ordered in a tree-like fashion (any directory is processed to all depths before another same level directory is processed). More...
static int | ListFilesByLevels (string directoryPath, ref List< string > pathList, List< string > auxList, int numLevels=0, bool includeList=false, bool clearOnBeginning=true, bool RelativePaths=false, bool listDirectories=true, bool listFiles=true, IList< string > searchPatterns=null)
| Recursively (ordered by levels) lists files and directories within the specified directories, and stores their paths in the specified list. 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 object | LockStatic`[get]`
| Locking object for static methods and properties of this class. More...
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 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 Assembly | ExecutableAssembly`[get]`
| Returns assembly of the current executable, obtained by Assembly.GetEntryAssembly(). More...
static Assembly | IglibAssembly`[get]`
| Returns assembly of the IGLib base assembly. More...
static bool | IsRegisteredAssemblyResolveHandler`[get]`
| Whether this class' event handler for resolving assembly loading is registered or not. More...
static string[] | AssemblyResolutionPaths`[get]`
static char | ResourceSeparator`[get]`
| Gets the character that is used to separate resource from the resource file (.resources). More...
static string | ResourceSeparatorString`[get]`
| Gets the string that is used to separate resource from the resource file (.resources). More...
static char | AssemblySeparator`[get]`
| Gets the character that is used to separate resource from the assembly. More...
static string | AssemblySeparatorString`[get]`
| Gets the string that is used to separate resource from the assembly. 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 bool | ResolveAlreadyFailed (ResolutionIdentity resId)
static void | AddResolveFailed (ResolutionIdentity resId)
static void | ClearResolveFailed (ResolutionIdentity resId)
static Assembly | AssemblyResolveEventHandler (object sender, ResolveEventArgs args)
| Event handler that tries to resolve assembly load. 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 object | _lockStatic = null
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
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 | _assemblyResolveHandlerAdded = false
static List< ResolutionIdentity > | _failedResolves = new List<ResolutionIdentity>()
static List< string > | _assemblyResolutionPaths = new List<string>()
static char | _resourceSeparator = ':'
static string | _resourceSeparatorString = null
static char | _assemblySeparator = ';'
static string | _assemblySeparatorString = null
static string[] | _bitmapExtensionsDotNetDefault = { "BMP", "GIF", "EXIF", "JPG", "PNG", "TIFF" }
static List< string > | _imageExtensionsDotNet = new List<string>(_bitmapExtensionsDotNetDefault)
static string[] | _soundExtensionsDotNetDefault = { "WAV" }
static List< string > | _soundExtensionsDotNet = new List<string>(_soundExtensionsDotNetDefault)
static readonly string[] | _searcPatternsNone = { null }
| Provides a convenient array of strings containing only null. More...

## 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

  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().

static string IG.Lib.UtilSystem.GetComputerName | ( |  | ) |
| inline static

Returns name of the computer on which application is running.

Referenced by IG.Script.ScriptAppBase.SystemFunctionComputerName().

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.

References IG.Lib.Util.OutputLevel.

Referenced by IG.Script.ScriptAppBase.SystemFunctionMACAddress().

static string IG.Lib.UtilSystem.GetIpAddressLocal | ( |  | ) |
| inline static

Returns the current local IP address of computer.

Referenced by IG.Script.ScriptAppBase.SystemFunctionIpAddress().

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

Referenced by IG.Script.ScriptAppBase.SystemFunctionDomainName().

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

Referenced by IG.Script.ScriptAppBase.SystemFunctionSystemInfo().

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.

Referenced by IG.Script.ScriptAppBase.SystemFunctionRuntimeVersion().

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

  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().

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

  command | Command string, usually a path to executable or other type of command.
  args | Arguments to system command.

static Process IG.Lib.UtilSystem.ExecuteSystemCommand | ( | bool | asynchronous,
|  | string | command,
|  | params string[] | args
| ) |  |
| inline static

Executes system command with arguments.

Parameters

  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.

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

  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.

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

  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.

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

  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.

Returns
  Process object that can be used to access and manimulate the process that has been executed by this method.

References IG.Lib.UtilSystem.IsWindowsOs.

static Process IG.Lib.UtilSystem.OpenFileInDefaultApplication | ( | string | filePath | ) |
| inline static

Opens the specified file in the default system's application for handling this kind of prcesses, and returns the process that opened the file.

Parameters

  filePath | Path to the file to be opened.

Returns
  Process object for the eprocess where the file is opened.

static Process IG.Lib.UtilSystem.OpenFileInDefaultBrowser | ( | string | filePath | ) |
| inline static

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

Parameters

  filePath | Path of the file to be opened.

Returns
  Process object for the eprocess where the file is opened.

Referenced by IG.Lib.HtmlWriter.Example().

static Process IG.Lib.UtilSystem.OpenUrlInDefaultBrowser | ( | string | url | ) |
| inline static

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

<url>Adress of page to be shown.</url>

Returns
  Process object for the eprocess where the file is opened.

static string IG.Lib.UtilSystem.GetCurrentProcessExecutableName | ( |  | ) |
| inline static

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.CmdBeginRepeat(), IG.Lib.CommandLineApplicationInterpreter.CmdBlock(), IG.Lib.CommandLineApplicationInterpreter.CmdCalcJsBlock(), IG.Lib.CommandLineApplicationInterpreter.CmdClearVariable(), IG.Lib.CommandLineApplicationInterpreter.CmdComment(), IG.Lib.CommandLineApplicationInterpreter.CmdCurrentDirectory(), IG.Lib.CommandLineApplicationInterpreter.CmdElse(), IG.Lib.CommandLineApplicationInterpreter.CmdElseIf(), IG.Lib.CommandLineApplicationInterpreter.CmdEndBlock(), IG.Lib.CommandLineApplicationInterpreter.CmdEndCalcJsBlock(), IG.Lib.CommandLineApplicationInterpreter.CmdEndIf(), IG.Lib.CommandLineApplicationInterpreter.CmdEndRepeat(), IG.Lib.CommandLineApplicationInterpreter.CmdEndWhile(), IG.Lib.CommandLineApplicationInterpreter.CmdExit(), IG.Lib.CommandLineApplicationInterpreter.CmdExpressionEvaluatorJavascript(), IG.Lib.CommandLineApplicationInterpreter.CmdGetVariable(), IG.Lib.CommandLineApplicationInterpreter.CmdHelp(), IG.Lib.CommandLineApplicationInterpreter.CmdIf(), IG.Lib.CommandLineApplicationInterpreter.CmdIsModuleLoaded(), IG.Lib.CommandLineApplicationInterpreter.CmdLoadModule(), IG.Lib.CommandLineApplicationInterpreter.CmdLoadScript(), IG.Lib.CommandLineApplicationInterpreter.CmdModuleTestCommand(), IG.Lib.CommandLineApplicationInterpreter.CmdOutputLevel(), IG.Lib.CommandLineApplicationInterpreter.CmdOutputLevelCalc(), 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.CmdRead(), 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.CmdSetVariableBase(), IG.Lib.CommandLineApplicationInterpreter.CmdSleepSeconds(), IG.Lib.CommandLineApplicationInterpreter.CmdStackLevel(), IG.Lib.CommandLineApplicationInterpreter.CmdSuppressInteractive(), IG.Lib.CommandLineApplicationInterpreter.CmdSuppressInteractiveFrame(), 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.CmdThreadId(), IG.Lib.CommandLineApplicationInterpreter.CmdThreadInfo(), IG.Lib.CommandLineApplicationInterpreter.CmdThtrowExceptions(), IG.Lib.CommandLineApplicationInterpreter.CmdTryRun(), IG.Lib.CommandLineApplicationInterpreter.CmdUseJint(), IG.Lib.CommandLineApplicationInterpreter.CmdWhile(), IG.Lib.CommandLineApplicationInterpreter.CmdWrite(), and IG.Lib.CommandLineApplicationInterpreter.WriteLoadableScriptReferencedAssemblies().

static string IG.Lib.UtilSystem.GetCurrentProcessExecutablePath | ( |  | ) |
| inline static

Returns the absolute path of the executable file (with extension) for the current process.

static string IG.Lib.UtilSystem.GetCurrentProcessExecutableWithoutExtension | ( |  | ) |
| inline static

Returns name of the executable file (with extension) for the current process.

static void IG.Lib.UtilSystem.GetAllProcesses | ( | ref List< Process > | processList | ) |
| inline static

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

Parameters

  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().

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

  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().

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

  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.

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

  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.

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

  processName | Name 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

  processName | Name of the process for which we check whether it is running.
  caseSensitive | Whether 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

  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).

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 Util.OutputLevel >= 1.

Parameters

  processName | Name of the process to be killed. Name is case sensitive.

References IG.Lib.Util.OutputLevel.

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 Util.OutputLevel >= 1.

Parameters

  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.

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 Util.OutputLevel >= 1.

Parameters

  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.

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 Util.OutputLevel >= 1.

Parameters

  processName | Name of the process to be killed. Name is case sensitive.

References IG.Lib.Util.OutputLevel.

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 Util.OutputLevel >= 1.

Parameters

  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.

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 Util.OutputLevel >= 1.

Parameters

  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.

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

  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().

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

  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().

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

  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.

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

  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.

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

  processName | Name 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

  processName | Name of the process for which we check whether it is running.
  caseSensitive | Whether 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

  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).

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 Util.OutputLevel >= 1.

Parameters

  processName | Name of the process to be killed. Name is case sensitive.

References IG.Lib.Util.OutputLevel.

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 Util.OutputLevel >= 1.

Parameters

  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.

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 Util.OutputLevel >= 1.

Parameters

  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.

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 Util.OutputLevel >= 1.

Parameters

  processName | Name of the process to be killed. Name is case sensitive.

References IG.Lib.Util.OutputLevel.

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 Util.OutputLevel >= 1.

Parameters

  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.

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 Util.OutputLevel >= 1.

Parameters

  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.

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

  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().

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

  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.

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

  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.

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

  mainWindowTitle | Application'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

  mainWindowTitle | Application's main window title.
  caseSensitive | Whether 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

  mainWindowTitle | Application's main window title.
  caseSensitive | Whether process name is case sensitive.
  isFullString | Whether the name is full name.

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 Util.OutputLevel >= 1.

Parameters

  mainWindowTitle | Application's main window title. Name is case sensitive.

References IG.Lib.Util.OutputLevel.

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 Util.OutputLevel >= 1.

Parameters

  mainWindowTitle | Application's main window title.
  caseSensitive | Whether process name is case sensitive.

References IG.Lib.Util.OutputLevel.

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 Util.OutputLevel >= 1.

Parameters

  mainWindowTitle | Application's main window title.
  caseSensitive | Whether process name is case sensitive.
  isFullString | Whether the name is full name.

References IG.Lib.Util.OutputLevel.

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 Util.OutputLevel >= 1.

Parameters

  mainWindowTitle | Application's main window title. Name is case sensitive.

References IG.Lib.Util.OutputLevel.

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 Util.OutputLevel >= 1.

Parameters

  mainWindowTitle | Application's main window title.
  caseSensitive | Whether process name is case sensitive.

References IG.Lib.Util.OutputLevel.

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 Util.OutputLevel >= 1.

Parameters

  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.

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

  processPriority | Process 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

  threadPriority | Thread 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

  onPriorityChangeMethod | Method that is added.

Referenced by IG.Num.ParallelJobDispatcherBase< JobContainerType >.RegisterSystemPriorityUpdating(), and IG.Lib.CommandLineApplicationInterpreter.RegisterSystemPriorityUpdating().

static void IG.Lib.UtilSystem.RemoveOnThreadPriorityChange | ( | ThreadStart | onPriorityChangeMethod | ) |
| inline static

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

Parameters

  onPriorityChangeMethod | Method that is removed.

Referenced by IG.Num.ParallelJobDispatcherBase< JobContainerType >.UnregisterSystemPriorityUpdating(), and IG.Lib.CommandLineApplicationInterpreter.UnregisterSystemPriorityUpdating().

static Assembly IG.Lib.UtilSystem.GetAssemblyByName | ( | string | assemblyName,
|  | bool | caseSensitive = `false`,
|  | bool | loadIfNecessary = `true`,
|  | bool | byFileName = `false`
| ) |  |
| inline static

Finnds and returns assembly specified by file name.

Parameters

  assemblyName | Name of the assembly file.
  caseSensitive | Whether names are case sensitive.
  loadIfNecessary | Whether assembly can be loaded.
  byFileName | Whether assemblies are searched by file name.

Referenced by IG.Script.ScriptAppBase.AssemblyFunctionInfo(), IG.Script.ScriptAppBase.AssemblyFunctionResources(), IG.Lib.CommandLineApplicationInterpreter.CmdAbout(), IG.Lib.CommandLineApplicationInterpreter.CmdApplicationInfo(), IG.Forms.ResourceViewerControl.ShowViewedItem(), IG.Forms.DllSelector.txtSelectedAssembly_TextChanged(), and IG.Forms.AssemblySelector.txtSelectedAssembly_TextChanged().

static Assembly IG.Lib.UtilSystem.GetAssemblyByFileName | ( | string | assemblyName,
|  | bool | caseSensitive = `false`,
|  | bool | loadIfNecessary = `true`
| ) |  |
| inline static

Finnds and returns assembly specified by file name.

Parameters

  assemblyName | Name of the assembly file.
  caseSensitive | Whether names are case sensitive.
  loadIfNecessary | Whether assembly can be loaded.

Referenced by IG.Script.ScriptAppBase.AssemblyFunctionInfo(), and IG.Script.ScriptAppBase.AssemblyFunctionResources().

static Assembly IG.Lib.UtilSystem.GetAssemblyByNameOrFileName | ( | string | assemblyName,
|  | bool | caseSensitive = `false`,
|  | bool | loadIfNecessary = `true`,
|  | bool | byName = `true`,
|  | bool | byFileName = `true`
| ) |  |
| inline static

Finnds and returns assembly specified by name.

Parameters

  assemblyName | Name of the assembly.
  caseSensitive | Whether names are case sensitive.
  loadIfNecessary | Whether assembly can be loaded.
  byName | Whether assembly is searched for by name rather than by its filenmae.
  byFileName | If true then assembly is searched for by file name.

References IG.Lib.UtilSystem.GetAssemblyFileName().

static Assembly [] IG.Lib.UtilSystem.GetLoadedAssemblies | ( |  | ) |
| inline static

Returns a list of all currently loaded assemblies in the applicattion.

Referenced by IG.Script.ScriptAppBase.AssemblyFunctionLoaded(), IG.Script.AppExtBase.FormDemoFunctionOpenFormOld(), IG.Lib.UtilSystem.GetType(), IG.Forms.DllSelector.RefreshLoadedAssembliesList(), and IG.Forms.AssemblySelector.RefreshLoadedAssembliesList().

static IList<Assembly> IG.Lib.UtilSystem.GetLoadedAssemblies | ( | IList< Assembly > | assemblyList,
|  | bool | clearBefore = `true`
| ) |  |
| inline static

Adds all loaded assembly from the current application domain to the specified list, and returns the list.

Parameters

  assemblyList | List on which loaded assemblies are loaded. If null then the list is created internally (inboth cases the list is returned).
  clearBefore | Spwcifies whether the list should be cleared fitst in order to remove any existent items on the list.

Returns
  List onto which the loaded assemblies were added. This makes the method usable even if the assemblyList is null, in which case the list is allocated within the method.

static Assembly [] IG.Lib.UtilSystem.GetReferencedAssembliesWithoutGac | ( |  | ) |
| inline static

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

Referenced by IG.Script.ScriptAppBase.AssemblyFunctionReferenced().

static Assembly [] IG.Lib.UtilSystem.GetReferencedAssembliesRecursiveWithoutGac | ( |  | ) |
| inline static

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

Referenced by IG.Script.ScriptAppBase.AssemblyFunctionReferenced().

static IList<Assembly> IG.Lib.UtilSystem.GetReferencedAssembliesWithoutGac | ( | IList< Assembly > | assemblyList,
|  | bool | clearBefore = `true`
| ) |  |
| inline static

Adds the executable assembly and all its referenced assemblies (directly or indirectly) without those from GAC to the specified list, and returns the list.

Parameters

  assemblyList | List on which referenced assemblies are loaded. If null then the list is created internally (inboth cases the list is returned).
  clearBefore | Spwcifies whether the list should be cleared fitst in order to remove any existent items on the list.

Returns
  List onto which the loaded assemblies were added. This makes the method usable even if the assemblyList is null, in which case the list is allocated within the method.

static Assembly [] IG.Lib.UtilSystem.GetReferencedAssemblies | ( |  | ) |
| inline static

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

Referenced by IG.Script.ScriptAppBase.AssemblyFunctionReferenced(), IG.Script.AppExtBase.FormDemoFunctionOpenFormOld(), IG.Lib.UtilSystem.GetType(), IG.Forms.DllSelector.RefreshReferencedAssembliesList(), and IG.Forms.AssemblySelector.RefreshReferencedAssembliesList().

static IList<Assembly> IG.Lib.UtilSystem.GetReferencedAssemblies | ( | IList< Assembly > | assemblyList,
|  | bool | clearBefore = `true`
| ) |  |
| inline static

Adds the executable assembly and all its DIRECTLY referenced assemblies without those from GAC to the specified list, and returns the list.

Parameters

  assemblyList | List on which referenced assemblies are loaded. If null then the list is created internally (inboth cases the list is returned).
  clearBefore | Spwcifies whether the list should be cleared fitst in order to remove any existent items on the list.

Returns
  List onto which the loaded assemblies were added. This makes the method usable even if the assemblyList is null, in which case the list is allocated within the method.

static Assembly [] IG.Lib.UtilSystem.GetReferencedAssembliesRecursive | ( |  | ) |
| inline static

Returns an array containing the executable assembly and all its referenced assemblies (directly or indirectly), which roughly coincides with all assemblies that can be potentially used by the current application. 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

Referenced by IG.Script.ScriptAppBase.AssemblyFunctionReferenced().

static IList<Assembly> IG.Lib.UtilSystem.GetReferencedAssembliesRecursive | ( | IList< Assembly > | assemblyList,
|  | bool | clearBefore = `true`
| ) |  |
| inline static

Adds the executable assembly and all its referenced (directly or indirectly) assemblies to the specified list, and returns the list. This roughly coincides with all assemblies that can be potentially used by the current application.

Parameters

  assemblyList | List on which referenced assemblies are loaded. If null then the list is created internally (inboth cases the list is returned).
  clearBefore | Spwcifies whether the list should be cleared fitst in order to remove any existent items on the list.

Returns
  List onto which the loaded assemblies were added. This makes the method usable even if the assemblyList is null, in which case the list is allocated within the method.

static List<string> IG.Lib.UtilSystem.GetReferencedAssembliesFlat | ( | Assembly | assembly | ) |
| inline static

Get assemblies referenced by the specified assembly. Not recursive.

Parameters

  assembly | Assembly whose referenced assemblies are obtained.

static Dictionary<string, Assembly> IG.Lib.UtilSystem.GetReferencedAssemblies | ( | Assembly | assembly,
|  | bool | ignoreGac = `true`,
|  | bool | recursive = `true`
| ) |  |
| inline static

Creates and returns a dictionary containing all assemblies referenced (directly or indirectly) by the specified assembly. Recursive.

Parameters

  assembly | Assembly whose referenced assemblies are obtained recursively.
  ignoreGac | Whether to ignore assemblies in GAC.
  recursive | Whetherr to get a listt of assemblies recursively.

static List<MissingAssembly> IG.Lib.UtilSystem.GetMissingAssemblies | ( | Assembly | assembly,
|  | bool | recursive = `true`
| ) |  |
| inline static

Get missing assemblies - those referenced assemblies that could not be loaded.

static void IG.Lib.UtilSystem.InternalGetReferencedAssembliesRecursive | ( | Assembly | assembly,
|  | bool | recursive = `true`
| ) |  |
| inline static private

Internal recursive method to get all referenced assemblies, and all dependent assemblies of dependent assemblies, etc.

static string IG.Lib.UtilSystem.SimpleAssemblyName | ( | string | fullName | ) |
| inline static

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.

Parameters

  fullName |

Returns

static void IG.Lib.UtilSystem.RegisterAssemblyResolveHandler | ( |  | ) |
| inline static

Registers tis class' event handler for resolving assembly load failures.

static void IG.Lib.UtilSystem.UnregisterAssemblyResolveHandler | ( |  | ) |
| inline static

Unregisters tis class' event handler for resolving assembly load failures.

static bool IG.Lib.UtilSystem.ResolveAlreadyFailed | ( | ResolutionIdentity | resId | ) |
| inline static private

static void IG.Lib.UtilSystem.AddResolveFailed | ( | ResolutionIdentity | resId | ) |
| inline static private

static void IG.Lib.UtilSystem.ClearResolveFailed | ( | ResolutionIdentity | resId | ) |
| inline static private

static void IG.Lib.UtilSystem.AddAssemblyResolutionPath | ( | string | path | ) |
| inline static

Adds a new directory where assemblies to be loaded are looked for.

Parameters

  path | Path of the directory.

static void IG.Lib.UtilSystem.RemoveAssemblyResolutionPath | ( | string | path | ) |
| inline static

Removes the specified directory where assemblies to be loaded are looked for.

Path string must be exactly the same as when the path was added to the list of locations.

Parameters

  path | Path of the directory.

static Assembly IG.Lib.UtilSystem.AssemblyResolveEventHandler | ( | object | sender,
|  | ResolveEventArgs | args
| ) |  |
| inline static private

Event handler that tries to resolve assembly load.

Parameters

  sender |
  args |

Returns

static Assembly IG.Lib.UtilSystem.LoadAssembly | ( | string | fullName,
|  | int | outputLevel = `2`,
|  | bool | reflectionOnly = `false`
| ) |  |
| inline static

Loads the specified assembly.

Parameters

  fullName | Name of the assembly to be loaded.
  outputLevel | The level of output. If greater than 0 then some information abot loading the assembly and assembly itself is printed.
  reflectionOnly | If true then assembly is loaded for inspection only, i.e. out of any applicatin domain, and can not be executed.

Returns
  Loaded assembly, or null if the assembly could not be loaded.

static Assembly [] IG.Lib.UtilSystem.LoadAssemblies | ( | string[] | fullNames,
|  | int | outputLevel = `2`,
|  | bool | reflectionOnly = `false`
| ) |  |
| inline static

Loads all the assemblies specified by arguments, and returns the array of loaded assemblies.

Parameters

  fullNames | Names of the assemblies to be loaded.
  outputLevel | The level of output. If greater than 0 then some information abot loading the assembly and assembly itself is printed.
  reflectionOnly | If true then assembly is loaded for inspection only, i.e. out of any applicatin domain, and can not be executed.

Returns
  Array of loaded assemblies.

Referenced by IG.Script.ScriptAppBase.AssemblyFunctionLoadAssemblies().

static string IG.Lib.UtilSystem.GetAssemblyName | ( | Assembly | assembly | ) |
| inline static

Returns the simple name of the specified assembly.

This method is provided, among the others, in order to standardise how assemblies are referred to within the IGLib library when version, culture and other specifics do not need to be differentiated and it only matters that logically the same assemblies are identified by some a common identifier.

Parameters

  assembly | Assembly whose name is returned.

Referenced by IG.Script.ScriptAppBase.AssemblyFunctionLoadAssemblies(), IG.Script.ScriptAppBase.AssemblyFunctionLoaded(), IG.Script.ScriptAppBase.AssemblyFunctionReferenced(), IG.Forms.AssemblySelector.comboLoadedAssemblies_SelectedIndexChanged(), IG.Forms.AssemblySelector.comboReferencedAssemblies_SelectedIndexChanged(), IG.Forms.ResourceSelector.RefreshEmbeddedResourcesList(), IG.Forms.AssemblySelector.RefreshLoadedAssembliesList(), IG.Forms.AssemblySelector.RefreshReferencedAssembliesList(), and IG.Forms.ResourceSelector.RefreshResxResourcesList().

static string IG.Lib.UtilSystem.GetAssemblyFileName | ( | Assembly | assembly | ) |
| inline static

Returns file name of the specified assembly.

Parameters

  assembly | Assembly whose file name is returned.

Referenced by IG.Lib.UtilSystem.GetAssemblyByNameOrFileName().

static string IG.Lib.UtilSystem.GetAssemblyDirectory | ( | Assembly | assembly | ) |
| inline static

Returns the directory containing the specified assembly.

Parameters

  assembly | Assembly whose directory is returned.

static string IG.Lib.UtilSystem.GetAssemblyAssemblyName | ( | Assembly | assembly | ) |
| inline static

Returns assembly name of the specified assembly.

Parameters

  assembly | Assembly whose name is returned.

static string IG.Lib.UtilSystem.GetAssemblyAssemblyFullName | ( | Assembly | assembly | ) |
| inline static

Returns assembly name of the specified assembly.

Parameters

  assembly | Assembly whose name is returned.

static string IG.Lib.UtilSystem.GetAssemblyVersion | ( | Assembly | assembly,
|  | int | numLevels = `2`
| ) |  |
| inline static

Returns version (from the file info) of the specified assembly.

Parameters

  numLevels | Nmber of levels included in the returned version string.
  assembly | Assembly whose version is returned.

Referenced by IG.Script.ScriptAppBase.AssemblyFunctionLoadAssemblies(), IG.Script.ScriptAppBase.AssemblyFunctionLoaded(), and IG.Script.ScriptAppBase.AssemblyFunctionReferenced().

static string IG.Lib.UtilSystem.GetAssemblyTitle | ( | Assembly | assembly | ) |
| inline static

Returns descriptive title of the specified assembly (from the AssemblyInfo file).

Parameters

  assembly | Assembly whose title is returned.

static string IG.Lib.UtilSystem.GetAssemblyDescription | ( | Assembly | assembly | ) |
| inline static

Returns description of the specified assembly (from assembly info).

Parameters

  assembly | Assembly whose description is returned.

static string IG.Lib.UtilSystem.GetAssemblyCompany | ( | Assembly | assembly | ) |
| inline static

Returns company attribute of the specified assembly.

Parameters

  assembly | Assembly whose company is returned.

static string IG.Lib.UtilSystem.GetAssemblyCopyrightInfo | ( | Assembly | assembly | ) |
| inline static

Returns copyright information of the specified assembly.

Parameters

  assembly | Assembly whose copyright information is returned.

static string IG.Lib.UtilSystem.GetAssemblyInfo | ( | Assembly | assembly,
|  | int | infoLevel = `3`,
|  | int | versionLevel = `0`
| ) |  |
| inline static

Returns a (possibly multiline) string containing basic information about the specified assembly, such as file name, directory, assembly name, and version.

Parameters

  infoLevel | Level of information put into the string:

1: assembly name and version, executable file.

2: executable directory, title, description.

3: creator, copyright info.

Parameters

  versionLevel | Level version nformation included. By default (value 0), one level more than infoLevel .
  assembly | Assembly whose information in readable form is returned.

Referenced by IG.Script.ScriptAppBase.AssemblyFunctionInfo(), and IG.Forms.AssemblyInfoControl.RefreshOutput().

static string IG.Lib.UtilSystem.GetExecutableFileName | ( |  | ) |
| inline static

Returns file name of the current executable.

static string IG.Lib.UtilSystem.GetExecutableDirectory | ( |  | ) |
| inline static

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

Referenced by IG.Lib.ScriptLoaderBase.GetExecutableDirectory().

static string IG.Lib.UtilSystem.GetExecutableAssemblyName | ( |  | ) |
| inline static

Returns assembly name of the current executable.

static string IG.Lib.UtilSystem.GetExecutableVersion | ( | int | numLevels = `2` | ) |
| inline static

Returns version (from the file info) of the current executable.

Parameters

  numLevels | Nmber of levels included in the returned version string.

static string IG.Lib.UtilSystem.GetExecutableTitle | ( |  | ) |
| inline static

Returns descriptive title of the current executable (from the AssemblyInfo file).

static string IG.Lib.UtilSystem.GetExecutableDescription | ( |  | ) |
| inline static

Returns description of the current executable (from the AssemblyInfo file).

static string IG.Lib.UtilSystem.GetExecutableCompany | ( |  | ) |
| inline static

Returns company attribute of the currentt executable.

static string IG.Lib.UtilSystem.GetExecutableCopyrightInfo | ( |  | ) |
| inline static

Returns copyright information of the current executable.

static string IG.Lib.UtilSystem.GetExecutableInfo | ( | int | infoLevel = `3`,
|  | int | versionLevel = `0`
| ) |  |
| inline static

Returns a (possibly multiline) string containing basic information about the current executable, such as executable file name and directory.

Parameters

  infoLevel | Level of information put into the string:

1: assembly name and version, executable file.

2: executable directory, title, description.

3: creator, copyright info.

Parameters

  versionLevel | Level version nformation included. By default (vlue 0), one level more than infoLevel .

static string IG.Lib.UtilSystem.GetIglibFileName | ( |  | ) |
| inline static

Returns file name of the IGLib assembly.

static string IG.Lib.UtilSystem.GetIglibDirectory | ( |  | ) |
| inline static

Returns the directory containing the IGLib assembly.

static string IG.Lib.UtilSystem.GetIglibAssemblyName | ( |  | ) |
| inline static

Returns assembly name of the IGLib assembly.

static string IG.Lib.UtilSystem.GetIglibVersion | ( | int | numLevels = `2` | ) |
| inline static

Returns version (from the file info) of the IGLib assembly.

Parameters

  numLevels | Nmber of levels included in the returned version string.

static string IG.Lib.UtilSystem.GetIglibTitle | ( |  | ) |
| inline static

Returns descriptive title of the IGLib assembly (from the AssemblyInfo file).

static string IG.Lib.UtilSystem.GetIglibDescription | ( |  | ) |
| inline static

Returns description of the IGLib assembly (from assembly info).

static string IG.Lib.UtilSystem.GetIglibCompany | ( |  | ) |
| inline static

Returns company attribute of the IGLib assembly.

static string IG.Lib.UtilSystem.GetIglibCopyrightInfo | ( |  | ) |
| inline static

Returns copyright information of the IGLib assembly.

static string IG.Lib.UtilSystem.GetIglibInfo | ( | int | infoLevel = `3`,
|  | int | versionLevel = `0`
| ) |  |
| inline static

Returns a (possibly multiline) string containing basic information about the IGLib base library, such as file name, directory, assembly name, and version.

Parameters

  infoLevel | Level of information put into the string:

1: assembly name and version, executable file.

2: executable directory, title, description.

3: creator, copyright info.

Parameters

  versionLevel | Level version nformation included. By default (value 0), one level more than infoLevel .

static string IG.Lib.UtilSystem.GetApplicationInfo | ( | int | infoLevel = `3`,
|  | bool | includeIglibInfo = `true`,
|  | int | versionLevel = `2`,
|  | IList< Assembly > | additionalAssemblies = `null`
| ) |  |
| inline static

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.

Parameters

  infoLevel | Level of information put into the string:

1: assembly name and version, executable file.

2: executable directory.

Parameters

  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().

static Type IG.Lib.UtilSystem.GetType | ( | string | className,
|  | string | nameSpace = `null`,
|  | bool | ignoreCase = `true`,
|  | bool | tryWithoutNamespace = `true`
| ) |  |
| inline static

Finds a type with the specified class name and returns it.

The type is searched for in the executable assembly, the current assembly, all loaded assemblies and in the referenced assemblies of the executable assembly.

If the type can not be found then 0 is returned (no exceptions thrown).

Parameters

  className | Name of the type to be obtained. It must include namespace unless the namespace is specified separately by the nameSpace parameter.
  nameSpace | If provided then this parameter is prepended to the class name as (. separated) namespace.

If thee tryWithoutNamespace parameter is true then type name is also tried without the namespace, but this is done after the name prepended with a namespace is tried (when namespace is specified).

Parameters

  ignoreCase | If true then type name is case insensitive; default is false (case sensitive names).
  tryWithoutNamespace | If true then search for a type without namespace is attempted, too, even if the namespace is specified.

Referenced by IG.Script.AppExtBase.FormDemoFunctionOpenFormOrControl().

static Type IG.Lib.UtilSystem.GetType | ( | string | className,
|  | bool | ignoreCase = `false`
| ) |  |
| inline static

Finds a type with the specified class name and returns it.

The type is searched for in the executable assembly, the current assembly, all loaded assemblies and in the referenced assemblies of the executable assembly.

If the type can not be found then 0 is returned (no exceptions thrown).

Parameters

  className | Full name of the type to be obtaines (must include namespace).
  ignoreCase | If true then type name is case insensitive; default is false (case sensitive names).

References IG.Lib.UtilSystem.GetLoadedAssemblies(), and IG.Lib.UtilSystem.GetReferencedAssemblies().

static object IG.Lib.UtilSystem.InstantiateObject | ( | Type | objectType,
|  | Type | superClass = `null`,
|  | Type | notSuperClass = `null`
| ) |  |
| inline static

Instantiates an object of the specified type and performs checks on type inheritance if this is specified by parameters.

Object type must have an argument-less constructor, otherwise exception is thrown.

Exceptions

  InvalidCastException | Thrown if object type does not correspond to the inheritance requirements specified by parameters.
  ArgumentException | Thrown if objectType is null.

Parameters

  objectType | Type of the object to be instantiated.
  superClass | If specified (not null) then the objectType must inherit from this type.
  notSuperClass | If specified (not null) then the objectType must NOT inherit from this type.

Returns
  Newly created object of the specified type.

static bool IG.Lib.UtilSystem.IsPathResxResource | ( | string | resourcePath | ) |
| inline static

Returns a flag indicating whether the specified resource path represents a resource included through a resource file (extension .resx, which compiles to file with extension .resourced).

Parameters

  resourcePath | Full path to the resource. If this is a resource that was included via resource file (.resx), this consists of the path of the resources file (extension .resources) and name of the resource without extension.

static bool IG.Lib.UtilSystem.IsPathResxResourceFile | ( | string | resourcePath | ) |
| inline static

Returns a flag indicating whether the specified resource path represents a compiled resource file that was compiled via the XML resource file (extension .resx, which compiles to file with extension .resourced).

Parameters

  resourcePath | Full path to the resource or resource file. If this is a resource that was included via resource file (.resx), this consists of the path of the resources file (extension .resources) and name of the resource without extension.

static bool IG.Lib.UtilSystem.IsPathEmbeddedResource | ( | string | resourcePath | ) |
| inline static

Returns a flag indicating whether the specified resource path represents an embedded resource (a resource that is compiled into assembly as a stand-alone file).

Parameters

  resourcePath | Full path to the resource or resource file. If this is a resource that was included via resource file (.resx), this consists of the path of the resources file (extension .resources) and name of the resource without extension.

static string IG.Lib.UtilSystem.GetResxResourceName | ( | string | resourcePath | ) |
| inline static

Returns name of the resource with the specified path that was compiled to assembly throuwh a .resx file (XML resource file).

If the resourcePath does not represent such a resource then null is returned.

Parameters

  resourcePath | Full path to the resource or resource file. If this is a resource that was included via resource file (.resx), this consists of the path of the resources file (extension .resources) and name of the resource without extension.

static string IG.Lib.UtilSystem.GetResxResourceFilePath | ( | string | resourcePath | ) |
| inline static

Returns path of the resource file, given the specified path of a resource (or its resource file) that was compiled to assembly through a .resx file (XML resource file).

If the resourcePath does not represent such a resource then null is returned.

Parameters

  resourcePath | Full path to the resource or resource file. If this is a resource that was included via resource file (.resx), this consists of the path of the resources file (extension .resources) and name of the resource without extension.

IMPORTANT: For this method, parameter can either be a path to the resource (consisting of resource file path and resource name separated by colon) or it can just be a path to the resource.

static string IG.Lib.UtilSystem.GetEmbeddedResourceName | ( | string | resourcePath | ) |
| inline static

Returns name of the embedded resource (i.e., its filename) with the specified path.

If the resourcePath does not represent such a resource then null is returned.

WARNING: This method is not reliable and can only be ursed for informative purposes! For example, it does not return the correct path if the embedded resource file does not have an extension.

summary>

Parameters

  resourcePath | Full path to the resource or resource file. If this is a resource that was included via resource file (.resx), this consists of the path of the resources file (extension .resources) and name of the resource without extension.

static string IG.Lib.UtilSystem.GetEmbeddedResourceDirectory | ( | string | resourcePath | ) |
| inline static

Returns path of the embedded resource' directory for a resource with the specified path.

If the resourcePath does not represent such a resource then null is returned.

WARNING: This method is not reliable and can only be ursed for informative purposes! For example, it does not return the correct path if the embedded resource file does not have an extension.

Parameters

  resourcePath | Full path to the resource or resource file. If this is a resource that was included via resource file (.resx), this consists of the path of the resources file (extension .resources) and name of the resource without extension.

static Stream IG.Lib.UtilSystem.AssemblyEmbeddedFileResourceStream | ( | Assembly | assembly,
|  | string | resourceName
| ) |  |
| inline static

Returns a stream containing the embedded file resource included in the specified assembly.

Parameters

  assembly | Assembly from which the resource is obtained.
  resourceName | Name of the embedded file resource (i.e., its complete path, consisting of the default namespace of the assembly, dot separated directory path, and resource file name).

Returns
  Open readable stream (which must be closed upon use) containing the resource.

static Stream IG.Lib.UtilSystem.AssemblyEmbeddedFileResourceStream | ( | string | resourceName | ) |
| inline static

Returns a stream containing the embedded file resource included in the currently executing assembly.

Parameters

  resourceName | Name of the embedded file resource (i.e., its complete path, consisting of the default namespace of the assembly, dot separated directory path, and resource file name).

Returns
  Open readable stream (which must be closed upon use) containing the resource.

static IList<string> IG.Lib.UtilSystem.GetAssemblyResourceFiles | ( | Assembly | assembly,
|  | ref IList< string > | resourceNames,
|  | bool | clearBefore = `true`
| ) |  |
| inline static

The same as GetAssemblyResourceFiles(Assembly, IList{string}, bool,), except that list of resource files is passed by references and a newly created list is assigned to the argument when a null valued variable is passed.

static IList<string> IG.Lib.UtilSystem.GetAssemblyResourceFiles | ( | Assembly | assembly,
|  | IList< string > | resourceNames = `null`,
|  | bool | clearBefore = `true`
| ) |  |
| inline static

Returns names of the resource files (generated from .resx files, with .resources extensions) in the specified assemnly and stores them on the provided list.

Parameters

  assembly | Assembly that is searched for contained resources.
  resourceNames | A IList list object where the names of lcated resources are stored.

If the list is not provided (i.e., it is null) then it is created by the function and returned.

Parameters

  clearBefore | If true then the provided list is cleared before resource names are loaded on it.

Returns
  Reference of the list where names of the located resources are stored. This makes the method usable for the case where the caller does not provide the list, in which case it is created anew.

static IList<string> IG.Lib.UtilSystem.GetAssemblyEmbeddedFileResources | ( | Assembly | assembly,
|  | ref IList< string > | resourceNames,
|  | bool | clearBefore = `true`,
|  | bool | includeResourceFiles = `false`
| ) |  |
| inline static

The same as GetAssemblyEmbeddedFileResources(Assembly, IList{string}, bool, bool), except that list of resources is passed by references and a newly created list is assigned to the argument when a null valued variable is passed.

Referenced by IG.Forms.ResourceSelector.RefreshEmbeddedResourcesList().

static IList<string> IG.Lib.UtilSystem.GetAssemblyEmbeddedFileResources | ( | Assembly | assembly,
|  | IList< string > | resourceNames = `null`,
|  | bool | clearBefore = `true`,
|  | bool | includeResourceFiles = `false`
| ) |  |
| inline static

Returns names of the embedded resources in the specified assemnly and stores them on the provided collection.

In order to get a list of resource files (compiled from .resx files), call the GetAssemblyResourceFiles(Assembly, IList{string}, bool) method.

Parameters

  assembly | Assembly that is searched for contained resources.
  resourceNames | A IList list object where the names of lcated resources are stored.

If the list is not provided (i.e., it is null) then it is created by the function and returned.

Parameters

  clearBefore | If true then the provided list is cleared before resource names are loaded on it.
  includeResourceFiles | If true then resource files will also be included on the list. Default is false.

Returns
  Reference of the list where names of the located resources are stored. This makes the method usable for the case where the caller does not provide the list, in which case it is created anew.

static IList<string> IG.Lib.UtilSystem.GetAssemblyResxResources | ( | Assembly | assembly,
|  | ref IList< string > | resourceNames,
|  | bool | clearBefore = `true`
| ) |  |
| inline static

The same as GetAssemblyResxResources(Assembly, IList{string}, bool), except that list of resources is passed by references and a newly created list is assigned to the argument when a null valued variable is passed.

Referenced by IG.Forms.ResourceSelector.RefreshResxResourcesList().

static IList<string> IG.Lib.UtilSystem.GetAssemblyResxResources | ( | Assembly | assembly,
|  | IList< string > | resourceNames = `null`,
|  | bool | clearBefore = `true`
| ) |  |
| inline static

Returns names of the resources included in the specified assemnly through a .resx file and stores them on the provided collection.

See: http://stackoverflow.com/questions/2041000/loop-through-all-the-resources-in-a-resx-file

Parameters

  assembly | Assembly that is searched for contained resources.
  resourceNames | A IList list object where the names of lcated resources are stored.

If the list is not provided (i.e., it is null) then it is created by the function and returned.

Parameters

  clearBefore | If true then the provided list is cleared before resource names are loaded on it.

Returns
  Reference of the list where names of the located resources are stored. This makes the method usable for the case where the caller does not provide the list, in which case it is created anew.

static string IG.Lib.UtilSystem.GetAssemblyResourcesInfo | ( | Assembly | assembly,
|  | bool | includeEmbedded = `true`,
|  | bool | includeResx = `true`,
|  | int | outputLevel = `1`
| ) |  |
| inline static

Returns a string containing informatio nabout resources contained in the specified assembly, such as images, sounds, strings, and various files. Information returned is on embedded resources (i.e., files that are compiled into assembly and are accessed by path in a directory-like structure and full file names, eventually with extension) and resources that are compiled into .resix files and are thus accessed by a fully qualified name of a property in a Resources class.

Parameters

  assembly | Assembly that is searched for resources. You can find application-related assemblies by one of the corresponding methods in the UtilSystem class.
  includeEmbedded | Specifies whether embedded resources are included in the report.
  includeResx | Specifies whether rerources from .resources files (compiled through .resx filles) are included in the report.
  outputLevel | Level of output that is output to console. If 0 then no output is produced.

Currently only 0 (no output at all) and 1 or more (complete output) are supported.

Returns
  A string containing names of all located resources, each contained in a separate line.

Referenced by IG.Script.ScriptAppBase.AssemblyFunctionResources().

static bool IG.Lib.UtilSystem.IsBitmapExtensionDotNet | ( | string | extension | ) |
| inline static

Returns true if the speicified file extesion (without a '.') represents one of the standard .NET recognized bitmap file extensions; false if not.

Parameters

  extension | File extension that is checked; should not contain '.', case does not matter.

Returns

static bool IG.Lib.UtilSystem.IsSoundExtensionDotNet | ( | string | extension | ) |
| inline static

Returns true if the speicified file extesion (without a '.') represents one of the standard .NET recognized sound file extensions; false if not.

Parameters

  extension | File extension that is checked; should not contain '.', case does not matter.

Returns

static bool IG.Lib.UtilSystem.IsTextFile | ( | string | filePath | ) |
| inline static

Detects if the specified file is a text file and detects the encoding.

Parameters

  filePath | The file name.

Returns
  true if the specified file is a text file text.

Referenced by IG.Forms.HashControl.GenerateFilePreview().

static bool IG.Lib.UtilSystem.IsTextFile | ( | string | filePath,
|  | int | numChecked
| ) |  |
| inline static

Detects if the specified file is a text file and detects the encoding.

Parameters

  filePath | The file name.
  numChecked | The max. number of bytes to use for testing (if 0 then complete file is used).

Returns
  true if the specified file is a text file text.

static bool IG.Lib.UtilSystem.IsTextFile | ( | string | filePath,
|  | out Encoding | encoding
| ) |  |
| inline static

Detects if the specified file is a text file and detects the encoding.

Parameters

  filePath | The file name.
  encoding | The detected encoding.

Returns
  true if the specified file is a text file text.

static bool IG.Lib.UtilSystem.IsTextFile | ( | string | filePath,
|  | int | numChecked,
|  | out Encoding | encoding
| ) |  |
| inline static

Detects if the specified file is a text file and detects the encoding.

Parameters

  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.

Returns
  true if the specified file is a text file text.

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

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

  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.

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.

Referenced by IG.Script.ScriptAppBase.DataStructuresFunctionTestCsvReadDefinitionAndData(), and IG.Script.ScriptAppBase.DataStructuresFunctionTestCsvWriteDefinitionAndData().

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

  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.

Returns

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

  directoryPath | Directory 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

  directoryPath | Directory 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

  directoryPath | Path 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.

Referenced by IG.Script.ScriptAppBase.FileFunctionCurrentDirectory(), and IG.Script.ScriptAppBase.FileFunctionStandardPath().

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

  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(), IG.Lib.ListDto< ElementType, ElementBaseType, ElementDtoType >.ExampleVectorArray(), and IG.Script.LoadableScriptShellNeuralBase.ParSimGetOptimizationDirectoryPath().

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

  directoryPath | Path of the directory specified, can be a relaitve path.

Referenced by IG.Script.ScriptAppBase.FileFunctionCurrentDirectory().

static string IG.Lib.UtilSystem.GetAbsolutePath | ( | string | path | ) |
| inline static

Returns the absolute path of the specified path (which can be relative or absolute or whatever legal form).

Parameters

  path | Path whose absolute path is returned.

Referenced by IG.Script.ScriptAppBase.CryptoFunctionCheckSum_OLD_TO_DELETE_LATER(), IG.Forms.DirectorySelector.GetFilePathRepresentation(), IG.Forms.FileSelector.GetFilePathRepresentation(), and IG.Crypto.CryptoManager.GetInputFilePaths().

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

  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.

Returns
  Relative path of the second argument with respect to the first argument.

Referenced by IG.Script.ScriptAppBase.CryptoFunctionCheckSum_OLD_TO_DELETE_LATER(), IG.Script.ScriptAppBase.FileFunctionRelativePath(), IG.Forms.DirectorySelector.GetFilePathRepresentation(), IG.Forms.FileSelector.GetFilePathRepresentation(), IG.Crypto.CryptoManager.GetInputFilePaths(), IG.Lib.UtilSystem.ListFilesByLevels(), IG.Lib.UtilSystem.ListFilesRecursively(), IG.Num.SimKosecFileManagerBase.RunSimulator(), and IG.Num.NeuralApproximatorBase.SaveJson().

static void IG.Lib.UtilSystem.ExampleRelativePath | ( |  | ) |
| inline static

Tests calculation

static int IG.Lib.UtilSystem.ListFilesRecursively | ( | string | directoryPath,
|  | ref List< string > | pathList,
|  | List< string > | auxList,
|  | int | numLevels = `0`,
|  | bool | includeList = `false`,
|  | bool | clearOnBeginning = `true`,
|  | bool | RelativePaths = `false`,
|  | bool | listDirectories = `true`,
|  | bool | listFiles = `true`,
|  | IList< string > | searchPatterns = `null`
| ) |  |
| inline static

Recursively lists files and directories within the specified directories, and stores their paths in the specified list, ordered in a tree-like fashion (any directory is processed to all depths before another same level directory is processed).

Files and directories can be listed in a single or in several root directories.

Only files or only directories can be listed, and a list of matching pattern such as {"*.txt", "*.dll"} can be specified.

This function is not recursive.

Parameters

  directoryPath | Path within which files and/or directories will be listed.

If not specified then it is ignored, and files/directories will not be searched for in this path (but they can still be searched for in directories contained in pathList ) if includeList is true.

Parameters

  pathList | List where matching paths are stored.

If null then it is created anew.

If already populated and includeList is true then files/directories will also be listed in the directories whose paths are included in the list before the call. This is regardless of the value of the clearOnBeginning flag.

If already populated and clearOnBeginning is false then discovered files will be added to existig ones.

Parameters

  auxList | Auxiliary list provided for the method to store its working data. If null then the method allocates one.
  numLevels | Number of levels of subdirectories in which files/directories are listed.

If less than 0 then unlimited number of levels will be searched for.

If 0 then no files/directories will be searched for.

If 1 then only those files/directories are listed that are contained directly in the directoryPath directory (and eventually in directories contained in the directories contained in pathList prior to the method call, if includeList

is true). If 2 then also files/directories in the first level directories are listed, if 3 then also files/directories in the second level directories will be listed, etc.

Parameters

  includeList | If true then search for files/directories is also performed in directories that were contained in teh pathList just before the method was called (beside the directoryPath ).
  clearOnBeginning | If true then the list of files (parameter pathList ) is cleared before any discovered files or directories are added to the list. If false then discovered files/directories are just added to the existing paths.
  RelativePaths | If true then all paths that are put to the list are converted to relative path with respect to the current directory. Relative paths with respect to any other directory are not implemented.
  listDirectories | If true then directory paths are also listed (which is default), otherwise directories are omitted.
  listFiles | If true then file paths are also listed (which is default), otherwise files are omitted.
  searchPatterns | Eventual list of search patterns according to which files are searched for.

WARNING: search patterns do not apply to directories.

Returns
  The number of discovered matching paths that were added to the list.

References IG.Lib.UtilSystem.GetRelativePath().

Referenced by IG.Script.ScriptAppBase.CryptoFunctionCheckSum_OLD_TO_DELETE_LATER(), and IG.Crypto.CryptoManager.GetInputFilePaths().

static int IG.Lib.UtilSystem.ListFilesByLevels | ( | string | directoryPath,
|  | ref List< string > | pathList,
|  | List< string > | auxList,
|  | int | numLevels = `0`,
|  | bool | includeList = `false`,
|  | bool | clearOnBeginning = `true`,
|  | bool | RelativePaths = `false`,
|  | bool | listDirectories = `true`,
|  | bool | listFiles = `true`,
|  | IList< string > | searchPatterns = `null`
| ) |  |
| inline static

Recursively (ordered by levels) lists files and directories within the specified directories, and stores their paths in the specified list.

Listing is done in a level order, meaning that path at the first level are listed first, then paths at the second level (contained in the first level directories), etc.

Files and directories can be listed in a single directory or in several directories.

Only files or only directories can be listed, and a list of matching pattern such as {"*.txt", "*.dll"} can be specified.

This function is not recursive.

Parameters

  directoryPath | Path within which files and/or directories will be listed.

If not specified then it is ignored, and files/directories will not be searched for in this path (but they can still be searched for in directories contained in pathList ) if includeList is true.

Parameters

  pathList | List where matching paths are stored.

If null then it is created anew.

If already populated and includeList is true then files/directories will also be listed in the directories whose paths are included in the list before the call. This is regardless of the value of the clearOnBeginning flag.

If already populated and clearOnBeginning is false then discovered files will be added to existig ones.

Parameters

  auxList | Auxiliary list provided for the method to store its working data. If null then the method allocates one.
  numLevels | Number of levels of subdirectories in which files/directories are listed.

If less than 0 then unlimited number of levels will be searched for.

If 0 then no files/directories will be searched for.

If 1 then only those files/directories are listed that are contained directly in the directoryPath directory (and eventually in directories contained in the directories contained in pathList prior to the method call, if includeList

is true). If 2 then also files/directories in the first level directories are listed, if 3 then also files/directories in the second level directories will be listed, etc.

Parameters

  includeList | If true then search for files/directories is also performed in directories that were contained in teh pathList just before the method was called (beside the directoryPath ).
  clearOnBeginning | If true then the list of files (parameter pathList ) is cleared before any discovered files or directories are added to the list. If false then discovered files/directories are just added to the existing paths.
  RelativePaths | If true then all paths that are put to the list are converted to relative path with respect to the current directory. Relative paths with respect to any other directory are not implemented.
  listDirectories | If true then directory paths are also listed (which is default), otherwise directories are omitted.
  listFiles | If true then file paths are also listed (which is default), otherwise files are omitted.
  searchPatterns | Eventual list of search patterns according to which files or directories are searched for.

WARNING: search patterns do not apply to directories.

Returns
  The number of discovered matching paths that were added to the list.

References IG.Lib.UtilSystem.GetRelativePath().

Referenced by IG.Script.ScriptAppBase.CryptoFunctionCheckSum_OLD_TO_DELETE_LATER(), and IG.Crypto.CryptoManager.GetInputFilePaths().

static void IG.Lib.UtilSystem.CopyDirectory | ( | string | sourceDirectoryPath,
|  | string | targetDirectoryPath
| ) |  |
| inline static

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

Parameters

  sourceDirectoryPath | Path to the source directory.
  targetDirectoryPath | Path to the target directory.

Referenced by IG.Script.LoadableScriptShellNeuralBase.ParSimPreparelDirectory().

static void IG.Lib.UtilSystem.CopyRecursive | ( | DirectoryInfo | source,
|  | DirectoryInfo | target
| ) |  |
| inline static

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

Parameters

  source | Source directory.
  target | Target directory.

References IG.Lib.Util.OutputLevel.

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

  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.

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

  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.

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

  baseDirPath | Path of the base directory within which the structure is created.
  rootDirName | Name 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

References IG.Lib.Util.OutputLevel, IG.Lib.StopWatch1.Start(), IG.Lib.StopWatch1.Stop(), and IG.Lib.StopWatch1.Time.

static void IG.Lib.UtilSystem.SaveBinary< ObjectType > | ( | ObjectType | objectToSave,
|  | string | fileName
| ) |  |
| inline static

Save the specified serialized object in binary form to the specified file.

Parameters

  objectToSave | Object to be saved.
  fileName | File name to save the object into.

Template Parameters

  ObjectType | Type of the object to be saved.

The object is saved using .NET serialization (binary formatter is used).

static void IG.Lib.UtilSystem.SaveBinary< ObjectType > | ( | ObjectType | objectToSave,
|  | Stream | stream
| ) |  |
| inline static

Save the specified serialized object in binary form to the specified stream.

Parameters

  objectToSave | Object to be saved.
  stream | Stream to save the object into.

Template Parameters

  ObjectType | Type of the object to be saved.

The object is saved using .NET serialization (binary formatter is used).

static ObjectType IG.Lib.UtilSystem.LoadBinary< ObjectType > | ( | string | fileName | ) |
| inline static

Loads the from specified file.

Parameters

  fileName | File name to load network from.

Neural network is loaded from file using .NET serialization (binary formater is used).

static ObjectType IG.Lib.UtilSystem.LoadBinary< ObjectType > | ( | Stream | stream | ) |
| inline static

Load network from specified file.

Parameters

  stream | Stream to load network from.

Returns
  Returns instance of the ObjectType class with all properties initialized from file.

Template Parameters

  ObjectType | Type of the object to be saved.

Neural network is loaded from file using .NET serialization (binary formater is used).

static void IG.Lib.UtilSystem.SaveBinary | ( | object | objectToSave,
|  | string | fileName
| ) |  |
| inline static

Save the specified serialized object in binary form to the specified file.

Parameters

  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().

static void IG.Lib.UtilSystem.SaveBinary | ( | object | objectToSave,
|  | Stream | stream
| ) |  |
| inline static

Save the specified serialized object in binary form to the specified stream.

Parameters

  objectToSave | Object to be saved.
  stream | Stream to save the object into.

The object is saved using .NET serialization (binary formatter is used).

static object IG.Lib.UtilSystem.LoadBinary | ( | string | fileName | ) |
| inline static

Loads the from specified file.

Parameters

  fileName | File name to load network from.

Returns
  Returns instance of Network class with all properties initialized from file.

Neural network is loaded from file using .NET serialization (binary formater is used).

Referenced by IG.Num.SampledDataSet.LoadBinary().

static object IG.Lib.UtilSystem.LoadBinary | ( | Stream | stream | ) |
| inline static

Load network from specified file.

Parameters

  stream | Stream to load network from.

Returns
  Returns instance of Network class with all properties initialized from file.

Neural network is loaded from file using .NET serialization (binary formater is used).

## Member Data Documentation

object IG.Lib.UtilSystem._lockStatic = null
| 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

volatile Assembly IG.Lib.UtilSystem._executingAssembly = null
| static private

volatile Assembly IG.Lib.UtilSystem._iglibAssembly = null
| static private

volatile Assembly [] IG.Lib.UtilSystem._referencedAssembliesDirectWithoutGac
| static private

Assemblies directly referenced by the current executale assembly. Calculated only once, lazy evaluation.

volatile Assembly [] IG.Lib.UtilSystem._referencedAssembliesRecursiveWithoutGac
| static private

Assemblies directly or indirectly referenced by the current executale assembly. Calculated only once, lazy evaluation.

volatile Assembly [] IG.Lib.UtilSystem._referencedAssembliesDirect
| static private

Assemblies directly referenced by the current executale assembly. Assemblies from global assembly cache are also included. Calculated only once, lazy evaluation.

volatile Assembly [] IG.Lib.UtilSystem._referencedAssembliesRecursive
| static private

Assemblies directly or indirectly referenced by the current executale assembly. Calculated only once, lazy evaluation.

Dictionary<string, Assembly> IG.Lib.UtilSystem._dependentAssemblyList
| static private

List<MissingAssembly> IG.Lib.UtilSystem._missingAssemblyList
| static private

bool IG.Lib.UtilSystem._assemblyResolveHandlerAdded = false
| static private

List<ResolutionIdentity> IG.Lib.UtilSystem._failedResolves = new List<ResolutionIdentity>()
| static private

List<string> IG.Lib.UtilSystem._assemblyResolutionPaths = new List<string>()
| static private

char IG.Lib.UtilSystem._resourceSeparator = ':'
| static private

string IG.Lib.UtilSystem._resourceSeparatorString = null
| static private

char IG.Lib.UtilSystem._assemblySeparator = ';'
| static private

string IG.Lib.UtilSystem._assemblySeparatorString = null
| static private

string [] IG.Lib.UtilSystem._bitmapExtensionsDotNetDefault = { "BMP", "GIF", "EXIF", "JPG", "PNG", "TIFF" }
| static private

List<string> IG.Lib.UtilSystem._imageExtensionsDotNet = new List<string>(_bitmapExtensionsDotNetDefault)
| static private

string [] IG.Lib.UtilSystem._soundExtensionsDotNetDefault = { "WAV" }
| static private

List<string> IG.Lib.UtilSystem._soundExtensionsDotNet = new List<string>(_soundExtensionsDotNetDefault)
| static private

const int IG.Lib.UtilSystem.MinNumCheckedIsTextFile = 100
| private

Minimal number of checked bytes when determining whether a file is a text file.

const string IG.Lib.UtilSystem.WorkspaceDirectoryEnvironmentVar = "WORKSPACE"
| private

const string IG.Lib.UtilSystem.WorkspaceProjectsDirectoryEnvironmentVar = "WORKSPACEPROJECTS"
| private

const string IG.Lib.UtilSystem.WorkspaceProjectsDirName = "workspaceprojects"
| private

readonly string [] IG.Lib.UtilSystem._searcPatternsNone = { null }
| static private

Provides a convenient array of strings containing only null.

WARNING: Do not change contents of this array!

## Property Documentation

object IG.Lib.UtilSystem.LockStatic
| static get

Locking object for static methods and properties of this class.

Read-only, safely provided on demand (using Util.LockGlobal when initializing the first time when referenced).

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.

Referenced by IG.Script.ScriptAppBase.SystemFunctionUserName().

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.

Referenced by IG.Lib.UtilSystem.ExecuteSystemCommand(), and IG.Forms.TimerControl.TimerControl().

bool IG.Lib.UtilSystem.IsLinuxOs
| static get

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

Referenced by IG.Forms.TimerControl.TimerControl().

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.

Referenced by IG.Lib.CommandLineApplicationInterpreter.CmdSetPriority(), IG.Num.ParallelJobDispatcherBase< JobContainerType >.UpdateThreadPriorityFromSystem(), and IG.Lib.CommandLineApplicationInterpreter.UpdateThreadPriorityFromSystem().

Assembly IG.Lib.UtilSystem.ExecutableAssembly
| static get

Returns assembly of the current executable, obtained by Assembly.GetEntryAssembly().

Assembly IG.Lib.UtilSystem.IglibAssembly
| static get

Returns assembly of the IGLib base assembly.

Referenced by IG.Script.ScriptAppBase.AssemblyFunctionInfo(), and IG.Script.ScriptAppBase.AssemblyFunctionResources().

bool IG.Lib.UtilSystem.IsRegisteredAssemblyResolveHandler
| static get

Whether this class' event handler for resolving assembly loading is registered or not.

Returns

string [] IG.Lib.UtilSystem.AssemblyResolutionPaths
| static get

char IG.Lib.UtilSystem.ResourceSeparator
| static get

Gets the character that is used to separate resource from the resource file (.resources).

string IG.Lib.UtilSystem.ResourceSeparatorString
| static get

Gets the string that is used to separate resource from the resource file (.resources).

The separator is originally defined as character, this method just returns the string that contains only that character.

char IG.Lib.UtilSystem.AssemblySeparator
| static get

Gets the character that is used to separate resource from the assembly.

Referenced by IG.Forms.ResourceSelector.RefreshEmbeddedResourcesList(), IG.Forms.ResourceSelector.RefreshResxResourcesList(), and IG.Forms.ResourceViewerControl.ShowViewedItem().

string IG.Lib.UtilSystem.AssemblySeparatorString
| static get

Gets the string that is used to separate resource from the assembly.

The separator is originally defined as character, this method just returns the string that contains only that character.

The documentation for this class was generated from the following file:

- igbase/utilities/UtilSystem.cs