Neomaster.Extensions.Exception
1.0.2
dotnet add package Neomaster.Extensions.Exception --version 1.0.2
NuGet\Install-Package Neomaster.Extensions.Exception -Version 1.0.2
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Neomaster.Extensions.Exception" Version="1.0.2" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Neomaster.Extensions.Exception" Version="1.0.2" />
<PackageReference Include="Neomaster.Extensions.Exception" />
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Neomaster.Extensions.Exception --version 1.0.2
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Neomaster.Extensions.Exception, 1.0.2"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Neomaster.Extensions.Exception@1.0.2
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Neomaster.Extensions.Exception&version=1.0.2
#tool nuget:?package=Neomaster.Extensions.Exception&version=1.0.2
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Neomaster.Extensions.Exception
Retrieves all internal exceptions of the exception tree,
including AggregateException
nodes.
Tests
GetAllInnerExceptions() Tests
Conventions
e
-Exception
instanceae
-AggregateException
instance[e,ae]
- liste1[e2,e3]
- root with children
Examples
Don't include AggregateException
(default)
[Fact(DisplayName = "ae1[e1,ae2[e2]] -> [e1,e2]")]
public void ShouldReturnOnlyNonAggregateExceptions_3()
{
var e1 = new Exception("1");
var e2 = new Exception("2");
var expected = new Exception[]
{
e1,
e2,
};
var tree =
new AggregateException(
e1,
new AggregateException(
e2));
var actual = tree.GetAllInnerExceptions();
Assert.Equal(expected.Length, actual.Count);
Assert.Equal(expected, actual);
Assert.Equal(expected.Select(e => e.Message), actual.Select(e => e.Message));
}
Include AggregateException
[Fact(DisplayName = "ae1[ae2[ae3]] -> [ae1,ae2,ae3]")]
public void ShouldReturnAllExceptions_3()
{
var ae3 = new AggregateException();
var ae2 = new AggregateException(ae3);
var ae1 = new AggregateException(ae2);
var expected = new Exception[]
{
ae1,
ae2,
ae3,
};
var actual = ae1.GetAllInnerExceptions(addAggregate: true);
Assert.Equal(expected.Length, actual.Count);
Assert.Equal(expected, actual);
Assert.Equal(expected.Select(e => e.Message), actual.Select(e => e.Message));
}
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
.NET Core | netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.1 is compatible. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
.NETStandard 2.1
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last Updated |
---|---|---|
1.0.2 | 323 | 3/19/2023 |