This repository was archived by the owner on Jan 23, 2023. It is now read-only.
File tree Expand file tree Collapse file tree
src/Common/src/CoreLib/System/Runtime/CompilerServices Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -39,7 +39,7 @@ public struct ConfiguredValueTaskAwaiter : ICriticalNotifyCompletion
3939 /// <summary>The value being awaited.</summary>
4040 private ValueTask < TResult > _value ; // Methods are called on this; avoid making it readonly so as to avoid unnecessary copies
4141 /// <summary>The value to pass to ConfigureAwait.</summary>
42- private readonly bool _continueOnCapturedContext ;
42+ internal readonly bool _continueOnCapturedContext ;
4343
4444 /// <summary>Initializes the awaiter.</summary>
4545 /// <param name="value">The value to be awaited.</param>
@@ -66,6 +66,9 @@ public void OnCompleted(Action continuation) =>
6666 /// <summary>Schedules the continuation action for the <see cref="ConfiguredValueTaskAwaitable{TResult}"/>.</summary>
6767 public void UnsafeOnCompleted ( Action continuation ) =>
6868 _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 ( ) ;
6972 }
7073 }
7174}
Original file line number Diff line number Diff line change @@ -33,5 +33,8 @@ public void OnCompleted(Action continuation) =>
3333 /// <summary>Schedules the continuation action for this ValueTask.</summary>
3434 public void UnsafeOnCompleted ( Action continuation ) =>
3535 _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 ( ) ;
3639 }
3740}
You can’t perform that action at this time.
0 commit comments