public IServerProcess StartProcess(ProcessInfo processInfo) { int processID; IRemoteServerProcess process = _session.StartProcess(processInfo, out processID); return(new LocalProcess(this, processInfo, processID, process)); }
public LocalProcess(LocalSession session, ProcessInfo processInfo, int processID, IRemoteServerProcess process) : base() { _session = session; _process = process; _processID = processID; _processInfo = processInfo; _streamManager = new LocalStreamManager((IStreamManager)_process); _internalProcess = (ServerProcess)_session._internalSession.StartProcess(new ProcessInfo(_session._internalSession.SessionInfo)); _session._server.OnCacheCleared += new CacheClearedEvent(CacheCleared); _session._server.OnCacheClearing += new CacheClearedEvent(CacheClearing); CacheCleared(_session._server); _valueManager = new ValueManager(_internalProcess, this); }
public void StopProcess(IServerProcess process) { IRemoteServerProcess remoteProcess = ((LocalProcess)process).RemoteProcess; ((LocalProcess)process).Dispose(); try { _session.StopProcess(remoteProcess); } catch { // ignore exceptions here } }
public void StopProcess(IRemoteServerProcess process) { try { var channel = GetServiceInterface(); IAsyncResult result = channel.BeginStopProcess(((ClientProcess)process).ProcessHandle, null, null); result.AsyncWaitHandle.WaitOne(); channel.EndStopProcess(result); } catch (FaultException <DataphorFault> fault) { throw DataphorFaultUtility.FaultToException(fault.Detail); } catch (CommunicationException ce) { ReportCommunicationError(); throw new ServerException(ServerException.Codes.CommunicationFailure, ErrorSeverity.Environment, ce); } }
// StopProcess public void StopProcess(IRemoteServerProcess process) { _serverSession.StopProcess(((RemoteServerProcess)process).ServerProcess); }