Exemple #1
0
        public void Subscribes_on_construction_and_unsubscribes_on_Dispose()
        {
            ProcessEventsImpl parent  = new ProcessEventsImpl();
            ProcessTracker    tracker = new ProcessTracker(parent);

            Assert.Equal(1, parent.ProcessStartedSubscriberCount);
            Assert.Equal(1, parent.ProcessStoppedSubscriberCount);

            tracker.Dispose();

            Assert.Equal(0, parent.ProcessStartedSubscriberCount);
            Assert.Equal(0, parent.ProcessStoppedSubscriberCount);
        }
Exemple #2
0
 protected override void FreeManagedResources()
 {
     _processTracker.Dispose();
 }