public void StartServer() { if (traceServer == null) { traceServer = new TraceServer(); traceServer.Received += new Action <TraceItem>((arr) => { repo.Add(arr); }); ThreadPool.QueueUserWorkItem(new WaitCallback((o) => { traceServer.Listen(); })); } }
private void StartTheServer() { if (traceServer == null) { traceServer = new TraceServer(); traceServer.Received += new Action <LogTracer.TraceItem>((arr) => { this.repository.Add(arr); }); ThreadPool.QueueUserWorkItem(new WaitCallback((o) => { traceServer.Listen(); })); } }