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);
        }
        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);
        }
Example #3
0
        internal ReportingDownloadOperation(string requestId, AuthorizationData authorizationData, ReportingStatusProvider statusProvider, string trackingId, ApiEnvironment?apiEnvironment)
        {
            RequestId = requestId;

            AuthorizationData = authorizationData;

            _statusProvider = statusProvider;

            TrackingId = trackingId;

            StatusPollIntervalInMilliseconds = ReportingServiceManager.DefaultStatusPollIntervalInMilliseconds;

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

            ZipExtractor = new ZipExtractor();

            HttpService = new HttpService();

            FileSystem = new FileSystem();
        }
        internal ReportingDownloadOperation(string requestId, AuthorizationData authorizationData, ReportingStatusProvider statusProvider, string trackingId, ApiEnvironment? apiEnvironment)
        {
            RequestId = requestId;

            AuthorizationData = authorizationData;

            _statusProvider = statusProvider;

            TrackingId = trackingId;

            StatusPollIntervalInMilliseconds = ReportingServiceManager.DefaultStatusPollIntervalInMilliseconds;

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

            ZipExtractor = new ZipExtractor();

            HttpService = new HttpService();

            FileSystem = new FileSystem();
        }