static StatsManager() { // When a snapshot is added to Queue, run the Process method SnapshotQueue.ItemEnqueued += (s, e) => { Interlocked.Increment(ref iSnapshotsRecieved); ProcessQueue(); }; }