예제 #1
0
 /// <summary>
 /// Gets the instance.
 /// </summary>
 public static IpcClient GetIPCExecutor(INamedPipeClientStreamWrapper clientStreamWrapper = null)
 {
     if (clientStreamWrapper != null)
     {
         return(new IpcClient(clientStreamWrapper));
     }
     lock (padlock)
     {
         return(_ipcClient ?? (_ipcClient = new IpcClient()));
     }
 }
예제 #2
0
        internal IpcClientImpl()
        {
            var token = Guid.NewGuid().ToString();
            var currentAssemblyPath          = Assembly.GetExecutingAssembly().Location;
            var currentAssemblyDirectoryPath = Path.GetDirectoryName(currentAssemblyPath);
            var clientPath = Path.Combine(currentAssemblyDirectoryPath, "Warewolf.COMIPC.exe");
            var psi        = new ProcessStartInfo(clientPath, token)
            {
                Verb                   = "runas",
                UseShellExecute        = false,
                ErrorDialog            = false,
                RedirectStandardOutput = false,
                CreateNoWindow         = true
            };

            _process     = Process.Start(psi);
            _pipeWrapper = new NamedPipeClientStreamWrapper(".", token, PipeDirection.InOut);
            _pipeWrapper.Connect();
        }
예제 #3
0
        private IpcClient()
        {
            string token = Guid.NewGuid().ToString();

            // Pass token to child process
            var psi = new ProcessStartInfo("WarewolfCOMIPC.exe", token)
            {
                Verb                   = "runas",
                UseShellExecute        = false,
                ErrorDialog            = false,
                RedirectStandardOutput = false,
                CreateNoWindow         = true
            };

            _process     = Process.Start(psi);
            _pipeWrapper = new NamedPipeClientStreamWrapper(".", token, PipeDirection.InOut);
            _pipeWrapper.Connect();

            _pipeWrapper.ReadMode = PipeTransmissionMode.Message;
        }
예제 #4
0
 public IpcClientImpl(INamedPipeClientStreamWrapper clientStreamWrapper) => _pipeWrapper = clientStreamWrapper;
예제 #5
0
 public static IIpcClient GetIpcExecutor(INamedPipeClientStreamWrapper clientStreamWrapper) => Instance.GetIpcExecutor(clientStreamWrapper);
예제 #6
0
 public ComPluginRuntimeHandler(INamedPipeClientStreamWrapper clientStreamWrapper)
 {
     _clientStreamWrapper = clientStreamWrapper;
 }
예제 #7
0
 public IpcClient(INamedPipeClientStreamWrapper clientStreamWrapper)
 {
     _pipeWrapper = clientStreamWrapper;
 }
예제 #8
0
 public IpcClientHelper(bool disposed, INamedPipeClientStreamWrapper pipeWrapper)
 {
     _disposed    = disposed;
     _pipeWrapper = pipeWrapper;
 }