示例#1
0
        private static void Main(string[] args)
        {
            RegisterTypes();
            File.Delete(@"E:\Study Materials\DesignPattern\DesignPatternSamples\BuildOutput\dev\scratch\logs\logfile.txt");

            var stopwatch = new Stopwatch();

            stopwatch.Start();

            _numbersToTextFile = _dependencyResolver.Container.Resolve <INumbersToTextFile>();
            _numbersToTextFile.MaxIntegerToWrite = 100;
            _numbersToTextFile.WriteNumbersToFile();

            stopwatch.Stop();
            Console.WriteLine("Time Elapsed: {0}", stopwatch.Elapsed);

            Console.ReadLine();
        }
示例#2
0
        private static void Main(string[] args)
        {
            RegisterTypes();
            File.Delete(@"c:\dev\scratch\logs\logfile.txt");

            var stopwatch = new Stopwatch();

            stopwatch.Start();

            _numbersToTextFile = _dependencyResolver.Container.GetInstance <INumbersToTextFile>();
            _numbersToTextFile.MaxIntegerToWrite = 100;
            _numbersToTextFile.WriteNumbersToFile();

            stopwatch.Stop();
            Console.WriteLine("Time Elapsed: {0}", stopwatch.Elapsed);

            Console.ReadLine();
        }
示例#3
0
 private void LogNumbers()
 {
     _numbersToTextFile = _container.Resolve <INumbersToTextFile>();
     _numbersToTextFile.MaxIntegerToWrite = 1000;
     _numbersToTextFile.WriteNumbersToFile();
 }