@@ -246,9 +246,9 @@ public async Task<bool> CancelReportScheduleAsync(string reportScheduleId)
246
246
#endregion
247
247
248
248
249
- public string CreateReportAndDownloadFile ( ReportTypes reportType , DateTime ? dataStartTime = null , DateTime ? dataEndTime = null , ReportOptions reportOptions = null , bool isRestrictedReport = false ) =>
250
- Task . Run ( ( ) => CreateReportAndDownloadFileAsync ( reportType , dataStartTime , dataEndTime , reportOptions , isRestrictedReport ) ) . ConfigureAwait ( false ) . GetAwaiter ( ) . GetResult ( ) ;
251
- public async Task < string > CreateReportAndDownloadFileAsync ( ReportTypes reportType , DateTime ? dataStartTime = null , DateTime ? dataEndTime = null , ReportOptions reportOptions = null , bool isRestrictedReport = false , List < MarketPlace > marketplaces = null )
249
+ public string CreateReportAndDownloadFile ( ReportTypes reportType , DateTime ? dataStartTime = null , DateTime ? dataEndTime = null , ReportOptions reportOptions = null , bool isRestrictedReport = false , List < MarketPlace > marketplaces = null , int millisecondsDelay = 500 ) =>
250
+ Task . Run ( ( ) => CreateReportAndDownloadFileAsync ( reportType , dataStartTime , dataEndTime , reportOptions , isRestrictedReport , marketplaces , millisecondsDelay ) ) . ConfigureAwait ( false ) . GetAwaiter ( ) . GetResult ( ) ;
251
+ public async Task < string > CreateReportAndDownloadFileAsync ( ReportTypes reportType , DateTime ? dataStartTime = null , DateTime ? dataEndTime = null , ReportOptions reportOptions = null , bool isRestrictedReport = false , List < MarketPlace > marketplaces = null , int millisecondsDelay = 500 )
252
252
{
253
253
if ( ! isRestrictedReport && Enum . TryParse < RestrictedReportTypes > ( reportType . ToString ( ) , out _ ) )
254
254
{
@@ -297,7 +297,7 @@ public async Task<string> CreateReportAndDownloadFileAsync(ReportTypes reportTyp
297
297
{
298
298
return null ;
299
299
}
300
- else Task . Delay ( 500 ) . Wait ( ) ;
300
+ else Task . Delay ( millisecondsDelay ) . Wait ( ) ;
301
301
}
302
302
return filePath ;
303
303
}
0 commit comments