static void Main(string[] args) { var stream = new FileStream(@"D:\zMisc\SingleResponsibilityPrinciple\test.txt", FileMode.Open); var tradeDataProvider = new StreamTradeDataProvider(stream); var logger = new ConsoleLogger(); var tradeValidator = new SimpleTradeValidator(logger); var tradeMapper = new SimpleTradeMapper(); var tradeParser = new SimpleTradeParser(tradeValidator, tradeMapper); var tradeStorage = new DummyTradeStorage(); var tradeProcessor = new TradeProcessor(tradeDataProvider, tradeParser, tradeStorage); tradeProcessor.ProcessTrades(); }
static void Main(string[] args) { var tradeStream = Assembly.GetExecutingAssembly().GetManifestResourceStream("SingleResponsibilityPrinciple.trades.txt"); var logger = new ConsoleLogger(); var tradeValidator = new SimpleTradeValidator(logger); var tradeDataProvider = new StreamTradeDataProvider(tradeStream); var tradeMapper = new SimpleTradeMapper(); var tradeParser = new SimpleTradeParser(tradeValidator, tradeMapper); var tradeStorage = new AdoNetTradeStorage(logger); var tradeProcessor = new TradeProcessor(tradeDataProvider, tradeParser, tradeStorage); tradeProcessor.ProcessTrades(); Console.ReadKey(); }
static void Main(string[] args) { var tradeStream = Assembly.GetExecutingAssembly().GetManifestResourceStream("SingleResponsibilityPrinciple.trades.txt"); var logger = new ConsoleLogger(); var tradeValidator = new SimpleTradeValidator(logger); var tradeDataProvider = new StreamTradeDataProvider(tradeStream); var tradeMapper = new SimpleTradeMapper(); var tradeParser = new SimpleTradeParser(tradeValidator, tradeMapper); var tradeStorage = new AdoNetTradeStorage(logger); var tradeProcessor = new TradeProcessor(tradeDataProvider, tradeParser, tradeStorage); tradeProcessor.ProcessTrades(); Console.ReadKey(); }