public void MIMER()
        {
            var eoln   = new EndOfLineCriteriaStrategy();
            var reader = new MIMER.RFC822.MailReader();

            using (var stream = File.OpenRead(BenchmarkData)) {
                for (int i = 0; i < iterations; i++)
                {
                    reader.Read(ref stream, eoln);
                    stream.Position = 0;
                }
            }
        }
        public bool MIMERParser()
        {
            var eoln = new EndOfLineCriteriaStrategy();

            foreach (var stream in _streams)
            {
                Stream localStream = stream;
                var    reader      = new MIMER.RFC822.MailReader();
                reader.Read(ref localStream, eoln);
                localStream.Position = 0;
            }

            return(true);
        }
Пример #3
0
        static TimeSpan MeasureMIMER(Stream stream, int count)
        {
            var eoln      = new EndOfLineCriteriaStrategy();
            var stopwatch = new Stopwatch();

            stopwatch.Start();
            for (int i = 0; i < count; i++)
            {
                var reader = new MIMER.RFC822.MailReader();
                reader.Read(ref stream, eoln);
                stream.Position = 0;
            }
            stopwatch.Stop();

            return(stopwatch.Elapsed);
        }