Пример #1
0
        public static IHost CreateHost(string name, bool isAsync)
        {
            IHost host;
            if (isAsync) {
                host = new AsyncPowerShellHost(name, _runspaceManager);
            }
            else {
                host = new SyncPowerShellHost(name, _runspaceManager);
            }

            return host;
        }
Пример #2
0
        public static IHost CreateHost(string name, IRestoreEvents restoreEvents, bool isAsync)
        {
            IHost host;

            if (isAsync)
            {
                host = new AsyncPowerShellHost(name, restoreEvents, _runspaceManager);
            }
            else
            {
                host = new SyncPowerShellHost(name, restoreEvents, _runspaceManager);
            }

            return(host);
        }