System.AppDomain.ExecuteAssembly C# (CSharp) Méthode

ExecuteAssembly() public méthode

public ExecuteAssembly ( string assemblyFile, string args ) : int
assemblyFile string
args string
Résultat int
        public int ExecuteAssembly(string assemblyFile, string[] args)
        {
            if (assemblyFile == null)
            {
                throw new ArgumentNullException(nameof(assemblyFile));
            }
            string fullPath = Path.GetFullPath(assemblyFile);
            Assembly assembly = Assembly.LoadFile(fullPath);
            return ExecuteAssembly(assembly, args);
        }

Same methods

AppDomain::ExecuteAssembly ( Assembly assembly, string args ) : int
AppDomain::ExecuteAssembly ( string assemblyFile ) : int
AppDomain::ExecuteAssembly ( string assemblyFile, string args, byte hashValue, Configuration hashAlgorithm ) : int

Usage Example

        public void LaunchAppDomain()
        {
            UnloadAppDomain();
            QAppDomain = AppDomain.CreateDomain("QAppDomain");
            AppDomain.MonitoringIsEnabled = true;

            string path = Win32Hooks.HookManager.Instance.AssemblyPath;

            if(this.EveAccount.DX11) {

                t = new Thread(delegate() { QAppDomain.ExecuteAssembly(path + "\\Questor\\Questor.exe",args: new String[] {"-i","-c", Win32Hooks.HookManager.Instance.CharName,"-u", Win32Hooks.HookManager.Instance.EveAccount.AccountName, "-p", Win32Hooks.HookManager.Instance.EveAccount.Password}); });
            } else {

                t = new Thread(delegate() { QAppDomain.ExecuteAssembly(path + "\\Questor\\Questor.exe",args: new String[] {"-d","-i","-c", Win32Hooks.HookManager.Instance.CharName,"-u", Win32Hooks.HookManager.Instance.EveAccount.AccountName, "-p", Win32Hooks.HookManager.Instance.EveAccount.Password}); });
            }
            t.Start();
        }
All Usage Examples Of System.AppDomain::ExecuteAssembly