/// <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())); } }
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(); }
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; }
public IpcClientImpl(INamedPipeClientStreamWrapper clientStreamWrapper) => _pipeWrapper = clientStreamWrapper;
public static IIpcClient GetIpcExecutor(INamedPipeClientStreamWrapper clientStreamWrapper) => Instance.GetIpcExecutor(clientStreamWrapper);
public ComPluginRuntimeHandler(INamedPipeClientStreamWrapper clientStreamWrapper) { _clientStreamWrapper = clientStreamWrapper; }
public IpcClient(INamedPipeClientStreamWrapper clientStreamWrapper) { _pipeWrapper = clientStreamWrapper; }
public IpcClientHelper(bool disposed, INamedPipeClientStreamWrapper pipeWrapper) { _disposed = disposed; _pipeWrapper = pipeWrapper; }