This repository was archived by the owner on Jan 23, 2023. It is now read-only.
File tree 2 files changed +7
-1
lines changed
src/Common/src/CoreLib/System/Runtime/CompilerServices 2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -39,7 +39,7 @@ public struct ConfiguredValueTaskAwaiter : ICriticalNotifyCompletion
39
39
/// <summary>The value being awaited.</summary>
40
40
private ValueTask < TResult > _value ; // Methods are called on this; avoid making it readonly so as to avoid unnecessary copies
41
41
/// <summary>The value to pass to ConfigureAwait.</summary>
42
- private readonly bool _continueOnCapturedContext ;
42
+ internal readonly bool _continueOnCapturedContext ;
43
43
44
44
/// <summary>Initializes the awaiter.</summary>
45
45
/// <param name="value">The value to be awaited.</param>
@@ -66,6 +66,9 @@ public void OnCompleted(Action continuation) =>
66
66
/// <summary>Schedules the continuation action for the <see cref="ConfiguredValueTaskAwaitable{TResult}"/>.</summary>
67
67
public void UnsafeOnCompleted ( Action continuation ) =>
68
68
_value . AsTask ( ) . ConfigureAwait ( _continueOnCapturedContext ) . GetAwaiter ( ) . UnsafeOnCompleted ( continuation ) ;
69
+
70
+ /// <summary>Gets the task underlying <see cref="_value"/>.</summary>
71
+ internal Task < TResult > AsTask ( ) => _value . AsTask ( ) ;
69
72
}
70
73
}
71
74
}
Original file line number Diff line number Diff line change @@ -33,5 +33,8 @@ public void OnCompleted(Action continuation) =>
33
33
/// <summary>Schedules the continuation action for this ValueTask.</summary>
34
34
public void UnsafeOnCompleted ( Action continuation ) =>
35
35
_value . AsTask ( ) . ConfigureAwait ( continueOnCapturedContext : true ) . GetAwaiter ( ) . UnsafeOnCompleted ( continuation ) ;
36
+
37
+ /// <summary>Gets the task underlying <see cref="_value"/>.</summary>
38
+ internal Task < TResult > AsTask ( ) => _value . AsTask ( ) ;
36
39
}
37
40
}
You can’t perform that action at this time.
0 commit comments