@@ -72,7 +72,14 @@ public async Task RecognizeContentOperationCreatesDiagnosticScopeOnUpdate()
7272
7373 var operation = new RecognizeContentOperation ( "00000000-0000-0000-0000-000000000000" , client ) ;
7474
75- await operation . UpdateStatusAsync ( ) ;
75+ if ( IsAsync )
76+ {
77+ await operation . UpdateStatusAsync ( ) ;
78+ }
79+ else
80+ {
81+ operation . UpdateStatus ( ) ;
82+ }
7683
7784 testListener . AssertScope ( $ "{ nameof ( RecognizeContentOperation ) } .{ nameof ( RecognizeContentOperation . UpdateStatus ) } ") ;
7885 }
@@ -100,7 +107,14 @@ public async Task RecognizeReceiptsOperationCreatesDiagnosticScopeOnUpdate()
100107
101108 var operation = new RecognizeReceiptsOperation ( "00000000-0000-0000-0000-000000000000" , client ) ;
102109
103- await operation . UpdateStatusAsync ( ) ;
110+ if ( IsAsync )
111+ {
112+ await operation . UpdateStatusAsync ( ) ;
113+ }
114+ else
115+ {
116+ operation . UpdateStatus ( ) ;
117+ }
104118
105119 testListener . AssertScope ( $ "{ nameof ( RecognizeReceiptsOperation ) } .{ nameof ( RecognizeReceiptsOperation . UpdateStatus ) } ") ;
106120 }
@@ -128,7 +142,14 @@ public async Task RecognizeBusinessCardsOperationCreatesDiagnosticScopeOnUpdate(
128142
129143 var operation = new RecognizeBusinessCardsOperation ( "00000000-0000-0000-0000-000000000000" , client ) ;
130144
131- await operation . UpdateStatusAsync ( ) ;
145+ if ( IsAsync )
146+ {
147+ await operation . UpdateStatusAsync ( ) ;
148+ }
149+ else
150+ {
151+ operation . UpdateStatus ( ) ;
152+ }
132153
133154 testListener . AssertScope ( $ "{ nameof ( RecognizeBusinessCardsOperation ) } .{ nameof ( RecognizeBusinessCardsOperation . UpdateStatus ) } ") ;
134155 }
@@ -158,7 +179,14 @@ public async Task RecognizeInvoicesOperationCreatesDiagnosticScopeOnUpdate()
158179
159180 var operation = new RecognizeInvoicesOperation ( "00000000-0000-0000-0000-000000000000" , client ) ;
160181
161- await operation . UpdateStatusAsync ( ) ;
182+ if ( IsAsync )
183+ {
184+ await operation . UpdateStatusAsync ( ) ;
185+ }
186+ else
187+ {
188+ operation . UpdateStatus ( ) ;
189+ }
162190
163191 testListener . AssertScope ( $ "{ nameof ( RecognizeInvoicesOperation ) } .{ nameof ( RecognizeInvoicesOperation . UpdateStatus ) } ") ;
164192 }
@@ -188,7 +216,14 @@ public async Task RecognizeCustomFormsOperationCreatesDiagnosticScopeOnUpdate()
188216
189217 var operation = new RecognizeCustomFormsOperation ( "00000000-0000-0000-0000-000000000000/analyzeResults/00000000-0000-0000-0000-000000000000" , client ) ;
190218
191- await operation . UpdateStatusAsync ( ) ;
219+ if ( IsAsync )
220+ {
221+ await operation . UpdateStatusAsync ( ) ;
222+ }
223+ else
224+ {
225+ operation . UpdateStatus ( ) ;
226+ }
192227
193228 testListener . AssertScope ( $ "{ nameof ( RecognizeCustomFormsOperation ) } .{ nameof ( RecognizeCustomFormsOperation . UpdateStatus ) } ") ;
194229 }
@@ -224,7 +259,14 @@ public async Task TrainingOperationCreatesDiagnosticScopeOnUpdate()
224259
225260 var operation = new TrainingOperation ( "00000000-0000-0000-0000-000000000000" , client ) ;
226261
227- await operation . UpdateStatusAsync ( ) ;
262+ if ( IsAsync )
263+ {
264+ await operation . UpdateStatusAsync ( ) ;
265+ }
266+ else
267+ {
268+ operation . UpdateStatus ( ) ;
269+ }
228270
229271 testListener . AssertScope ( $ "{ nameof ( CreateCustomFormModelOperation ) } .{ nameof ( CreateCustomFormModelOperation . UpdateStatus ) } ") ;
230272 }
@@ -258,7 +300,14 @@ public async Task CreateComposedModelOperationCreatesDiagnosticScopeOnUpdate()
258300
259301 var operation = new CreateComposedModelOperation ( "00000000-0000-0000-0000-000000000000" , client ) ;
260302
261- await operation . UpdateStatusAsync ( ) ;
303+ if ( IsAsync )
304+ {
305+ await operation . UpdateStatusAsync ( ) ;
306+ }
307+ else
308+ {
309+ operation . UpdateStatus ( ) ;
310+ }
262311
263312 testListener . AssertScope ( $ "{ nameof ( CreateCustomFormModelOperation ) } .{ nameof ( CreateCustomFormModelOperation . UpdateStatus ) } ") ;
264313 }
@@ -286,7 +335,14 @@ public async Task CopyModelOperationCreatesDiagnosticScopeOnUpdate()
286335
287336 var operation = new CopyModelOperation ( "00000000-0000-0000-0000-000000000000/copyresults/00000000-0000-0000-0000-000000000000" , "00000000-0000-0000-0000-000000000000" , client ) ;
288337
289- await operation . UpdateStatusAsync ( ) ;
338+ if ( IsAsync )
339+ {
340+ await operation . UpdateStatusAsync ( ) ;
341+ }
342+ else
343+ {
344+ operation . UpdateStatus ( ) ;
345+ }
290346
291347 testListener . AssertScope ( $ "{ nameof ( CopyModelOperation ) } .{ nameof ( CopyModelOperation . UpdateStatus ) } ") ;
292348 }
0 commit comments