313 references to InnerExceptions
Aspire.Hosting (1)
Pipelines\DistributedApplicationPipeline.cs (1)
610.SelectMany(ae => ae.InnerExceptions)
Aspire.Hosting.Tests (2)
DistributedApplicationTests.cs (2)
413Assert.IsType<DistributedApplicationException>(ex.InnerExceptions.First()); 414Assert.Equal(exceptionMessage, ex.InnerExceptions.First().Message);
BuildActionTelemetryTable (4)
src\Dependencies\Contracts\ErrorReporting\FailFast.cs (2)
37if (exception is AggregateException aggregate && aggregate.InnerExceptions.Count == 1) 39exception = aggregate.InnerExceptions[0];
src\Dependencies\Contracts\ErrorReporting\FatalError.cs (2)
292if (exception is AggregateException aggregate && aggregate.InnerExceptions.Count == 1 && aggregate.InnerExceptions[0].Data[s_reportedMarker] != null)
ClientSample (1)
RawSample.cs (1)
62catch (AggregateException aex) when (aex.InnerExceptions.All(e => e is OperationCanceledException))
CodeStyleConfigFileGenerator (4)
src\Dependencies\Contracts\ErrorReporting\FailFast.cs (2)
37if (exception is AggregateException aggregate && aggregate.InnerExceptions.Count == 1) 39exception = aggregate.InnerExceptions[0];
src\Dependencies\Contracts\ErrorReporting\FatalError.cs (2)
292if (exception is AggregateException aggregate && aggregate.InnerExceptions.Count == 1 && aggregate.InnerExceptions[0].Data[s_reportedMarker] != null)
Crossgen2Tasks (2)
CommonFilePulledFromSdkRepo\TaskBase.cs (2)
65for (int i = 0; i < aggregate.InnerExceptions.Count; i++) 72ExceptionToStringWithoutMessage(aggregate.InnerExceptions[i]),
dotnet (2)
Telemetry\TelemetryFilter.cs (2)
190for (int i = 0; i < aggregate.InnerExceptions.Count; i++) 197ExceptionToStringWithoutMessage(aggregate.InnerExceptions[i]),
dotnet-openapi (1)
Application.cs (1)
63foreach (var innerException in ex.InnerExceptions)
dotnet-svcutil-lib (3)
FrameworkFork\System.ServiceModel\Internals\System\Runtime\ExceptionTrace.cs (1)
136ReadOnlyCollection<Exception> innerExceptions = aggregateException.Flatten().InnerExceptions;
FrameworkFork\System.ServiceModel\Internals\System\Runtime\Fx.cs (1)
205ReadOnlyCollection<Exception> innerExceptions = ((AggregateException)exception).InnerExceptions;
Tool.cs (1)
346foreach (var ax in agex.InnerExceptions)
dotnet-watch (2)
Build\ProjectGraphUtilities.cs (1)
48if (e is AggregateException { InnerExceptions: var innerExceptions })
ExceptionExtensions.cs (1)
21foreach (var e in aggException.Flatten().InnerExceptions)
Metrics (7)
src\Dependencies\Contracts\ErrorReporting\FailFast.cs (2)
37if (exception is AggregateException aggregate && aggregate.InnerExceptions.Count == 1) 39exception = aggregate.InnerExceptions[0];
src\Dependencies\Contracts\ErrorReporting\FatalError.cs (2)
292if (exception is AggregateException aggregate && aggregate.InnerExceptions.Count == 1 && aggregate.InnerExceptions[0].Data[s_reportedMarker] != null)
src\Dependencies\Threading\ParallelExtensions.NetFramework.cs (1)
520_exceptions.AddRange(ae.InnerExceptions);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AsyncLazy`1.cs (2)
582if (task.Exception.InnerExceptions.Count > 0) 583this.TrySetException(task.Exception.InnerExceptions);
Metrics.Legacy (7)
src\Dependencies\Contracts\ErrorReporting\FailFast.cs (2)
37if (exception is AggregateException aggregate && aggregate.InnerExceptions.Count == 1) 39exception = aggregate.InnerExceptions[0];
src\Dependencies\Contracts\ErrorReporting\FatalError.cs (2)
292if (exception is AggregateException aggregate && aggregate.InnerExceptions.Count == 1 && aggregate.InnerExceptions[0].Data[s_reportedMarker] != null)
src\Dependencies\Threading\ParallelExtensions.NetFramework.cs (1)
520_exceptions.AddRange(ae.InnerExceptions);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AsyncLazy`1.cs (2)
582if (task.Exception.InnerExceptions.Count > 0) 583this.TrySetException(task.Exception.InnerExceptions);
Microsoft.AspNetCore.Authentication.JwtBearer (1)
JwtBearerHandler.cs (1)
374exceptions = agEx.InnerExceptions;
Microsoft.AspNetCore.Components.Server (1)
Circuits\RemoteRenderer.cs (1)
120foreach (var innerException in aggregateException.Flatten().InnerExceptions)
Microsoft.AspNetCore.Components.Server.Tests (1)
Circuits\CircuitHostTest.cs (1)
286Assert.Same(ex, aex.InnerExceptions.Single());
Microsoft.AspNetCore.Components.Tests (4)
RendererTest.cs (4)
2303Assert.Contains(exception1, aex.InnerExceptions); 2304Assert.Contains(exception2, aex.InnerExceptions); 4259Assert.Contains(exception1, aex.InnerExceptions); 4260Assert.Contains(exception2, aex.InnerExceptions);
Microsoft.AspNetCore.Components.WebAssembly (1)
Rendering\WebAssemblyRenderer.cs (1)
202foreach (var innerException in aggregateException.Flatten().InnerExceptions)
Microsoft.AspNetCore.Diagnostics (1)
src\Shared\StackTrace\ExceptionDetails\ExceptionDetailsProvider.cs (1)
76foreach (var innerException in aggregateException.Flatten().InnerExceptions)
Microsoft.AspNetCore.Hosting (3)
GenericHost\GenericWebHostService.cs (1)
190foreach (var exception in Options.HostingStartupExceptions.InnerExceptions)
Internal\WebHost.cs (1)
166foreach (var exception in _hostingStartupErrors.InnerExceptions)
src\Shared\StackTrace\ExceptionDetails\ExceptionDetailsProvider.cs (1)
76foreach (var innerException in aggregateException.Flatten().InnerExceptions)
Microsoft.AspNetCore.Hosting.Tests (2)
WebHostBuilderTests.cs (2)
1363stopEx = Assert.Single(aggregateException.InnerExceptions); 1389stopEx = Assert.Single(aggregateException.InnerExceptions);
Microsoft.AspNetCore.Server.IIS (1)
src\Shared\StackTrace\ExceptionDetails\ExceptionDetailsProvider.cs (1)
76foreach (var innerException in aggregateException.Flatten().InnerExceptions)
Microsoft.AspNetCore.Server.Kestrel.Core.Tests (2)
DiagnosticMemoryPoolTests.cs (2)
200Assert.Equal(new Exception[] { exception }, aggregateException.InnerExceptions); 226Assert.Equal(inner, exception.InnerExceptions);
Microsoft.AspNetCore.SignalR.Client.Tests (2)
HttpConnectionTests.ConnectionLifecycle.cs (2)
448Assert.Equal(3, ex.InnerExceptions.Count); 449var innerEx = ex.InnerExceptions[2];
Microsoft.Build (14)
BackEnd\BuildManager\BuildManager.cs (8)
1078if (e is AggregateException ae && ae.InnerExceptions.Count == 1) 1080ExceptionDispatchInfo.Capture(ae.InnerExceptions[0]).Throw(); 1754if (ae.InnerExceptions.Count == 1) 1756ex = ae.InnerExceptions[0]; 1761foreach (Exception innerException in ae.InnerExceptions) 2529catch (AggregateException ex) when (ex.InnerExceptions.All(inner => inner is OperationCanceledException)) 2879if (e is AggregateException ae && ae.InnerExceptions.Count == 1) 2881e = ae.InnerExceptions.First();
BackEnd\Components\RequestBuilder\RequestBuilder.cs (1)
316return e.Flatten().InnerExceptions.All(ex => ex is TaskCanceledException || ex is OperationCanceledException);
ExceptionHandling.cs (1)
150if (aggregateException.InnerExceptions.Any(innerException => IsCriticalException(innerException)))
FileMatcher.cs (2)
2611if (ex.Flatten().InnerExceptions.All(ExceptionHandling.IsIoRelatedException)) 2644return ex.Flatten().InnerExceptions.All(ExceptionHandling.IsIoRelatedException);
TaskLoggingHelper.cs (2)
936foreach (Exception innerException in aggregateException.Flatten().InnerExceptions) 1556foreach (Exception innerException in aggregateException.Flatten().InnerExceptions)
Microsoft.Build.Engine.OM.UnitTests (1)
ExceptionHandling.cs (1)
150if (aggregateException.InnerExceptions.Any(innerException => IsCriticalException(innerException)))
Microsoft.Build.Engine.UnitTests (10)
BackEnd\BuildManager_Tests.cs (3)
4256aggException.InnerExceptions.Count.ShouldBe(2); 4257aggException.InnerExceptions[0].ShouldBeOfType<InvalidProjectFileException>().ProjectFile.ShouldBeOneOf(project2, project3); 4258aggException.InnerExceptions[1].ShouldBeOfType<InvalidProjectFileException>().ProjectFile.ShouldBeOneOf(project2, project3);
Graph\GraphLoadedFromSolution_tests.cs (2)
83aggException.InnerExceptions.ShouldHaveSingleItem(); 85var exception = aggException.InnerExceptions[0].ShouldBeOfType<InvalidOperationException>();
Graph\ParallelWorkSet_Tests.cs (1)
267Should.Throw<AggregateException>(() => _workSet.WaitForAllWorkAndComplete()).InnerExceptions.ShouldBeSetEquivalentTo(observedExceptions);
Graph\ProjectGraph_Tests.cs (4)
212aggException.InnerExceptions.ShouldHaveSingleItem(); 214aggException.InnerExceptions[0].ShouldBeOfType<InvalidOperationException>(); 565aggException.InnerExceptions.ShouldHaveSingleItem(); 567aggException.InnerExceptions[0].ShouldBeOfType<InvalidProjectFileException>();
Microsoft.Build.Framework (4)
FailFast.cs (2)
37if (exception is AggregateException aggregate && aggregate.InnerExceptions.Count == 1) 39exception = aggregate.InnerExceptions[0];
FatalError.cs (2)
292if (exception is AggregateException aggregate && aggregate.InnerExceptions.Count == 1 && aggregate.InnerExceptions[0].Data[s_reportedMarker] != null)
Microsoft.Build.Tasks.CodeAnalysis (4)
src\Dependencies\Contracts\ErrorReporting\FailFast.cs (2)
37if (exception is AggregateException aggregate && aggregate.InnerExceptions.Count == 1) 39exception = aggregate.InnerExceptions[0];
src\Dependencies\Contracts\ErrorReporting\FatalError.cs (2)
292if (exception is AggregateException aggregate && aggregate.InnerExceptions.Count == 1 && aggregate.InnerExceptions[0].Data[s_reportedMarker] != null)
Microsoft.Build.Tasks.CodeAnalysis.Sdk (4)
src\Dependencies\Contracts\ErrorReporting\FailFast.cs (2)
37if (exception is AggregateException aggregate && aggregate.InnerExceptions.Count == 1) 39exception = aggregate.InnerExceptions[0];
src\Dependencies\Contracts\ErrorReporting\FatalError.cs (2)
292if (exception is AggregateException aggregate && aggregate.InnerExceptions.Count == 1 && aggregate.InnerExceptions[0].Data[s_reportedMarker] != null)
Microsoft.Build.Tasks.Core (3)
ExceptionHandling.cs (1)
150if (aggregateException.InnerExceptions.Any(innerException => IsCriticalException(innerException)))
FileMatcher.cs (2)
2611if (ex.Flatten().InnerExceptions.All(ExceptionHandling.IsIoRelatedException)) 2644return ex.Flatten().InnerExceptions.All(ExceptionHandling.IsIoRelatedException);
Microsoft.Build.Utilities.Core (5)
ExceptionHandling.cs (1)
150if (aggregateException.InnerExceptions.Any(innerException => IsCriticalException(innerException)))
FileMatcher.cs (2)
2611if (ex.Flatten().InnerExceptions.All(ExceptionHandling.IsIoRelatedException)) 2644return ex.Flatten().InnerExceptions.All(ExceptionHandling.IsIoRelatedException);
TaskLoggingHelper.cs (2)
936foreach (Exception innerException in aggregateException.Flatten().InnerExceptions) 1556foreach (Exception innerException in aggregateException.Flatten().InnerExceptions)
Microsoft.CodeAnalysis (5)
src\Compilers\Core\AnalyzerDriver\AnalyzerExceptionDescriptionBuilder.cs (1)
23return string.Join(s_separator, flattened.InnerExceptions.Select(e => GetExceptionMessage(e)));
src\Dependencies\Contracts\ErrorReporting\FailFast.cs (2)
37if (exception is AggregateException aggregate && aggregate.InnerExceptions.Count == 1) 39exception = aggregate.InnerExceptions[0];
src\Dependencies\Contracts\ErrorReporting\FatalError.cs (2)
292if (exception is AggregateException aggregate && aggregate.InnerExceptions.Count == 1 && aggregate.InnerExceptions[0].Data[s_reportedMarker] != null)
Microsoft.CodeAnalysis.Analyzers (7)
src\Dependencies\Contracts\ErrorReporting\FailFast.cs (2)
37if (exception is AggregateException aggregate && aggregate.InnerExceptions.Count == 1) 39exception = aggregate.InnerExceptions[0];
src\Dependencies\Contracts\ErrorReporting\FatalError.cs (2)
292if (exception is AggregateException aggregate && aggregate.InnerExceptions.Count == 1 && aggregate.InnerExceptions[0].Data[s_reportedMarker] != null)
src\Dependencies\Threading\ParallelExtensions.NetFramework.cs (1)
520_exceptions.AddRange(ae.InnerExceptions);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AsyncLazy`1.cs (2)
582if (task.Exception.InnerExceptions.Count > 0) 583this.TrySetException(task.Exception.InnerExceptions);
Microsoft.CodeAnalysis.AnalyzerUtilities (7)
src\Dependencies\Contracts\ErrorReporting\FailFast.cs (2)
37if (exception is AggregateException aggregate && aggregate.InnerExceptions.Count == 1) 39exception = aggregate.InnerExceptions[0];
src\Dependencies\Contracts\ErrorReporting\FatalError.cs (2)
292if (exception is AggregateException aggregate && aggregate.InnerExceptions.Count == 1 && aggregate.InnerExceptions[0].Data[s_reportedMarker] != null)
src\Dependencies\Threading\ParallelExtensions.NetFramework.cs (1)
520_exceptions.AddRange(ae.InnerExceptions);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AsyncLazy`1.cs (2)
582if (task.Exception.InnerExceptions.Count > 0) 583this.TrySetException(task.Exception.InnerExceptions);
Microsoft.CodeAnalysis.BannedApiAnalyzers (7)
src\Dependencies\Contracts\ErrorReporting\FailFast.cs (2)
37if (exception is AggregateException aggregate && aggregate.InnerExceptions.Count == 1) 39exception = aggregate.InnerExceptions[0];
src\Dependencies\Contracts\ErrorReporting\FatalError.cs (2)
292if (exception is AggregateException aggregate && aggregate.InnerExceptions.Count == 1 && aggregate.InnerExceptions[0].Data[s_reportedMarker] != null)
src\Dependencies\Threading\ParallelExtensions.NetFramework.cs (1)
520_exceptions.AddRange(ae.InnerExceptions);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AsyncLazy`1.cs (2)
582if (task.Exception.InnerExceptions.Count > 0) 583this.TrySetException(task.Exception.InnerExceptions);
Microsoft.CodeAnalysis.CodeStyle (7)
src\Dependencies\Contracts\ErrorReporting\FailFast.cs (2)
37if (exception is AggregateException aggregate && aggregate.InnerExceptions.Count == 1) 39exception = aggregate.InnerExceptions[0];
src\Dependencies\Contracts\ErrorReporting\FatalError.cs (2)
292if (exception is AggregateException aggregate && aggregate.InnerExceptions.Count == 1 && aggregate.InnerExceptions[0].Data[s_reportedMarker] != null)
src\Dependencies\Threading\ParallelExtensions.NetFramework.cs (1)
520_exceptions.AddRange(ae.InnerExceptions);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AsyncLazy`1.cs (2)
582if (task.Exception.InnerExceptions.Count > 0) 583this.TrySetException(task.Exception.InnerExceptions);
Microsoft.CodeAnalysis.Collections.Package (4)
src\Dependencies\Contracts\ErrorReporting\FailFast.cs (2)
37if (exception is AggregateException aggregate && aggregate.InnerExceptions.Count == 1) 39exception = aggregate.InnerExceptions[0];
src\Dependencies\Contracts\ErrorReporting\FatalError.cs (2)
292if (exception is AggregateException aggregate && aggregate.InnerExceptions.Count == 1 && aggregate.InnerExceptions[0].Data[s_reportedMarker] != null)
Microsoft.CodeAnalysis.Contracts.Package (4)
ErrorReporting\FailFast.cs (2)
37if (exception is AggregateException aggregate && aggregate.InnerExceptions.Count == 1) 39exception = aggregate.InnerExceptions[0];
ErrorReporting\FatalError.cs (2)
292if (exception is AggregateException aggregate && aggregate.InnerExceptions.Count == 1 && aggregate.InnerExceptions[0].Data[s_reportedMarker] != null)
Microsoft.CodeAnalysis.Debugging.Package (4)
src\Dependencies\Contracts\ErrorReporting\FailFast.cs (2)
37if (exception is AggregateException aggregate && aggregate.InnerExceptions.Count == 1) 39exception = aggregate.InnerExceptions[0];
src\Dependencies\Contracts\ErrorReporting\FatalError.cs (2)
292if (exception is AggregateException aggregate && aggregate.InnerExceptions.Count == 1 && aggregate.InnerExceptions[0].Data[s_reportedMarker] != null)
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (1)
Utilities\AsynchronousOperationListenerTests.cs (1)
47foreach (var inner in e.InnerExceptions)
Microsoft.CodeAnalysis.ExpressionEvaluator.ResultProvider (4)
src\Dependencies\Contracts\ErrorReporting\FailFast.cs (2)
37if (exception is AggregateException aggregate && aggregate.InnerExceptions.Count == 1) 39exception = aggregate.InnerExceptions[0];
src\Dependencies\Contracts\ErrorReporting\FatalError.cs (2)
292if (exception is AggregateException aggregate && aggregate.InnerExceptions.Count == 1 && aggregate.InnerExceptions[0].Data[s_reportedMarker] != null)
Microsoft.CodeAnalysis.ExpressionEvaluator.ResultProvider.Utilities (4)
src\Dependencies\Contracts\ErrorReporting\FailFast.cs (2)
37if (exception is AggregateException aggregate && aggregate.InnerExceptions.Count == 1) 39exception = aggregate.InnerExceptions[0];
src\Dependencies\Contracts\ErrorReporting\FatalError.cs (2)
292if (exception is AggregateException aggregate && aggregate.InnerExceptions.Count == 1 && aggregate.InnerExceptions[0].Data[s_reportedMarker] != null)
Microsoft.CodeAnalysis.Extensions.Package (4)
src\Dependencies\Contracts\ErrorReporting\FailFast.cs (2)
37if (exception is AggregateException aggregate && aggregate.InnerExceptions.Count == 1) 39exception = aggregate.InnerExceptions[0];
src\Dependencies\Contracts\ErrorReporting\FatalError.cs (2)
292if (exception is AggregateException aggregate && aggregate.InnerExceptions.Count == 1 && aggregate.InnerExceptions[0].Data[s_reportedMarker] != null)
Microsoft.CodeAnalysis.Features (4)
ExternalAccess\UnitTesting\SolutionCrawler\UnitTestingWorkCoordinator.cs (2)
133if (ae.InnerExceptions.Any(e => e is not OperationCanceledException) || 134ae.InnerExceptions.Cast<OperationCanceledException>().Any(NotOurShutdownToken))
ExternalAccess\UnitTesting\SolutionCrawler\UnitTestingWorkCoordinator.UnitTestingIncrementalAnalyzerProcessor.cs (1)
236if (flattened.InnerExceptions.All(e => e is OperationCanceledException))
src\Compilers\Core\AnalyzerDriver\AnalyzerExceptionDescriptionBuilder.cs (1)
23return string.Join(s_separator, flattened.InnerExceptions.Select(e => GetExceptionMessage(e)));
Microsoft.CodeAnalysis.InteractiveHost (7)
src\Dependencies\Contracts\ErrorReporting\FailFast.cs (2)
37if (exception is AggregateException aggregate && aggregate.InnerExceptions.Count == 1) 39exception = aggregate.InnerExceptions[0];
src\Dependencies\Contracts\ErrorReporting\FatalError.cs (2)
292if (exception is AggregateException aggregate && aggregate.InnerExceptions.Count == 1 && aggregate.InnerExceptions[0].Data[s_reportedMarker] != null)
src\Dependencies\Threading\ParallelExtensions.NetFramework.cs (1)
520_exceptions.AddRange(ae.InnerExceptions);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AsyncLazy`1.cs (2)
582if (task.Exception.InnerExceptions.Count > 0) 583this.TrySetException(task.Exception.InnerExceptions);
Microsoft.CodeAnalysis.LanguageServer (1)
Logging\RoslynLogger.cs (1)
70foreach (var innerException in aggregateException.Flatten().InnerExceptions)
Microsoft.CodeAnalysis.PerformanceSensitiveAnalyzers (7)
src\Dependencies\Contracts\ErrorReporting\FailFast.cs (2)
37if (exception is AggregateException aggregate && aggregate.InnerExceptions.Count == 1) 39exception = aggregate.InnerExceptions[0];
src\Dependencies\Contracts\ErrorReporting\FatalError.cs (2)
292if (exception is AggregateException aggregate && aggregate.InnerExceptions.Count == 1 && aggregate.InnerExceptions[0].Data[s_reportedMarker] != null)
src\Dependencies\Threading\ParallelExtensions.NetFramework.cs (1)
520_exceptions.AddRange(ae.InnerExceptions);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AsyncLazy`1.cs (2)
582if (task.Exception.InnerExceptions.Count > 0) 583this.TrySetException(task.Exception.InnerExceptions);
Microsoft.CodeAnalysis.PooledObjects.Package (4)
src\Dependencies\Contracts\ErrorReporting\FailFast.cs (2)
37if (exception is AggregateException aggregate && aggregate.InnerExceptions.Count == 1) 39exception = aggregate.InnerExceptions[0];
src\Dependencies\Contracts\ErrorReporting\FatalError.cs (2)
292if (exception is AggregateException aggregate && aggregate.InnerExceptions.Count == 1 && aggregate.InnerExceptions[0].Data[s_reportedMarker] != null)
Microsoft.CodeAnalysis.PublicApiAnalyzers (7)
src\Dependencies\Contracts\ErrorReporting\FailFast.cs (2)
37if (exception is AggregateException aggregate && aggregate.InnerExceptions.Count == 1) 39exception = aggregate.InnerExceptions[0];
src\Dependencies\Contracts\ErrorReporting\FatalError.cs (2)
292if (exception is AggregateException aggregate && aggregate.InnerExceptions.Count == 1 && aggregate.InnerExceptions[0].Data[s_reportedMarker] != null)
src\Dependencies\Threading\ParallelExtensions.NetFramework.cs (1)
520_exceptions.AddRange(ae.InnerExceptions);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AsyncLazy`1.cs (2)
582if (task.Exception.InnerExceptions.Count > 0) 583this.TrySetException(task.Exception.InnerExceptions);
Microsoft.CodeAnalysis.Remote.ServiceHub (1)
src\VisualStudio\Core\Def\Watson\FaultReporter.cs (1)
122foreach (var innerException in aggregateException.Flatten().InnerExceptions)
Microsoft.CodeAnalysis.ResxSourceGenerator (7)
src\Dependencies\Contracts\ErrorReporting\FailFast.cs (2)
37if (exception is AggregateException aggregate && aggregate.InnerExceptions.Count == 1) 39exception = aggregate.InnerExceptions[0];
src\Dependencies\Contracts\ErrorReporting\FatalError.cs (2)
292if (exception is AggregateException aggregate && aggregate.InnerExceptions.Count == 1 && aggregate.InnerExceptions[0].Data[s_reportedMarker] != null)
src\Dependencies\Threading\ParallelExtensions.NetFramework.cs (1)
520_exceptions.AddRange(ae.InnerExceptions);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AsyncLazy`1.cs (2)
582if (task.Exception.InnerExceptions.Count > 0) 583this.TrySetException(task.Exception.InnerExceptions);
Microsoft.CodeAnalysis.Threading.Package (4)
src\Dependencies\Contracts\ErrorReporting\FailFast.cs (2)
37if (exception is AggregateException aggregate && aggregate.InnerExceptions.Count == 1) 39exception = aggregate.InnerExceptions[0];
src\Dependencies\Contracts\ErrorReporting\FatalError.cs (2)
292if (exception is AggregateException aggregate && aggregate.InnerExceptions.Count == 1 && aggregate.InnerExceptions[0].Data[s_reportedMarker] != null)
Microsoft.CodeAnalysis.Workspaces (6)
src\Dependencies\Contracts\ErrorReporting\FailFast.cs (2)
37if (exception is AggregateException aggregate && aggregate.InnerExceptions.Count == 1) 39exception = aggregate.InnerExceptions[0];
src\Dependencies\Contracts\ErrorReporting\FatalError.cs (2)
292if (exception is AggregateException aggregate && aggregate.InnerExceptions.Count == 1 && aggregate.InnerExceptions[0].Data[s_reportedMarker] != null)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AsyncLazy`1.cs (2)
582if (task.Exception.InnerExceptions.Count > 0) 583this.TrySetException(task.Exception.InnerExceptions);
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (4)
src\Dependencies\Contracts\ErrorReporting\FailFast.cs (2)
37if (exception is AggregateException aggregate && aggregate.InnerExceptions.Count == 1) 39exception = aggregate.InnerExceptions[0];
src\Dependencies\Contracts\ErrorReporting\FatalError.cs (2)
292if (exception is AggregateException aggregate && aggregate.InnerExceptions.Count == 1 && aggregate.InnerExceptions[0].Data[s_reportedMarker] != null)
Microsoft.CodeAnalysis.Workspaces.UnitTests (1)
UtilityTest\CancellationSeriesTests.cs (1)
128Assert.Same(exception, aggregateException.InnerExceptions.Single());
Microsoft.CommonLanguageServerProtocol.Framework.Example (4)
src\Dependencies\Contracts\ErrorReporting\FailFast.cs (2)
37if (exception is AggregateException aggregate && aggregate.InnerExceptions.Count == 1) 39exception = aggregate.InnerExceptions[0];
src\Dependencies\Contracts\ErrorReporting\FatalError.cs (2)
292if (exception is AggregateException aggregate && aggregate.InnerExceptions.Count == 1 && aggregate.InnerExceptions[0].Data[s_reportedMarker] != null)
Microsoft.CommonLanguageServerProtocol.Framework.Package (4)
src\Dependencies\Contracts\ErrorReporting\FailFast.cs (2)
37if (exception is AggregateException aggregate && aggregate.InnerExceptions.Count == 1) 39exception = aggregate.InnerExceptions[0];
src\Dependencies\Contracts\ErrorReporting\FatalError.cs (2)
292if (exception is AggregateException aggregate && aggregate.InnerExceptions.Count == 1 && aggregate.InnerExceptions[0].Data[s_reportedMarker] != null)
Microsoft.DotNet.ApiCompat.Task (2)
TaskBase.cs (2)
65for (int i = 0; i < aggregate.InnerExceptions.Count; i++) 72ExceptionToStringWithoutMessage(aggregate.InnerExceptions[i]),
Microsoft.DotNet.GenAPI.Task (2)
TaskBase.cs (2)
65for (int i = 0; i < aggregate.InnerExceptions.Count; i++) 72ExceptionToStringWithoutMessage(aggregate.InnerExceptions[i]),
Microsoft.DotNet.HotReload.Client.Package (4)
FailFast.cs (2)
37if (exception is AggregateException aggregate && aggregate.InnerExceptions.Count == 1) 39exception = aggregate.InnerExceptions[0];
FatalError.cs (2)
292if (exception is AggregateException aggregate && aggregate.InnerExceptions.Count == 1 && aggregate.InnerExceptions[0].Data[s_reportedMarker] != null)
Microsoft.DotNet.HotReload.Client.Tests (4)
FailFast.cs (2)
37if (exception is AggregateException aggregate && aggregate.InnerExceptions.Count == 1) 39exception = aggregate.InnerExceptions[0];
FatalError.cs (2)
292if (exception is AggregateException aggregate && aggregate.InnerExceptions.Count == 1 && aggregate.InnerExceptions[0].Data[s_reportedMarker] != null)
Microsoft.DotNet.NuGetRepack.Tasks (1)
src\UpdatePackageVersionTask.cs (1)
96foreach (var inner in e.InnerExceptions)
Microsoft.DotNet.NuGetRepack.Tests (3)
VersionUpdaterTests.cs (3)
147}, e2.InnerExceptions.Select(i => i.ToString())); 154}, e3.InnerExceptions.Select(i => i.ToString())); 161}, e4.InnerExceptions.Select(i => i.ToString()));
Microsoft.Extensions.AI.Evaluation.Console (1)
Utilities\ExceptionUtilities.cs (1)
34foreach (var innerException in aggregateException.InnerExceptions)
Microsoft.Extensions.AI.Tests (6)
ChatCompletion\FunctionInvokingChatClientTests.cs (6)
454Assert.Equal(2, ex.InnerExceptions.Count); 455Assert.Equal("Exception from call 11", ex.InnerExceptions[0].Message); 456Assert.Equal("Exception from call 12", ex.InnerExceptions[1].Message); 460Assert.Equal(2, ex.InnerExceptions.Count); 461Assert.Equal("Exception from call 11", ex.InnerExceptions[0].Message); 462Assert.Equal("Exception from call 12", ex.InnerExceptions[1].Message);
Microsoft.Extensions.Hosting (2)
Internal\Host.cs (2)
339exceptions.AddRange(task.Exception.InnerExceptions); // Log exception from async method. 366exceptions.AddRange(groupedTasks.Exception.InnerExceptions);
Microsoft.Extensions.Hosting.Testing.Tests (2)
FakeHostBuilderTests.cs (2)
139((AggregateException)exception).InnerExceptions, 171((AggregateException)exception).InnerExceptions,
Microsoft.Extensions.Logging.AzureAppServices (2)
BatchingLoggerProvider.cs (2)
177catch (AggregateException ex) when (ex.InnerExceptions.Count == 1 && ex.InnerExceptions[0] is TaskCanceledException)
Microsoft.Extensions.Telemetry (1)
Logging\ExtendedLogger.cs (1)
204foreach (var ex in aggregateException.InnerExceptions)
Microsoft.ML.AutoML (1)
Experiment\Experiment.cs (1)
209if (e.InnerExceptions.All(exception => exception is OperationCanceledException))
Microsoft.ML.AutoML.Tests (2)
AutoFitTests.cs (2)
564foreach (var ex in ae.Flatten().InnerExceptions) 672foreach (var ex in lastAggregateException.Flatten().InnerExceptions)
Microsoft.NET.Build.Containers.UnitTests (1)
RegistryTests.cs (1)
486exception = (exception.InnerException as AggregateException)?.InnerExceptions.FirstOrDefault();
Microsoft.NET.Build.Extensions.Tasks (2)
TaskBase.cs (2)
65for (int i = 0; i < aggregate.InnerExceptions.Count; i++) 72ExceptionToStringWithoutMessage(aggregate.InnerExceptions[i]),
Microsoft.NET.Build.Tasks (2)
TaskBase.cs (2)
65for (int i = 0; i < aggregate.InnerExceptions.Count; i++) 72ExceptionToStringWithoutMessage(aggregate.InnerExceptions[i]),
Microsoft.TemplateEngine.Cli (2)
Commands\BaseCommand.cs (2)
251while (ax != null && ax.InnerExceptions.Count == 1 && ax.InnerException is not null) 264while (ax != null && ax.InnerExceptions.Count == 1 && ax.InnerException is not null)
Microsoft.VisualStudio.LanguageServices (3)
ErrorReporting\VisualStudioErrorReportingService.ExceptionFormatting.cs (2)
38for (var i = 0; i < aggregate.InnerExceptions.Count; i++) 40text = $"{text}{Environment.NewLine}---> (Inner Exception #{i}) {GetFormattedExceptionStack(aggregate.InnerExceptions[i])} <--- {Environment.NewLine}";
Watson\FaultReporter.cs (1)
122foreach (var innerException in aggregateException.Flatten().InnerExceptions)
Microsoft.WebTools.AspireService.Package (1)
Helpers\ExceptionExtensions.cs (1)
21foreach (var e in aggException.Flatten().InnerExceptions)
Microsoft.WebTools.AspireService.Tests (1)
ExceptionExtensions.cs (1)
21foreach (var e in aggException.Flatten().InnerExceptions)
MSBuild (2)
ExceptionHandling.cs (1)
150if (aggregateException.InnerExceptions.Any(innerException => IsCriticalException(innerException)))
XMake.cs (1)
1603&& !(exception is AggregateException aggregateException && aggregateException.InnerExceptions.All(innerException => innerException is InvalidProjectFileException))
Replay (4)
src\Dependencies\Contracts\ErrorReporting\FailFast.cs (2)
37if (exception is AggregateException aggregate && aggregate.InnerExceptions.Count == 1) 39exception = aggregate.InnerExceptions[0];
src\Dependencies\Contracts\ErrorReporting\FatalError.cs (2)
292if (exception is AggregateException aggregate && aggregate.InnerExceptions.Count == 1 && aggregate.InnerExceptions[0].Data[s_reportedMarker] != null)
Roslyn.Diagnostics.Analyzers (7)
src\Dependencies\Contracts\ErrorReporting\FailFast.cs (2)
37if (exception is AggregateException aggregate && aggregate.InnerExceptions.Count == 1) 39exception = aggregate.InnerExceptions[0];
src\Dependencies\Contracts\ErrorReporting\FatalError.cs (2)
292if (exception is AggregateException aggregate && aggregate.InnerExceptions.Count == 1 && aggregate.InnerExceptions[0].Data[s_reportedMarker] != null)
src\Dependencies\Threading\ParallelExtensions.NetFramework.cs (1)
520_exceptions.AddRange(ae.InnerExceptions);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AsyncLazy`1.cs (2)
582if (task.Exception.InnerExceptions.Count > 0) 583this.TrySetException(task.Exception.InnerExceptions);
rzc (1)
Application.cs (1)
58foreach (var innerException in ex.Flatten().InnerExceptions)
SemanticSearch.BuildTask (4)
src\Dependencies\Contracts\ErrorReporting\FailFast.cs (2)
37if (exception is AggregateException aggregate && aggregate.InnerExceptions.Count == 1) 39exception = aggregate.InnerExceptions[0];
src\Dependencies\Contracts\ErrorReporting\FatalError.cs (2)
292if (exception is AggregateException aggregate && aggregate.InnerExceptions.Count == 1 && aggregate.InnerExceptions[0].Data[s_reportedMarker] != null)
System.Linq.Parallel (3)
System\Linq\Parallel\Scheduling\QueryTaskGroupState.cs (3)
112for (int i = 0; i < flattenedAE.InnerExceptions.Count; i++) 114OperationCanceledException? oce = flattenedAE.InnerExceptions[i] as OperationCanceledException; 130if (!allOCEsOnTrackedExternalCancellationToken || flattenedAE.InnerExceptions.Count == 0)
System.Private.CoreLib (3)
src\libraries\System.Private.CoreLib\src\System\AggregateException.cs (2)
228while (backAsAggregate != null && backAsAggregate.InnerExceptions.Count == 1) 311ReadOnlyCollection<Exception> currentInnerExceptions = exceptionsToFlatten[nDequeueIndex++].InnerExceptions;
src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\Task.cs (1)
4930/// contains an <see cref="OperationCanceledException"/> in its <see cref="AggregateException.InnerExceptions"/> collection.
System.Private.DataContractSerialization (1)
System\Runtime\Serialization\ExceptionUtility.cs (1)
35var innerExceptions = ((AggregateException)exception).InnerExceptions;
System.Runtime.Serialization.Schema (1)
System\Runtime\Serialization\Schema\DiagnosticUtility.cs (1)
37var innerExceptions = ((AggregateException)exception).InnerExceptions;
System.ServiceModel.Federation (1)
System\Runtime\Fx.cs (1)
33ReadOnlyCollection<Exception> innerExceptions = aggException.InnerExceptions;
System.ServiceModel.NetFramingBase (1)
System\ServiceModel\Channels\ConnectionPool.cs (1)
344var toe = ae.InnerExceptions.FirstOrDefault(e => e is TimeoutException);
System.ServiceModel.Primitives (2)
Internals\System\Runtime\ExceptionTrace.cs (1)
195ReadOnlyCollection<Exception> innerExceptions = aggregateException.Flatten().InnerExceptions;
Internals\System\Runtime\Fx.cs (1)
207ReadOnlyCollection<Exception> innerExceptions = ((AggregateException)exception).InnerExceptions;
System.ServiceModel.Primitives.Tests (1)
ServiceModel\ThrowingOnCloseBindingElement.cs (1)
166tcs.TrySetException(task.Exception.InnerExceptions);
System.Threading.RateLimiting (2)
System\Threading\RateLimiting\ChainedRateLimiter.cs (2)
163Exception[] exceptions = new Exception[innerEx.InnerExceptions.Count + 1]; 164innerEx.InnerExceptions.CopyTo(exceptions, 0);
System.Threading.Tasks.Dataflow (4)
Internal\Common.cs (2)
254foreach (Exception innerException in aggregate.InnerExceptions) 325list.AddRange(aggregate.InnerExceptions);
Internal\DataflowEtwProvider.cs (1)
143try { exceptionData = string.Join(Environment.NewLine, completionTask.Exception!.InnerExceptions.Select(static e => e.ToString())); }
Internal\SourceCore.cs (1)
483Debug.Assert(aggregateException != null && aggregateException.InnerExceptions.Count > 0, "Aggregate must be valid and contain inner exceptions to unwrap.");
System.Threading.Tasks.Parallel (5)
System\Threading\Tasks\Parallel.cs (4)
314foreach (Exception exc in ae.InnerExceptions) exceptionQ.Enqueue(exc); 358ThrowSingleCancellationExceptionOrOtherException(aggExp.InnerExceptions, parallelOptions.CancellationToken, aggExp); 1131ThrowSingleCancellationExceptionOrOtherException(aggExp.InnerExceptions, parallelOptions.CancellationToken, aggExp); 2767ThrowSingleCancellationExceptionOrOtherException(aggExp.InnerExceptions, parallelOptions.CancellationToken, aggExp);
System\Threading\Tasks\Parallel.ForEachAsync.cs (1)
633_exceptions.AddRange(ae.InnerExceptions);
Text.Analyzers (7)
src\Dependencies\Contracts\ErrorReporting\FailFast.cs (2)
37if (exception is AggregateException aggregate && aggregate.InnerExceptions.Count == 1) 39exception = aggregate.InnerExceptions[0];
src\Dependencies\Contracts\ErrorReporting\FatalError.cs (2)
292if (exception is AggregateException aggregate && aggregate.InnerExceptions.Count == 1 && aggregate.InnerExceptions[0].Data[s_reportedMarker] != null)
src\Dependencies\Threading\ParallelExtensions.NetFramework.cs (1)
520_exceptions.AddRange(ae.InnerExceptions);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AsyncLazy`1.cs (2)
582if (task.Exception.InnerExceptions.Count > 0) 583this.TrySetException(task.Exception.InnerExceptions);