Skip to content

Commit 8371a63

Browse files
committed
Added NET 6.0
1 parent 2308791 commit 8371a63

5 files changed

Lines changed: 18 additions & 16 deletions

File tree

Src/System.DisposableObject Solution/System.DisposableObject.Example/Program.cs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,21 +4,19 @@ class Program
44
{
55
static void Main(string[] args)
66
{
7-
using (SomeObject obj1 = new SomeObject())
7+
using (SomeObject obj1 = new())
88
{
99
// ***
1010
// *** obj will be disposed and the dispose
1111
// *** methods will be called.
1212
}
1313

14-
#if (NET5_0)
15-
using (SomeAsyncObject obj2 = new SomeAsyncObject())
14+
using (SomeAsyncObject obj2 = new())
1615
{
1716
// ***
1817
// *** obj will be disposed and the dispose
1918
// *** methods will be called.
2019
}
21-
#endif
2220
}
2321
}
2422
}

Src/System.DisposableObject Solution/System.DisposableObject.Example/SomeAsyncObject.cs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
#if (NET5_0)
2-
using System;
1+
using System;
32

43
namespace Sample
54
{
@@ -19,5 +18,4 @@ protected override void OnDisposeUnmanagedObjects()
1918
// ***
2019
}
2120
}
22-
}
23-
#endif
21+
}

Src/System.DisposableObject Solution/System.DisposableObject.Example/System.DisposableObject.Example.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
<PropertyGroup>
44
<OutputType>Exe</OutputType>
5-
<TargetFrameworks>net471;netcoreapp3.1;net5.0</TargetFrameworks>
5+
<TargetFramework>net6.0</TargetFramework>
66
</PropertyGroup>
77

88
<ItemGroup>

Src/System.DisposableObject Solution/System.DisposableObject/AsyncDisposableObject.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
// *** You should have received a copy of the GNU Lesser General Public License
1515
// *** along with this program. If not, see http://www.gnu.org/licenses/.
1616
// ***
17-
#if (NET5_0)
17+
#if (NET5_0 || NET6_0)
1818
using System.Diagnostics;
1919
using System.Threading.Tasks;
2020

Src/System.DisposableObject Solution/System.DisposableObject/System.DisposableObject.csproj

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFrameworks>netstandard2.0;netstandard2.1;net40;net45;net461;netcoreapp3.1;net5.0</TargetFrameworks>
4+
<TargetFrameworks>netstandard2.0;netstandard2.1;net40;net45;net461;netcoreapp3.1;net5.0;net6.0</TargetFrameworks>
55
<Authors>Daniel Porrey</Authors>
66
<Company>Daniel Porrey</Company>
7-
<Copyright>Copyright © Daniel Porrey 2017-2021</Copyright>
7+
<Copyright>Copyright © Daniel Porrey 2017-2022</Copyright>
88
<PackageId>System.DisposableObject</PackageId>
9-
<Version>1.4.1</Version>
9+
<Version>1.5.0</Version>
1010
<Description>Base object for disposing managed and unmanaged objects. Supports async disposing with IAsyncDisposable as well as the standard IDisposable.</Description>
1111
<NeutralLanguage>en</NeutralLanguage>
1212
<PackageLicenseUrl></PackageLicenseUrl>
@@ -15,8 +15,8 @@
1515
<AssemblyName>System.DisposableObject</AssemblyName>
1616
<RootNamespace>System.DisposableObject</RootNamespace>
1717
<PackageLicenseExpression>LGPL-3.0-or-later</PackageLicenseExpression>
18-
<FileVersion>1.4.1</FileVersion>
19-
<AssemblyVersion>1.4.1</AssemblyVersion>
18+
<FileVersion>1.5.0</FileVersion>
19+
<AssemblyVersion>1.5.0</AssemblyVersion>
2020
<PackageProjectUrl>https://github.com/porrey/System.DisposableObject</PackageProjectUrl>
2121
<RepositoryUrl>https://github.com/porrey/System.DisposableObject</RepositoryUrl>
2222
<RepositoryType>git</RepositoryType>
@@ -31,16 +31,22 @@
3131
</PropertyGroup>
3232

3333
<PropertyGroup>
34-
<Optimize>true</Optimize>
34+
<Optimize>False</Optimize>
3535
<DocumentationFile>System.DisposableObject.xml</DocumentationFile>
3636
<PackageTags>async dispose disposable IAsyncDisposable IDisposable</PackageTags>
37+
<PackageReadmeFile>README.md</PackageReadmeFile>
38+
<Nullable>disable</Nullable>
3739
</PropertyGroup>
3840

3941
<ItemGroup>
4042
<None Include="..\..\..\Image\dispose.png">
4143
<Pack>True</Pack>
4244
<PackagePath></PackagePath>
4345
</None>
46+
<None Include="..\..\..\README.md">
47+
<Pack>True</Pack>
48+
<PackagePath>\</PackagePath>
49+
</None>
4450
</ItemGroup>
4551

4652
<ItemGroup>

0 commit comments

Comments
 (0)