Beispiel #1
0
        static async Task Main(string[] args)
        {
            string sourceFilePath      = @"..\..\..\..\Files\StockPositions1.csv";
            string destinationFilePath = @"..\..\..\..\Files\Result.csv";

            StockAnalyzer analyzer = new StockAnalyzer();
            await analyzer.ProcessAsync(sourceFilePath, destinationFilePath);
        }
Beispiel #2
0
        static async Task Main(string[] args)
        {
            //string sourceFilePath = @"..\..\..\..\Files\StockPositions1.csv";
            //string sourceFilePath = @"..\..\..\..\Files\StockPositions2.json";
            string sourceFilePath = @"http://solid.wincubate.net/stockpositions.json";
            //string destinationFilePath = @"..\..\..\..\Files\Result.csv";
            string destinationFilePath = @"..\..\..\..\Files\Result.json";

            StockAnalyzer analyzer = new StockAnalyzer();
            await analyzer.ProcessAsync();
        }
Beispiel #3
0
 static async Task Main(string[] args)
 {
     StockAnalyzer analyzer = new StockAnalyzer(
         new WebStorage(@"http://solid.wincubate.net/stockpositions.json"),
         new CompositeWriteStorage(
             new ConsoleStorage(),
             new RetryingWriteStorage(
                 new TwilioSmsTransmissionStorage("+4522123631")
                 )
             ),
         new JsonParser(),
         new CsvSerializer()
         );
     await analyzer.ProcessAsync();
 }
Beispiel #4
0
        static async Task Main(string[] args)
        {
            //string sourceFilePath = @"..\..\..\..\Files\StockPositions1.csv";
            //string sourceFilePath = @"..\..\..\..\Files\StockPositions2.json";
            //string sourceFilePath = @"http://solid.wincubate.net/stockpositions.json";
            //string destinationFilePath = @"..\..\..\..\Files\Result.csv";
            //string destinationFilePath = @"..\..\..\..\Files\Result.json";
            //_writeStorage = new FileStorage( @"..\..\..\..\Files\StockPositions1.csv",@"..\..\..\..\Files\Result.json" );
            //_storage = new FileStorage();
            //_parser = new Parser();
            //_serializer = new CsvSerializer();

            IReadStorage  readStorage  = new WebStorage(@"http://solid.wincubate.net/stockpositions.json");
            IWriteStorage writeStorage = new ConsoleStorage();
            Parser        parser       = new JsonParser();
            ISerializer   serializer   = new JsonSerializer();

            StockAnalyzer analyzer = new StockAnalyzer(
                readStorage, writeStorage, parser, serializer
                );
            await analyzer.ProcessAsync();
        }