private HistorySavingComponent() { // Initialize the workqueue. this.queue = new WorkQueue(); // Disallow the concurrency for this component. this.queue.ConcurrentLimit = 1; // Log the event if an item failed. this.queue.FailedWorkItem += onFailedWorkItem; // Initiate the component timer. this.timer = new ComponentTimer( TIME_INTERVAL, TimeUpHandler); // Initialize the logger used in this component. logger = NLoggerUtil.GetNLogger(typeof (HistorySavingComponent)); activeDocumentBox = new StrongBox<IDocument>(); }
public void TestMethod1() { var timer = new ComponentTimer(100, handler); timer.start(); Thread.Sleep(2000); }