private void ReleaseHandler(HandlerBO handler) { lock (this.Handlers) { if (this.Handlers.ContainsKey(handler.Fullpath)) { this.Handlers.Remove(handler.Fullpath); } } }
private void ProcessFile(string fullpath, WriteContainer wcontainer) { lock (this.Handlers) { if (!this.Handlers.ContainsKey(fullpath)) { HandlerBO handler = new HandlerBO(fullpath, wcontainer); this.Handlers.Add(fullpath, handler); handler.Finished += new EventHandler(handler_Finished); handler.StartTimer(); } else { HandlerBO handler = (HandlerBO)this.Handlers[fullpath]; handler.ResetTimer(); } } }