Skip to content

Commit e41c1fd

Browse files
Add net5.0 and net6.0 TFM (#123)
* Update to NET 6.0 * Update #if defs * Update Folder Structure * Move Solution Files * Delete global.json * Update azure-pipelines.yml * Add .NET 6.0 * Fix `cref` * Update Folder Name * Update AndroidManifest.xml * Reduce .NET Core SDK * Update azure-pipelines.yml * Update azure-pipelines.yml * Increase Unit Tests to .NET Core 2.1 * Update azure-pipelines.yml
1 parent 8937922 commit e41c1fd

File tree

108 files changed

+5160
-316
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

108 files changed

+5160
-316
lines changed
File renamed without changes.

.github/dependabot.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,6 @@
66
version: 2
77
updates:
88
- package-ecosystem: "nuget"
9-
directory: "/Src"
9+
directory: "/"
1010
schedule:
1111
interval: "daily"
Lines changed: 146 additions & 146 deletions
Large diffs are not rendered by default.

Src/AsyncAwaitBestPractices.MVVM/AsyncAwaitBestPractices.MVVM.csproj

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<Project Sdk="Microsoft.NET.Sdk">
33
<PropertyGroup>
4-
<TargetFrameworks>netstandard1.0;netstandard2.0;netstandard2.1</TargetFrameworks>
4+
<TargetFrameworks>netstandard1.0;netstandard2.0;netstandard2.1;net5.0;net6.0</TargetFrameworks>
55
<SignAssembly>true</SignAssembly>
66
<AssemblyOriginatorKeyFile>AsyncAwaitBestPracticesMVVM.snk</AssemblyOriginatorKeyFile>
77
<AssemblyName>AsyncAwaitBestPractices.MVVM</AssemblyName>
@@ -30,12 +30,12 @@
3030
- Add NuGet README
3131
- Improve Nullablitiy
3232
</PackageReleaseNotes>
33-
<Version>6.0.4</Version>
33+
<Version>6.0.5</Version>
3434
<PackageReadmeFile>README.md</PackageReadmeFile>
3535
<RepositoryUrl>https://github.com/brminnick/AsyncAwaitBestPractices</RepositoryUrl>
3636
<Product>$(AssemblyName) ($(TargetFramework))</Product>
37-
<AssemblyVersion>6.0.4</AssemblyVersion>
38-
<AssemblyFileVersion>6.0.4</AssemblyFileVersion>
37+
<AssemblyVersion>6.0.5</AssemblyVersion>
38+
<AssemblyFileVersion>6.0.5</AssemblyFileVersion>
3939
<PackageVersion>$(Version)$(VersionSuffix)</PackageVersion>
4040
<Authors>Brandon Minnick, John Thiriet</Authors>
4141
<Owners>Brandon Minnick</Owners>

Src/AsyncAwaitBestPractices.MVVM/AsyncCommand/BaseAsyncCommand.shared.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ protected private BaseAsyncCommand(Func<TExecute?, Task>? execute,
3939
/// <param name="parameter">Data used by the command. If the command does not require data to be passed, this object can be set to null.</param>
4040
private protected Task ExecuteAsync(TExecute? parameter) => _execute(parameter);
4141

42-
bool ICommand.CanExecute(object parameter) => parameter switch
42+
bool ICommand.CanExecute(object? parameter) => parameter switch
4343
{
4444
TCanExecute validParameter => CanExecute(validParameter),
4545
null when IsNullable<TCanExecute>() => CanExecute((TCanExecute?)parameter),

Src/AsyncAwaitBestPractices.MVVM/BaseCommand.shared.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ public abstract class BaseCommand<TCanExecute>
2222
/// <summary>
2323
/// Occurs when changes occur that affect whether or not the command should execute
2424
/// </summary>
25-
public event EventHandler CanExecuteChanged
25+
public event EventHandler? CanExecuteChanged
2626
{
2727
add => _weakEventManager.AddEventHandler(value);
2828
remove => _weakEventManager.RemoveEventHandler(value);

Src/AsyncAwaitBestPractices.UnitTests/AsyncAwaitBestPractices.UnitTests.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<Project Sdk="Microsoft.NET.Sdk">
33
<PropertyGroup>
4-
<TargetFrameworks>net45;netcoreapp2.1;netcoreapp3.1;net5.0;net6.0</TargetFrameworks>
4+
<TargetFrameworks>net45;netcoreapp2.1;netcoreapp3.0;net5.0;net6.0</TargetFrameworks>
55
<IsPackable>false</IsPackable>
66
</PropertyGroup>
77
<ItemGroup>

Src/AsyncAwaitBestPractices/AsyncAwaitBestPractices.csproj

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<Project Sdk="Microsoft.NET.Sdk">
33
<PropertyGroup>
4-
<TargetFrameworks>netstandard1.0;netstandard2.0;netstandard2.1</TargetFrameworks>
4+
<TargetFrameworks>netstandard1.0;netstandard2.0;netstandard2.1;net5.0;net6.0</TargetFrameworks>
55
<SignAssembly>true</SignAssembly>
66
<AssemblyOriginatorKeyFile>AsyncAwaitBestPractices.snk</AssemblyOriginatorKeyFile>
77
<AssemblyName>AsyncAwaitBestPractices</AssemblyName>
@@ -32,12 +32,12 @@
3232
- Add NuGet README
3333
- Improve Nullablitiy
3434
</PackageReleaseNotes>
35-
<Version>6.0.4</Version>
35+
<Version>6.0.5</Version>
3636
<PackageReadmeFile>README.md</PackageReadmeFile>
3737
<RepositoryUrl>https://github.com/brminnick/AsyncAwaitBestPractices</RepositoryUrl>
3838
<Product>$(AssemblyName) ($(TargetFramework))</Product>
39-
<AssemblyVersion>6.0.4</AssemblyVersion>
40-
<AssemblyFileVersion>6.0.4</AssemblyFileVersion>
39+
<AssemblyVersion>6.0.5</AssemblyVersion>
40+
<AssemblyFileVersion>6.0.5</AssemblyFileVersion>
4141
<PackageVersion>$(Version)$(VersionSuffix)</PackageVersion>
4242
<Authors>Brandon Minnick, John Thiriet</Authors>
4343
<Owners>Brandon Minnick</Owners>
@@ -61,9 +61,6 @@
6161
<PropertyGroup Condition=" '$(Configuration)'=='Release' ">
6262
<!-- Manage TargetFrameworks for distribution (Release Mode) -->
6363
</PropertyGroup>
64-
<ItemGroup Condition=" '$(Configuration)'=='Release' ">
65-
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="All" />
66-
</ItemGroup>
6764
<ItemGroup>
6865
<Compile Include="**/*.shared.cs" />
6966
<Compile Include="**/*.shared.*.cs" />
@@ -77,10 +74,11 @@
7774
<PackageReference Include="System.Threading.Tasks.Extensions" Version="4.5.4" />
7875
<PackageReference Include="System.Reflection.Emit.Lightweight" Version="4.7.0" />
7976
</ItemGroup>
80-
<ItemGroup Condition=" $(TargetFramework.StartsWith('netstandard2.1')) ">
81-
</ItemGroup>
8277
<ItemGroup>
8378
<PackageReference Update="NETStandard.Library" PrivateAssets="all" />
8479
<None Include="README.md" Pack="true" PackagePath="\" />
8580
</ItemGroup>
81+
<ItemGroup Condition=" '$(Configuration)'=='Release' ">
82+
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="All" />
83+
</ItemGroup>
8684
</Project>

Src/AsyncAwaitBestPractices/SafeFireAndForgetExtensions.shared.cs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@ public static partial class SafeFireAndForgetExtensions
4848
public static void SafeFireAndForget<TException>(this Task task, in Action<TException>? onException = null, in bool continueOnCapturedContext = false) where TException : Exception => HandleSafeFireAndForget(task, continueOnCapturedContext, onException);
4949

5050

51-
5251
/// <summary>
5352
/// Initialize SafeFireAndForget
5453
///
@@ -80,7 +79,7 @@ static async void HandleSafeFireAndForget<TException>(ValueTask valueTask, bool
8079
{
8180
await valueTask.ConfigureAwait(continueOnCapturedContext);
8281
}
83-
catch (TException ex) when (_onException != null || onException != null)
82+
catch (TException ex) when (_onException is not null || onException is not null)
8483
{
8584
HandleException(ex, onException);
8685

@@ -95,7 +94,7 @@ static async void HandleSafeFireAndForget<TException>(Task task, bool continueOn
9594
{
9695
await task.ConfigureAwait(continueOnCapturedContext);
9796
}
98-
catch (TException ex) when (_onException != null || onException != null)
97+
catch (TException ex) when (_onException is not null || onException is not null)
9998
{
10099
HandleException(ex, onException);
101100

0 commit comments

Comments
 (0)