internal IsolatedCommandDispatcher(IOutputAppender outputAppender, ISetupCommandProxy <T> commandProxySetupper, string[] assemblyResolutionProbingPaths)
            : base(outputAppender, assemblyResolutionProbingPaths)
        {
            var setupInformation = AppDomain.CurrentDomain.SetupInformation;

            setupInformation.ApplicationBase = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
            _appDomain   = AppDomain.CreateDomain($"Isolated {typeof(T).Name}", null, setupInformation);
            CommandProxy = (T)_appDomain.CreateInstanceAndUnwrap(typeof(T).Assembly.FullName, typeof(T).FullName !);
            commandProxySetupper.Setup(CommandProxy);
        }
Esempio n. 2
0
 internal CommandDispatcher(IOutputAppender outputAppender, ISetupCommandProxy <T> commandProxySetupper, string[] assemblyResolutionProbingPaths)
     : this(outputAppender, assemblyResolutionProbingPaths)
 {
     CommandProxy = new();
     commandProxySetupper.Setup(CommandProxy);
 }