/// <summary>
        /// Gets the status of the reporting operation.
        /// </summary>
        /// <returns><see cref="ReportingOperationStatus"/></returns>
        /// <exception cref="FaultException{TDetail}">Thrown if a fault is returned from the Bing Ads service.</exception>
        /// <exception cref="OAuthTokenRequestException">Thrown if tokens can't be refreshed due to an error received from the Microsoft Account authorization server.</exception>
        public async Task <ReportingOperationStatus> GetStatusAsync()
        {
            if (FinalStatus != null)
            {
                return(FinalStatus);
            }

            var currentStatus = await _statusProvider.GetCurrentStatus(_reportingServiceClient).ConfigureAwait(false);

            if (_statusProvider.IsFinalStatus(currentStatus))
            {
                FinalStatus = currentStatus;
            }

            return(currentStatus);
        }
 private bool OperationIsComplete()
 {
     return(_statusProvider.IsFinalStatus(_currentStatus));
 }