public bool AENetMailParser()
 {
     foreach (var stream in _streams)
     {
         var message = new AE.Net.Mail.MailMessage();
         message.Load(stream, false, (int)stream.Length);
         stream.Position = 0;
     }
     return(true);
 }
Esempio n. 2
0
 public void AENetMail()
 {
     using (var stream = new MemoryStream(BenchmarkData, false)) {
         for (int i = 0; i < iterations; i++)
         {
             var message = new AE.Net.Mail.MailMessage();
             message.Load(stream, false, (int)stream.Length);
             stream.Position = 0;
         }
     }
 }
Esempio n. 3
0
        static TimeSpan MeasureAENetMail(Stream stream, int count)
        {
            var stopwatch = new Stopwatch();

            stopwatch.Start();
            for (int i = 0; i < count; i++)
            {
                var message = new AE.Net.Mail.MailMessage();
                message.Load(stream, false, (int)stream.Length);
                stream.Position = 0;
            }
            stopwatch.Stop();

            return(stopwatch.Elapsed);
        }