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
for (var i = disposables.{{nameof(List<object>.Count)}} - 1; i >= 0; i--)
362
+
while (disposables.{{nameof(ConcurrentStack<object>.TryPop)}}(out {{_wellKnownTypes.Object.FullName()}}? maybeDisposable) && maybeDisposable is {} disposable)
if ({{disposableElementParameterReference}}.{{clauseFunctionName}}(disposables[i]) && disposables[i] is {{disposableType}}{{disposableReference}} && {{disposableCall}}({{disposableReference}}) is {{_wellKnownTypes.Exception}}{{exceptionReference}})
386
+
if ({{disposableElementParameterReference}}.{{clauseFunctionName}}(disposable) && disposable is {{disposableType}}{{disposableReference}} && {{disposableCall}}({{disposableReference}}) is {{_wellKnownTypes.Exception}}{{exceptionReference}})
for (var i = {{disposeParamReference}}.{{DisposableRangeInterfaceData.DisposablesPropertyName}}.{{nameof(List<List<object>>.Count)}} - 1; i >= 0; i--)
578
+
while ({{disposeParamReference}}.{{DisposableRangeInterfaceData.DisposablesPropertyName}}.{{nameof(ConcurrentStack<ConcurrentStack<object>>.TryPop)}}(out {{_wellKnownTypes.ConcurrentStackOfObject.FullName()}}? maybeDisposables) && maybeDisposables is {} disposables)
578
579
{
579
-
foreach (var exception in {{DisposeChunkFullyQualified}}(({{DisposableRangeInterfaceData.InterfaceNameFullyQualified}}) {{disposeParamReference}}, {{disposeParamReference}}.{{DisposableRangeInterfaceData.DisposablesPropertyName}}[i]))
580
+
foreach (var exception in {{DisposeChunkFullyQualified}}(({{DisposableRangeInterfaceData.InterfaceNameFullyQualified}}) {{disposeParamReference}}, disposables))
580
581
{
581
582
yield return exception;
582
583
}
@@ -644,9 +645,9 @@ void GenerateAsyncDispose()
644
645
if (transientScope is {{_wellKnownTypes.IAsyncDisposable.FullName()}} asyncDisposable && await {{DisposeSingularAsyncFullyQualified}}(asyncDisposable) is {{_wellKnownTypes.Exception.FullName()}} exception)
645
646
yield return exception;
646
647
}
647
-
for (var i = {{disposeParamReference}}.{{DisposableRangeInterfaceData.DisposablesPropertyName}}.{{nameof(List<List<object>>.Count)}} - 1; i >= 0; i--)
648
+
while ({{disposeParamReference}}.{{DisposableRangeInterfaceData.DisposablesPropertyName}}.{{nameof(ConcurrentStack<ConcurrentStack<object>>.TryPop)}}(out {{_wellKnownTypes.ConcurrentStackOfObject.FullName()}}? maybeDisposables) && maybeDisposables is {} disposables)
648
649
{
649
-
await foreach (var exception in {{DisposeChunkAsyncFullyQualified}}({{disposeParamReference}}, {{disposeParamReference}}.{{DisposableRangeInterfaceData.DisposablesPropertyName}}[i]))
650
+
await foreach (var exception in {{DisposeChunkAsyncFullyQualified}}({{disposeParamReference}}, disposables))
private {{_wellKnownTypes.ListOfListOfObject.FullName()}}{{_rangeNode.DisposalHandling.CollectionReference}} = new {{_wellKnownTypes.ListOfListOfObject.FullName()}}();
78
+
private {{_wellKnownTypes.ConcurrentStackOfConcurrentStackOfObject.FullName()}}{{_rangeNode.DisposalHandling.CollectionReference}} = new {{_wellKnownTypes.ConcurrentStackOfConcurrentStackOfObject.FullName()}}();
0 commit comments