File tree Expand file tree Collapse file tree 5 files changed +20
-7
lines changed
Shuttle.Core.Reflection.Tests Expand file tree Collapse file tree 5 files changed +20
-7
lines changed Original file line number Diff line number Diff line change 55 </PropertyGroup >
66
77 <ItemGroup >
8- <PackageReference Include =" Microsoft.NET.Test.Sdk" Version =" 17.4 .0" />
9- <PackageReference Include =" NUnit" Version =" 3.13.3 " />
10- <PackageReference Include =" NUnit3TestAdapter" Version =" 4.3.1 " />
8+ <PackageReference Include =" Microsoft.NET.Test.Sdk" Version =" 17.8 .0" />
9+ <PackageReference Include =" NUnit" Version =" 3.14.0 " />
10+ <PackageReference Include =" NUnit3TestAdapter" Version =" 4.5.0 " />
1111 </ItemGroup >
1212
1313 <ItemGroup >
Original file line number Diff line number Diff line change 1313 <repository type =" git" url =" https://github.com/shuttle/Shuttle.Core.Reflection.git" />
1414 <projectUrl >https://github.com/shuttle/Shuttle.Core.Reflection</projectUrl >
1515 <description >Reflection infrastructure components.</description >
16- <copyright >Copyright (c) 2023 , Eben Roux</copyright >
16+ <copyright >Copyright (c) 2024 , Eben Roux</copyright >
1717 <tags >shuttle reflection</tags >
1818 <dependencies >
1919 <dependency id =" Microsoft.Extensions.DependencyModel" version =" 7.0.0" />
20- <dependency id =" Shuttle.Core.Contract" version =" 11.0 .0" />
20+ <dependency id =" Shuttle.Core.Contract" version =" 11.1 .0" />
2121 </dependencies >
2222 </metadata >
2323 <files >
Original file line number Diff line number Diff line change 11using System ;
2+ using System . Threading . Tasks ;
23
34namespace Shuttle . Core . Reflection
45{
@@ -11,5 +12,17 @@ public static void TryDispose(this object o)
1112 disposable . Dispose ( ) ;
1213 }
1314 }
15+
16+ public static async Task TryDisposeAsync ( this object o )
17+ {
18+ if ( o is IAsyncDisposable disposable )
19+ {
20+ await disposable . DisposeAsync ( ) . ConfigureAwait ( false ) ;
21+ }
22+ else
23+ {
24+ o . TryDispose ( ) ;
25+ }
26+ }
1427 }
1528}
Original file line number Diff line number Diff line change 1414#endif
1515
1616[ assembly: AssemblyVersion ( "13.0.0.0" ) ]
17- [ assembly: AssemblyCopyright ( "Copyright (c) 2023 , Eben Roux" ) ]
17+ [ assembly: AssemblyCopyright ( "Copyright (c) 2024 , Eben Roux" ) ]
1818[ assembly: AssemblyProduct ( "Shuttle.Core.Reflection" ) ]
1919[ assembly: AssemblyCompany ( "Eben Roux" ) ]
2020[ assembly: AssemblyConfiguration ( "Release" ) ]
Original file line number Diff line number Diff line change 1717
1818 <ItemGroup >
1919 <PackageReference Include =" Microsoft.Extensions.DependencyModel" Version =" 7.0.0" />
20- <PackageReference Include =" Shuttle.Core.Contract" Version =" 11.0 .0" />
20+ <PackageReference Include =" Shuttle.Core.Contract" Version =" 11.1 .0" />
2121 </ItemGroup >
2222
2323 <ItemGroup >
You can’t perform that action at this time.
0 commit comments