Skip to content

Commit

Permalink
#371 Upgrade test and example projects to .NET 5.0.
Browse files Browse the repository at this point in the history
  • Loading branch information
adamjstone committed Nov 14, 2020
1 parent d882859 commit 22f969e
Show file tree
Hide file tree
Showing 88 changed files with 275 additions and 156 deletions.
4 changes: 2 additions & 2 deletions cicd/modules/BuildAndDeployment.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,8 @@ $RepositoryName = $env:APPVEYOR_REPO_NAME;
$TagName = $env:APPVEYOR_REPO_TAG_NAME;

# Other configuration values
$TargetFrameworkForExampleHttpApiApplications = "netcoreapp3.1";
$TargetFrameworkForExampleServiceApplications = "netcoreapp3.1";
$TargetFrameworkForExampleHttpApiApplications = "net5.0";
$TargetFrameworkForExampleServiceApplications = "net5.0";

# Modules
Import-Module $FilePathForCoreModule -Force;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,17 @@ Copyright (c) RapidField LLC. Licensed under the MIT License. See LICENSE.txt in
<Description>This project demonstrates a beacon service application utilizing Solid Instruments constructs.</Description>
<Version>$(BuildVersion)</Version>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp3.1</TargetFramework>
<TargetFramework>net5.0</TargetFramework>
<LangVersion>latest</LangVersion>
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<DocumentationFile>bin\Debug\netcoreapp3.1\RapidField.SolidInstruments.Example.BeaconService.xml</DocumentationFile>
<DocumentationFile>bin\Debug\net5.0\RapidField.SolidInstruments.Example.BeaconService.xml</DocumentationFile>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<WarningsAsErrors />
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
<DocumentationFile>bin\Release\netcoreapp3.1\RapidField.SolidInstruments.Example.BeaconService.xml</DocumentationFile>
<DocumentationFile>bin\Release\net5.0\RapidField.SolidInstruments.Example.BeaconService.xml</DocumentationFile>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<WarningsAsErrors />
</PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@ Copyright (c) RapidField LLC. Licensed under the MIT License. See LICENSE.txt in
<Product>Solid Instruments</Product>
<Description>This project demonstrates an AccessControl domain HTTP API application utilizing Solid Instruments constructs.</Description>
<Version>$(BuildVersion)</Version>
<TargetFramework>netcoreapp3.1</TargetFramework>
<TargetFramework>net5.0</TargetFramework>
<LangVersion>latest</LangVersion>
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,17 @@ Copyright (c) RapidField LLC. Licensed under the MIT License. See LICENSE.txt in
<Description>This project demonstrates an AccessControl domain service application utilizing Solid Instruments constructs.</Description>
<Version>$(BuildVersion)</Version>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp3.1</TargetFramework>
<TargetFramework>net5.0</TargetFramework>
<LangVersion>latest</LangVersion>
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<DocumentationFile>bin\Debug\netcoreapp3.1\RapidField.SolidInstruments.Example.Domain.AccessControl.Service.xml</DocumentationFile>
<DocumentationFile>bin\Debug\net5.0\RapidField.SolidInstruments.Example.Domain.AccessControl.Service.xml</DocumentationFile>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<WarningsAsErrors />
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
<DocumentationFile>bin\Release\netcoreapp3.1\RapidField.SolidInstruments.Example.Domain.AccessControl.Service.xml</DocumentationFile>
<DocumentationFile>bin\Release\net5.0\RapidField.SolidInstruments.Example.Domain.AccessControl.Service.xml</DocumentationFile>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<WarningsAsErrors />
</PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ Copyright (c) RapidField LLC. Licensed under the MIT License. See LICENSE.txt in
<Version>$(BuildVersion)</Version>
<TargetFramework>netstandard2.1</TargetFramework>
<LangVersion>latest</LangVersion>
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
<EnableNETAnalyzers>true</EnableNETAnalyzers>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<DocumentationFile>bin\Debug\netstandard2.1\RapidField.SolidInstruments.Example.Domain.AccessControl.xml</DocumentationFile>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,17 @@ Copyright (c) RapidField LLC. Licensed under the MIT License. See LICENSE.txt in
<Description>This project demonstrates an Identity domain service application utilizing Solid Instruments constructs.</Description>
<Version>$(BuildVersion)</Version>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp3.1</TargetFramework>
<TargetFramework>net5.0</TargetFramework>
<LangVersion>latest</LangVersion>
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<DocumentationFile>bin\Debug\netcoreapp3.1\RapidField.SolidInstruments.Example.Domain.Identity.Service.xml</DocumentationFile>
<DocumentationFile>bin\Debug\net5.0\RapidField.SolidInstruments.Example.Domain.Identity.Service.xml</DocumentationFile>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<WarningsAsErrors />
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
<DocumentationFile>bin\Release\netcoreapp3.1\RapidField.SolidInstruments.Example.Domain.Identity.Service.xml</DocumentationFile>
<DocumentationFile>bin\Release\net5.0\RapidField.SolidInstruments.Example.Domain.Identity.Service.xml</DocumentationFile>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<WarningsAsErrors />
</PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -301,6 +301,8 @@ private static void OnConfiguringSqlServer(IConfiguration applicationConfigurati
[DebuggerHidden]
private void OnConfiguringSqlServer(SqlServerDbContextOptionsBuilder optionsBuilder) => OnConfiguringSqlServer(ApplicationConfiguration, optionsBuilder);

#pragma warning disable CA1822

/// <summary>
/// Configures the model that is discovered by convention from entity types exposed via <see cref="DbSet{TEntity}" />
/// properties on the derived context.
Expand All @@ -317,6 +319,8 @@ private void OnModelCreating(IConfiguration applicationConfiguration, ModelBuild
return;
}

#pragma warning restore CA1822

/// <summary>
/// Configures the specified options builder for a Cosmos DB database connection.
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ Copyright (c) RapidField LLC. Licensed under the MIT License. See LICENSE.txt in
<Version>$(BuildVersion)</Version>
<TargetFramework>netstandard2.1</TargetFramework>
<LangVersion>latest</LangVersion>
<EnableNETAnalyzers>true</EnableNETAnalyzers>
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<DocumentationFile>bin\Debug\netstandard2.1\RapidField.SolidInstruments.Example.Domain.Identity.xml</DocumentationFile>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,14 @@ Copyright (c) RapidField LLC. Licensed under the MIT License. See LICENSE.txt in
<Version>$(BuildVersion)</Version>
<TargetFramework>netstandard2.1</TargetFramework>
<LangVersion>latest</LangVersion>
<EnableNETAnalyzers>true</EnableNETAnalyzers>
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<DocumentationFile>bin\Debug\netstandard2.1\RapidField.SolidInstruments.Example.Domain.xml</DocumentationFile>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<WarningsAsErrors />
<Optimize>false</Optimize>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
<DocumentationFile>bin\Release\netstandard2.1\RapidField.SolidInstruments.Example.Domain.xml</DocumentationFile>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"profiles": {
"RapidField.SolidInstruments.Collections": {
"commandName": "Project",
"nativeDebugging": false
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ Copyright (c) RapidField LLC. Licensed under the MIT License. See LICENSE.txt in
<PackageProjectUrl>https://www.solidinstruments.com</PackageProjectUrl>
<PackageIcon>Icon.Collections.128w.png</PackageIcon>
<PackageTags>solid-instruments;collections;circular-buffer;infinite-sequence;pinned-memory;tree</PackageTags>
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
<EnableNETAnalyzers>true</EnableNETAnalyzers>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<DocumentationFile>bin\Debug\netstandard2.1\RapidField.SolidInstruments.Collections.xml</DocumentationFile>
Expand Down
2 changes: 1 addition & 1 deletion src/RapidField.SolidInstruments.Collections/TreeNode.cs
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ protected Boolean AddChild(TreeNode<T> childNode, Boolean enforceDuplicateProhib
{
lock (SyncRoot)
{
if (Capacity > UnlimitedCapacityValue && ChildrenReference.Count() >= Capacity)
if (Capacity > UnlimitedCapacityValue && ChildrenReference.Count >= Capacity)
{
return false;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ Copyright (c) RapidField LLC. Licensed under the MIT License. See LICENSE.txt in
<PackageProjectUrl>https://www.solidinstruments.com</PackageProjectUrl>
<PackageIcon>Icon.Command.128w.png</PackageIcon>
<PackageTags>solid-instruments;command;mediator;inversion-of-control;ioc;dependency-injection;di;autofac</PackageTags>
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
<EnableNETAnalyzers>true</EnableNETAnalyzers>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<DocumentationFile>bin\Debug\netstandard2.1\RapidField.SolidInstruments.Command.Autofac.xml</DocumentationFile>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ Copyright (c) RapidField LLC. Licensed under the MIT License. See LICENSE.txt in
<PackageProjectUrl>https://www.solidinstruments.com</PackageProjectUrl>
<PackageIcon>Icon.Command.128w.png</PackageIcon>
<PackageTags>solid-instruments;command;mediator;inversion-of-control;ioc;dependency-injection;di</PackageTags>
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
<EnableNETAnalyzers>true</EnableNETAnalyzers>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<DocumentationFile>bin\Debug\netstandard2.1\RapidField.SolidInstruments.Command.Autofac.xml</DocumentationFile>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ Copyright (c) RapidField LLC. Licensed under the MIT License. See LICENSE.txt in
<PackageProjectUrl>https://www.solidinstruments.com</PackageProjectUrl>
<PackageIcon>Icon.Command.128w.png</PackageIcon>
<PackageTags>solid-instruments;command;mediator</PackageTags>
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
<EnableNETAnalyzers>true</EnableNETAnalyzers>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<DocumentationFile>bin\Debug\netstandard2.1\RapidField.SolidInstruments.Command.xml</DocumentationFile>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,6 @@ public static Boolean IsEquivalentTo<T>(this IEnumerable<T> target, IEnumerable<
/// <see langword="true" /> if the current <see cref="IEnumerable{T}" /> is <see langword="null" /> or empty, otherwise
/// <see langword="false" />.
/// </returns>
public static Boolean IsNullOrEmpty<T>(this IEnumerable<T> target) => target is null || target.Count() == 0;
public static Boolean IsNullOrEmpty<T>(this IEnumerable<T> target) => target is null || target.Any() == false;
}
}
2 changes: 1 addition & 1 deletion src/RapidField.SolidInstruments.Core/Model.cs
Original file line number Diff line number Diff line change
Expand Up @@ -430,7 +430,7 @@ private static void HydrateModel(IModel sourceModel, IModel targetModel, MappedM
{
var targetCollection = targetPropertyValue as ICollection ?? targetPropertyValueType.GetConstructor(Array.Empty<Type>())?.Invoke(Array.Empty<Object>()) as ICollection;

if (!(sourcePropertyValue is ICollection sourceCollection) || sourceCollection.Count == 0 || targetCollection is null)
if (sourcePropertyValue is not ICollection sourceCollection || sourceCollection.Count == 0 || targetCollection is null)
{
continue;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ Copyright (c) RapidField LLC. Licensed under the MIT License. See LICENSE.txt in
<PackageProjectUrl>https://www.solidinstruments.com</PackageProjectUrl>
<PackageIcon>Icon.Core.128w.png</PackageIcon>
<PackageTags>solid-instruments;core;concurrency;thread-safety;fluent-validation;fluent-guard;object-lifetime</PackageTags>
<EnableNETAnalyzers>true</EnableNETAnalyzers>
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<DocumentationFile>bin\Debug\netstandard2.1\RapidField.SolidInstruments.Core.xml</DocumentationFile>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
using System;
using System.Collections.Concurrent;
using System.Diagnostics;
using System.Linq;
using System.Security.Cryptography;
using System.Threading;

Expand Down Expand Up @@ -164,7 +163,7 @@ private void PermuteBuffer()
/// Gets the current length, in bytes, of the random byte buffer.
/// </summary>
[DebuggerHidden]
public Int32 BufferLengthInBytes => Buffer.Count();
public Int32 BufferLengthInBytes => Buffer.Count;

/// <summary>
/// Gets a symmetric-key cipher that is used to harden platform-generated bytes.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ private void PermuteRow(IEnumerable<HashTreeNode> row)
/// <summary>
/// Gets the number of leaf nodes in the current <see cref="HashTree{TBlock}" />.
/// </summary>
public Int32 LeafCount => LeafNodes.Count();
public Int32 LeafCount => LeafNodes.Count;

/// <summary>
/// Gets the root node for the current <see cref="HashTree{TBlock}" />.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ Copyright (c) RapidField LLC. Licensed under the MIT License. See LICENSE.txt in
<PackageProjectUrl>https://www.solidinstruments.com</PackageProjectUrl>
<PackageIcon>Icon.Cryptography.128w.png</PackageIcon>
<PackageTags>solid-instruments;cryptography;bounded-random-value;cascading-encryption;hash-tree;in-memory-security;random-selection;random-shuffle;csprng;rng</PackageTags>
<EnableNETAnalyzers>true</EnableNETAnalyzers>
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<DocumentationFile>bin\Debug\netstandard2.1\RapidField.SolidInstruments.Cryptography.xml</DocumentationFile>
Expand Down
Loading

0 comments on commit 22f969e

Please sign in to comment.