Esempio n. 1
0
        public ReportingOperationTracker(ReportingStatusProvider statusProvider,
                                         ServiceClient <IReportingService> bulkServiceClient,
                                         CancellationToken cancellationToken,
                                         int statusCheckIntervalInMs)
        {
            _statusProvider = statusProvider;

            _reportingServiceClient = bulkServiceClient;

            _cancellationToken = cancellationToken;

            _statusCheckIntervalInMs = statusCheckIntervalInMs;

            _taskCompletionSource = new TaskCompletionSource <ReportingOperationStatus>();

            _updateProgressTimer = new Timer(PollOperationStatus);
        }
Esempio n. 2
0
        internal ReportingDownloadOperation(string requestId, AuthorizationData authorizationData, ReportingStatusProvider statusProvider, string trackingId, ApiEnvironment?apiEnvironment)
        {
            RequestId = requestId;

            AuthorizationData = authorizationData;

            _statusProvider = statusProvider;

            TrackingId = trackingId;

            StatusPollIntervalInMilliseconds = ReportingServiceManager.DefaultStatusPollIntervalInMilliseconds;

            DownloadHttpTimeout = TimeSpan.FromMilliseconds(ReportingServiceManager.DefaultHttpClientTimeoutInMillseconds);

            _reportingServiceClient = new ServiceClient <IReportingService>(authorizationData, apiEnvironment);

            ZipExtractor = new ZipExtractor();

            HttpService = new HttpService();

            FileSystem = new FileSystem();
        }