Skip to content

Commit

Permalink
Update comment to use await using.
Browse files Browse the repository at this point in the history
  • Loading branch information
bartdesmet committed Feb 14, 2019
1 parent 962fc99 commit 50ae7fe
Show file tree
Hide file tree
Showing 27 changed files with 200 additions and 200 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ async IAsyncEnumerator<TSource> Core(CancellationToken cancellationToken)

try
{
try // REVIEW: Can use `await using` if we get pattern bind (HAS_AWAIT_USING_PATTERN_BIND)
try // TODO: Switch to `await using` in preview 3 (https://github.com/dotnet/roslyn/pull/32731)
{
if (!await moveNextWinner.ConfigureAwait(false))
{
Expand Down Expand Up @@ -208,7 +208,7 @@ async IAsyncEnumerator<TSource> Core(CancellationToken cancellationToken)

try
{
try // REVIEW: Can use `await using` if we get pattern bind (HAS_AWAIT_USING_PATTERN_BIND)
try // TODO: Switch to `await using` in preview 3 (https://github.com/dotnet/roslyn/pull/32731)
{
if (!await moveNextWinner.ConfigureAwait(false))
{
Expand Down Expand Up @@ -254,7 +254,7 @@ private static async Task AwaitMoveNextAsyncAndDispose<T>(Task<bool> moveNextAsy
{
if (enumerator != null)
{
try // REVIEW: Can use `await using` if we get pattern bind (HAS_AWAIT_USING_PATTERN_BIND)
try // TODO: Switch to `await using` in preview 3 (https://github.com/dotnet/roslyn/pull/32731)
{
if (moveNextAsync != null)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ async IAsyncEnumerator<TSource> Core(CancellationToken cancellationToken)

var e = source.GetConfiguredAsyncEnumerator(cancellationToken, false);

try // REVIEW: Can use `await using` if we get pattern bind (HAS_AWAIT_USING_PATTERN_BIND)
try // TODO: Switch to `await using` in preview 3 (https://github.com/dotnet/roslyn/pull/32731)
{
while (true)
{
Expand Down Expand Up @@ -105,7 +105,7 @@ async IAsyncEnumerator<TSource> Core(CancellationToken cancellationToken)

var e = source.GetConfiguredAsyncEnumerator(cancellationToken, false);

try // REVIEW: Can use `await using` if we get pattern bind (HAS_AWAIT_USING_PATTERN_BIND)
try // TODO: Switch to `await using` in preview 3 (https://github.com/dotnet/roslyn/pull/32731)
{
while (true)
{
Expand Down Expand Up @@ -170,7 +170,7 @@ async IAsyncEnumerator<TSource> Core(CancellationToken cancellationToken)

var e = source.GetConfiguredAsyncEnumerator(cancellationToken, false);

try // REVIEW: Can use `await using` if we get pattern bind (HAS_AWAIT_USING_PATTERN_BIND)
try // TODO: Switch to `await using` in preview 3 (https://github.com/dotnet/roslyn/pull/32731)
{
while (true)
{
Expand Down Expand Up @@ -250,7 +250,7 @@ async IAsyncEnumerator<TSource> Core(CancellationToken cancellationToken)
{
var e = source.GetConfiguredAsyncEnumerator(cancellationToken, false);

try // REVIEW: Can use `await using` if we get pattern bind (HAS_AWAIT_USING_PATTERN_BIND)
try // TODO: Switch to `await using` in preview 3 (https://github.com/dotnet/roslyn/pull/32731)
{
error = null;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ async IAsyncEnumerator<TSource> Core(CancellationToken cancellationToken)
{
var e = source.GetConfiguredAsyncEnumerator(cancellationToken, false);

try // REVIEW: Can use `await using` if we get pattern bind (HAS_AWAIT_USING_PATTERN_BIND)
try // TODO: Switch to `await using` in preview 3 (https://github.com/dotnet/roslyn/pull/32731)
{
if (!await e.MoveNextAsync())
{
Expand Down Expand Up @@ -152,7 +152,7 @@ async IAsyncEnumerator<TSource> Core(CancellationToken cancellationToken)
{
var e = source.GetConfiguredAsyncEnumerator(cancellationToken, false);

try // REVIEW: Can use `await using` if we get pattern bind (HAS_AWAIT_USING_PATTERN_BIND)
try // TODO: Switch to `await using` in preview 3 (https://github.com/dotnet/roslyn/pull/32731)
{
if (!await e.MoveNextAsync())
{
Expand Down Expand Up @@ -203,7 +203,7 @@ async IAsyncEnumerator<TSource> Core(CancellationToken cancellationToken)
{
var e = source.GetConfiguredAsyncEnumerator(cancellationToken, false);

try // REVIEW: Can use `await using` if we get pattern bind (HAS_AWAIT_USING_PATTERN_BIND)
try // TODO: Switch to `await using` in preview 3 (https://github.com/dotnet/roslyn/pull/32731)
{
if (!await e.MoveNextAsync())
{
Expand Down Expand Up @@ -255,7 +255,7 @@ async IAsyncEnumerator<TSource> Core(CancellationToken cancellationToken)
{
var e = source.GetConfiguredAsyncEnumerator(cancellationToken, false);

try // REVIEW: Can use `await using` if we get pattern bind (HAS_AWAIT_USING_PATTERN_BIND)
try // TODO: Switch to `await using` in preview 3 (https://github.com/dotnet/roslyn/pull/32731)
{
if (!await e.MoveNextAsync())
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ async IAsyncEnumerator<TSource> Core(CancellationToken cancellationToken)
{
var e = source.GetConfiguredAsyncEnumerator(cancellationToken, false);

try // REVIEW: Can use `await using` if we get pattern bind (HAS_AWAIT_USING_PATTERN_BIND)
try // TODO: Switch to `await using` in preview 3 (https://github.com/dotnet/roslyn/pull/32731)
{
while (true)
{
Expand Down Expand Up @@ -229,7 +229,7 @@ async IAsyncEnumerator<TSource> Core(CancellationToken cancellationToken)
{
var e = source.GetConfiguredAsyncEnumerator(cancellationToken, false);

try // REVIEW: Can use `await using` if we get pattern bind (HAS_AWAIT_USING_PATTERN_BIND)
try // TODO: Switch to `await using` in preview 3 (https://github.com/dotnet/roslyn/pull/32731)
{
while (true)
{
Expand Down Expand Up @@ -284,7 +284,7 @@ async IAsyncEnumerator<TSource> Core(CancellationToken cancellationToken)
{
var e = source.GetConfiguredAsyncEnumerator(cancellationToken, false);

try // REVIEW: Can use `await using` if we get pattern bind (HAS_AWAIT_USING_PATTERN_BIND)
try // TODO: Switch to `await using` in preview 3 (https://github.com/dotnet/roslyn/pull/32731)
{
while (true)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ static async ValueTask<bool> Core(IAsyncEnumerable<TSource> _source, Cancellatio
{
var e = _source.GetConfiguredAsyncEnumerator(_cancellationToken, false);

try // REVIEW: Can use `await using` if we get pattern bind (HAS_AWAIT_USING_PATTERN_BIND)
try // TODO: Switch to `await using` in preview 3 (https://github.com/dotnet/roslyn/pull/32731)
{
return !await e.MoveNextAsync();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ static async ValueTask<TSource> Core(IAsyncEnumerable<TSource> _source, ICompare

var e = _source.GetConfiguredAsyncEnumerator(_cancellationToken, false);

try // REVIEW: Can use `await using` if we get pattern bind (HAS_AWAIT_USING_PATTERN_BIND)
try // TODO: Switch to `await using` in preview 3 (https://github.com/dotnet/roslyn/pull/32731)
{
if (!await e.MoveNextAsync())
throw Error.NoElements();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ static async ValueTask<TSource> Core(IAsyncEnumerable<TSource> _source, ICompare

var e = _source.GetConfiguredAsyncEnumerator(_cancellationToken, false);

try // REVIEW: Can use `await using` if we get pattern bind (HAS_AWAIT_USING_PATTERN_BIND)
try // TODO: Switch to `await using` in preview 3 (https://github.com/dotnet/roslyn/pull/32731)
{
if (!await e.MoveNextAsync())
throw Error.NoElements();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ private static async ValueTask<IList<TSource>> ExtremaBy<TSource, TKey>(IAsyncEn

var e = source.GetConfiguredAsyncEnumerator(cancellationToken, false);

try // REVIEW: Can use `await using` if we get pattern bind (HAS_AWAIT_USING_PATTERN_BIND)
try // TODO: Switch to `await using` in preview 3 (https://github.com/dotnet/roslyn/pull/32731)
{
if (!await e.MoveNextAsync())
throw Error.NoElements();
Expand Down Expand Up @@ -153,7 +153,7 @@ private static async ValueTask<IList<TSource>> ExtremaBy<TSource, TKey>(IAsyncEn

var e = source.GetConfiguredAsyncEnumerator(cancellationToken, false);

try // REVIEW: Can use `await using` if we get pattern bind (HAS_AWAIT_USING_PATTERN_BIND)
try // TODO: Switch to `await using` in preview 3 (https://github.com/dotnet/roslyn/pull/32731)
{
if (!await e.MoveNextAsync())
throw Error.NoElements();
Expand Down Expand Up @@ -195,7 +195,7 @@ private static async ValueTask<IList<TSource>> ExtremaBy<TSource, TKey>(IAsyncEn

var e = source.GetConfiguredAsyncEnumerator(cancellationToken, false);

try // REVIEW: Can use `await using` if we get pattern bind (HAS_AWAIT_USING_PATTERN_BIND)
try // TODO: Switch to `await using` in preview 3 (https://github.com/dotnet/roslyn/pull/32731)
{
if (!await e.MoveNextAsync())
throw Error.NoElements();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ async IAsyncEnumerator<TSource> Core(CancellationToken cancellationToken)
{
var e = source.GetConfiguredAsyncEnumerator(cancellationToken, false);

try // REVIEW: Can use `await using` if we get pattern bind (HAS_AWAIT_USING_PATTERN_BIND)
try // TODO: Switch to `await using` in preview 3 (https://github.com/dotnet/roslyn/pull/32731)
{
if (!await e.MoveNextAsync())
{
Expand Down Expand Up @@ -95,7 +95,7 @@ async IAsyncEnumerator<TSource> Core(CancellationToken cancellationToken)
{
var e = source.GetConfiguredAsyncEnumerator(cancellationToken, false);

try // REVIEW: Can use `await using` if we get pattern bind (HAS_AWAIT_USING_PATTERN_BIND)
try // TODO: Switch to `await using` in preview 3 (https://github.com/dotnet/roslyn/pull/32731)
{
if (!await e.MoveNextAsync())
{
Expand Down Expand Up @@ -136,7 +136,7 @@ async IAsyncEnumerator<TSource> Core(CancellationToken cancellationToken)
{
var e = source.GetConfiguredAsyncEnumerator(cancellationToken, false);

try // REVIEW: Can use `await using` if we get pattern bind (HAS_AWAIT_USING_PATTERN_BIND)
try // TODO: Switch to `await using` in preview 3 (https://github.com/dotnet/roslyn/pull/32731)
{
if (!await e.MoveNextAsync())
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ internal static async ValueTask<ArrayWithLength<T>> ToArrayWithLength<T>(IAsyncE
{
var en = source.GetConfiguredAsyncEnumerator(cancellationToken, false);

try // REVIEW: Can use `await using` if we get pattern bind (HAS_AWAIT_USING_PATTERN_BIND)
try // TODO: Switch to `await using` in preview 3 (https://github.com/dotnet/roslyn/pull/32731)
{
if (await en.MoveNextAsync())
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ static async ValueTask<TSource> Core(IAsyncEnumerable<TSource> _source, Func<TSo
{
var e = _source.GetConfiguredAsyncEnumerator(_cancellationToken, false);

try // REVIEW: Can use `await using` if we get pattern bind (HAS_AWAIT_USING_PATTERN_BIND)
try // TODO: Switch to `await using` in preview 3 (https://github.com/dotnet/roslyn/pull/32731)
{
if (!await e.MoveNextAsync())
{
Expand Down Expand Up @@ -59,7 +59,7 @@ static async ValueTask<TSource> Core(IAsyncEnumerable<TSource> _source, Func<TSo
{
var e = _source.GetConfiguredAsyncEnumerator(_cancellationToken, false);

try // REVIEW: Can use `await using` if we get pattern bind (HAS_AWAIT_USING_PATTERN_BIND)
try // TODO: Switch to `await using` in preview 3 (https://github.com/dotnet/roslyn/pull/32731)
{
if (!await e.MoveNextAsync())
{
Expand Down Expand Up @@ -96,7 +96,7 @@ static async ValueTask<TSource> Core(IAsyncEnumerable<TSource> _source, Func<TSo
{
var e = _source.GetConfiguredAsyncEnumerator(_cancellationToken, false);

try // REVIEW: Can use `await using` if we get pattern bind (HAS_AWAIT_USING_PATTERN_BIND)
try // TODO: Switch to `await using` in preview 3 (https://github.com/dotnet/roslyn/pull/32731)
{
if (!await e.MoveNextAsync())
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ static async ValueTask<bool> Core(IAsyncEnumerable<TSource> _source, Cancellatio
{
var e = _source.GetConfiguredAsyncEnumerator(_cancellationToken, false);

try // REVIEW: Can use `await using` if we get pattern bind (HAS_AWAIT_USING_PATTERN_BIND)
try // TODO: Switch to `await using` in preview 3 (https://github.com/dotnet/roslyn/pull/32731)
{
return await e.MoveNextAsync();
}
Expand Down
Loading

0 comments on commit 50ae7fe

Please sign in to comment.