Esempio n. 1
0
 public IssueSharesLoaderExtension(
     Int32 numberOfDaysBefore,
     Monitor monitor,
     TargetDataPuller targetPuller,
     SourceDataPuller sourcePuller,
     IssuerSharesTransformer transformer,
     GapsFiller <IssuerShareRecord> filler,
     IssueSharesPusherExtension pusher,
     IIssuerSharesEraser eraser
     )
     : base(numberOfDaysBefore, monitor, targetPuller, sourcePuller, transformer, filler, pusher, eraser)
 {
 }
Esempio n. 2
0
        private IssueSharesLoaderExtension CreateIssuerSharesLoader()
        {
            var settings = new IssuerSharesSettings
            {
                RecordsPerBulk  = Settings.RecordsPerBulk,
                RecordsPerChunk = Settings.RecordsPerChunk,
                MaxNumberOfDaysToStopExtrapolatingAfter = Settings.MaxNumberOfDaysToStopExtrapolatingAfter,
                NumberOfDaysAgoToStartLoadingFrom       = Settings.NumberOfDaysAgoToStartLoadingFrom != 0 ? Settings.NumberOfDaysAgoToStartLoadingFrom : null, // can be also: null
                NumberOfDaysBeforeLoadingDateToBeGuaranteeFromHittingGap = Settings.NumberOfDaysBeforeLoadingDateToBeGuaranteeFromHittingGap,
                WebServiceUri                  = new Uri(Settings.ODataServiceUri),
                ConnectionStringToAims         = Settings.ConnectionToAims,
                ConnectionStringToAimsEntities = Settings.ConnectionToAimsEntities
            };

            var dumper = new TraceDumper();

            var targetPuller = new TargetDataPuller(settings.ConnectionStringToAimsEntities);
            var sourcePuller = new SourceDataPuller(settings.WebServiceUri, settings.RecordsPerChunk, settings.ConnectionStringToAimsEntities, dumper);
            var monitor      = new DataLoader.Core.Monitor(dumper);
            var pusher       = new IssueSharesPusherExtension(monitor, settings.ConnectionStringToAims, settings.RecordsPerBulk);
            var filler       = new GapsFiller <IssuerShareRecord>(settings.MaxNumberOfDaysToStopExtrapolatingAfter, new IssuerSharesGapFillerAdapter());
            var transformer  = new IssuerSharesTransformer(monitor);
            var eraser       = new IssuerSharesEraser(settings.ConnectionStringToAims);
            var loader       = new IssueSharesLoaderExtension(
                settings.NumberOfDaysBeforeLoadingDateToBeGuaranteeFromHittingGap,
                monitor,
                targetPuller,
                sourcePuller,
                transformer,
                filler,
                pusher,
                eraser
                );

            return(loader);
        }