Пример #1
0
        private void Main2(string[] args)
        {
            var largeData = new byte[0];

            var stats = new PerformatStats
            {
                Size = largeData.Length
            };

            stats.OnCompletion += () => this.RecordCompletion(stats);

            Write(o =>
            {
                var sp = new Stopwatch();
                foreach (var item in largeData)
                {
                    sp.Restart();
                    // do something with this
                    stats.RecordOperationDuration(sp);
                }
            });
        }
Пример #2
0
 private void RecordCompletion(PerformatStats stats)
 {
     throw new NotImplementedException();
 }