Exemplo n.º 1
0
 public void Run()
 {
     //run the simulation
     FinVizOutputProcessor processor = new FinVizOutputProcessor();
     FundamentalFilterProcessor fundamentalProcessor = new FundamentalFilterProcessor(processor);
     YahooFinanceProcessor financeProcessor = new YahooFinanceProcessor(fundamentalProcessor);
     ValuationProcessor valuationprocessor = new ValuationProcessor(financeProcessor);
     SummaryOutputProcessor summaryProcessor = new SummaryOutputProcessor(valuationprocessor);
     summaryProcessor.DataProcessingCompleted += valuationProcessor_DataProcessingCompleted;
     summaryProcessor.DataRetrieveError += valuationProcessor_DataRetrieveError;
     summaryProcessor.UpdateStatus += valuationprocessor_UpdateStatus;
     summaryProcessor.Prefilter();
     summaryProcessor.ProcessData();
 }
Exemplo n.º 2
0
        static void Main(string[] args)
        {
            FinVizOutputProcessor processor = new FinVizOutputProcessor();
            FundamentalFilterProcessor fundamentalProcessor = new FundamentalFilterProcessor(processor);
            ValuationProcessor valuationprocessor = new ValuationProcessor(fundamentalProcessor);
            SummaryOutputProcessor summaryProcessor = new SummaryOutputProcessor(valuationprocessor);
            summaryProcessor.DataProcessingCompleted += valuationProcessor_DataProcessingCompleted;
            summaryProcessor.DataRetrieveError += valuationProcessor_DataRetrieveError;
            summaryProcessor.UpdateStatus += valuationprocessor_UpdateStatus;
            summaryProcessor.Prefilter();
            summaryProcessor.ProcessData();

            exitFlag = new ManualResetEvent(false);
               WaitHandle.WaitAll(new WaitHandle[] { exitFlag });

            Console.WriteLine("Done. Press any key to close.");
            Console.ReadLine();
        }