Exemple #1
0
        internal static void Run(
            string initialCommand,
            RemoteSessionNamedPipeServer namedPipeServer)
        {
            lock (SyncObject)
            {
                if (s_singletonInstance != null && !s_singletonInstance.IsDisposed)
                {
                    Dbg.Assert(false, "Run should not be called multiple times, unless the singleton was disposed.");
                    return;
                }

                s_singletonInstance = new NamedPipeProcessMediator(namedPipeServer);
            }

            s_singletonInstance.Start(
                initialCommand: initialCommand,
                cryptoHelper: new PSRemotingCryptoHelperServer(),
                workingDirectory: null,
                configurationName: namedPipeServer.ConfigurationName);
        }
Exemple #2
0
        internal static void Run(
            string initialCommand,
            RemoteSessionNamedPipeServer namedPipeServer)
        {
            lock (SyncObject)
            {
                if (s_singletonInstance != null && !s_singletonInstance.IsDisposed)
                {
                    Dbg.Assert(false, "Run should not be called multiple times, unless the singleton was disposed.");
                    return;
                }

                s_singletonInstance = new NamedPipeProcessMediator(namedPipeServer);
            }

#if !CORECLR
            // AppDomain is not available in CoreCLR
            AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(AppDomainUnhandledException);
#endif
            s_singletonInstance.Start(initialCommand, new PSRemotingCryptoHelperServer(), namedPipeServer.ConfigurationName);
        }
        internal static void Run(
            string initialCommand,
            RemoteSessionNamedPipeServer namedPipeServer)
        {
            lock (SyncObject)
            {
                if (s_singletonInstance != null && !s_singletonInstance.IsDisposed)
                {
                    Dbg.Assert(false, "Run should not be called multiple times, unless the singleton was disposed.");
                    return;
                }

                s_singletonInstance = new NamedPipeProcessMediator(namedPipeServer);
            }

#if !CORECLR
            // AppDomain is not available in CoreCLR
            AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(AppDomainUnhandledException);
#endif
            s_singletonInstance.Start(initialCommand, new PSRemotingCryptoHelperServer(), namedPipeServer.ConfigurationName);
        }