You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/// <paramname="body">The body function to run.</param>
514
528
/// <returns>The resulting task.</returns>
515
529
/// <remarks>This function is used to de-sugar try .. with .. blocks in Computation Expressions.</remarks>
530
+
#if!NET45
516
531
let inlinetryWith([<InlineIfLambda>]compensation:exn ->Task<'T>)([<InlineIfLambda>]body:unit ->Task<'T>)= Task.tryWith body compensation
532
+
#else
533
+
let inlinetryWith(compensation:exn ->Task<'T>)(body:unit ->Task<'T>)= Task.tryWith body compensation
534
+
#endif
517
535
518
536
/// <summary>Runs a compensation function after the body completes, regardless of whether the body completed successfully, faulted, or was canceled.</summary>
519
537
/// <paramname="compensation">The compensation function to run after the body completes.</param>
520
538
/// <paramname="body">The body function to run.</param>
521
539
/// <returns>The resulting task.</returns>
522
540
/// <remarks>This function is used to de-sugar try .. finally .. blocks in Computation Expressions.</remarks>
541
+
#if!NET45
523
542
let inlinetryFinally([<InlineIfLambda>]compensation:unit ->unit)([<InlineIfLambda>]body:unit ->Task<'T>)= Task.tryFinally body compensation
543
+
#else
544
+
let inlinetryFinally(compensation:unit ->unit)(body:unit ->Task<'T>)= Task.tryFinally body compensation
0 commit comments