Exemplo n.º 1
0
        public Type TestFabricaCreation(Options opt)
        {
            var fabrica    = new ConnectionFabrica();
            var connection = fabrica.CreateConnection(opt);

            return(connection.GetType());
        }
Exemplo n.º 2
0
        private void InitializateFields(Options options)
        {
            int collectorThreadsCount = 1;
            int writerThreadsCount    = 1;

            filePathsStash = new MyConcurrentQueue <string>(collectorThreadsCount, options.ThreadsCount);
            hashSums       = new MyConcurrentQueue <HashFunctionResult>(options.ThreadsCount, writerThreadsCount);
            collector      = new ThreadFileCollector(options.Recursive);
            calculator     = new ThreadHashSumCalculator(options.ThreadsCount, options.Verbose);
            writer         = new ThreadWriter(options.Verbose);

            var connectionFabrica = new ConnectionFabrica();

            connection = connectionFabrica.CreateConnection(options);
        }