Skip to content

Commit

Permalink
Make live easier by moving forward to netstandard 2.0 (only). (#59)
Browse files Browse the repository at this point in the history
* Make live easier by moving forward to netstandard 2.0 (only).

* Clean-up of ThreadExtensions.

* Merge Qowaiv.Web with Qowaiv. (And drop modelbinder of MVC).

* Small bug-fix.

* Simplify: default(StreamingContext) => default

* Extra default(T) simplifications.
  • Loading branch information
Corniel Nobel committed Jul 9, 2019
2 parents cae74ff + d676141 commit 40a9e04
Show file tree
Hide file tree
Showing 85 changed files with 4,382 additions and 5,438 deletions.
25 changes: 2 additions & 23 deletions Qowaiv.sln
@@ -1,7 +1,7 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.27004.2009
# Visual Studio Version 16
VisualStudioVersion = 16.0.29020.237
MinimumVisualStudioVersion = 15.0
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Qowaiv", "src\Qowaiv\Qowaiv.csproj", "{ACF6F726-8CBE-4F7C-89EF-9002A6441D19}"
EndProject
Expand All @@ -25,7 +25,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Props", "Props", "{696E5B2C
props\analytics.props = props\analytics.props
props\common.props = props\common.props
props\test.props = props\test.props
props\version.props = props\version.props
EndProjectSection
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Qowaiv.UnitTests", "test\Qowaiv.UnitTests\Qowaiv.UnitTests.csproj", "{21E4DDC5-08FE-42EA-9B82-7C54C176161F}"
Expand All @@ -40,14 +39,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Qowaiv.ComponentModel", "sr
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Qowaiv.ComponentModel.UnitTests", "test\Qowaiv.ComponentModel.UnitTests\Qowaiv.ComponentModel.UnitTests.csproj", "{8C026B5F-87B3-49F9-9D21-75774972A53A}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Qowaiv.Web", "src\Qowaiv.Web\Qowaiv.Web.csproj", "{0A58FB98-8D08-4717-8755-3E0440F92A68}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Qowaiv.Json.Newtonsoft", "src\Qowaiv.Json.Newtonsoft\Qowaiv.Json.Newtonsoft.csproj", "{BCFDC29E-57F5-4D3C-85E2-D37217EE62A6}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Qowaiv.TypeScript", "src\Qowaiv.TypeScript\Qowaiv.TypeScript.csproj", "{DC61BD14-58AF-4E3F-8CE2-ED0D09E5D116}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Qowaiv.TypeScript.UnitTests", "test\Qowaiv.TypeScript.UnitTests\Qowaiv.TypeScript.UnitTests.csproj", "{39C679AC-9B31-4A6F-8136-2B7797126B47}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Qowaiv.Json.Newtonsoft.UnitTests", "test\Qowaiv.Json.Newtonsoft.UnitTests\Qowaiv.Json.Newtonsoft.UnitTests.csproj", "{864B79CC-0B90-475D-8EDC-C69830F8D773}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Qowaiv.CodeGenerator", "tooling\Qowaiv.CodeGenerator\Qowaiv.CodeGenerator.csproj", "{E76B08DA-74EE-415C-B554-BA395499AB1A}"
Expand Down Expand Up @@ -86,22 +79,10 @@ Global
{8C026B5F-87B3-49F9-9D21-75774972A53A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{8C026B5F-87B3-49F9-9D21-75774972A53A}.Release|Any CPU.ActiveCfg = Release|Any CPU
{8C026B5F-87B3-49F9-9D21-75774972A53A}.Release|Any CPU.Build.0 = Release|Any CPU
{0A58FB98-8D08-4717-8755-3E0440F92A68}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{0A58FB98-8D08-4717-8755-3E0440F92A68}.Debug|Any CPU.Build.0 = Debug|Any CPU
{0A58FB98-8D08-4717-8755-3E0440F92A68}.Release|Any CPU.ActiveCfg = Release|Any CPU
{0A58FB98-8D08-4717-8755-3E0440F92A68}.Release|Any CPU.Build.0 = Release|Any CPU
{BCFDC29E-57F5-4D3C-85E2-D37217EE62A6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{BCFDC29E-57F5-4D3C-85E2-D37217EE62A6}.Debug|Any CPU.Build.0 = Debug|Any CPU
{BCFDC29E-57F5-4D3C-85E2-D37217EE62A6}.Release|Any CPU.ActiveCfg = Release|Any CPU
{BCFDC29E-57F5-4D3C-85E2-D37217EE62A6}.Release|Any CPU.Build.0 = Release|Any CPU
{DC61BD14-58AF-4E3F-8CE2-ED0D09E5D116}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{DC61BD14-58AF-4E3F-8CE2-ED0D09E5D116}.Debug|Any CPU.Build.0 = Debug|Any CPU
{DC61BD14-58AF-4E3F-8CE2-ED0D09E5D116}.Release|Any CPU.ActiveCfg = Release|Any CPU
{DC61BD14-58AF-4E3F-8CE2-ED0D09E5D116}.Release|Any CPU.Build.0 = Release|Any CPU
{39C679AC-9B31-4A6F-8136-2B7797126B47}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{39C679AC-9B31-4A6F-8136-2B7797126B47}.Debug|Any CPU.Build.0 = Debug|Any CPU
{39C679AC-9B31-4A6F-8136-2B7797126B47}.Release|Any CPU.ActiveCfg = Release|Any CPU
{39C679AC-9B31-4A6F-8136-2B7797126B47}.Release|Any CPU.Build.0 = Release|Any CPU
{864B79CC-0B90-475D-8EDC-C69830F8D773}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{864B79CC-0B90-475D-8EDC-C69830F8D773}.Debug|Any CPU.Build.0 = Debug|Any CPU
{864B79CC-0B90-475D-8EDC-C69830F8D773}.Release|Any CPU.ActiveCfg = Release|Any CPU
Expand All @@ -118,9 +99,7 @@ Global
{696E5B2C-1F1D-4ACD-BBD4-40594FC7BF11} = {A4C3C9FF-4EED-41FE-8849-C896429254B5}
{21E4DDC5-08FE-42EA-9B82-7C54C176161F} = {40C1E942-8DB1-4E58-8FB4-71F5EDA66029}
{48FB953F-7321-4D10-BED7-3A2FE3C5EF5B} = {40C1E942-8DB1-4E58-8FB4-71F5EDA66029}
{50F34D90-4AD2-4E6F-8A75-EA3656B31480} = {CCCCEB32-7082-431D-A7DC-3C6E213DA8D4}
{8C026B5F-87B3-49F9-9D21-75774972A53A} = {40C1E942-8DB1-4E58-8FB4-71F5EDA66029}
{39C679AC-9B31-4A6F-8136-2B7797126B47} = {40C1E942-8DB1-4E58-8FB4-71F5EDA66029}
{864B79CC-0B90-475D-8EDC-C69830F8D773} = {40C1E942-8DB1-4E58-8FB4-71F5EDA66029}
{E76B08DA-74EE-415C-B554-BA395499AB1A} = {CCCCEB32-7082-431D-A7DC-3C6E213DA8D4}
EndGlobalSection
Expand Down
7 changes: 6 additions & 1 deletion README.md
Expand Up @@ -210,7 +210,6 @@ formatting of the object is used, where FormattingArgumentsCollection.Format()
uses the default specified at the formatting collection of a type (if available).

### Threading
=========
Because there are scenario's where you want to set typical values as a country
or a currency for the context of the current thread (like the culture info)
there is a possibility to add these to the Qowaiv.Threading.ThreadDomain.
Expand All @@ -219,6 +218,12 @@ These values can be configured (in the application settings) or can be created w
a creator function that can be registered. If not specified otherwise the current
country will be created (if possible) based on the current culture.

## MVC ModelBinding
When using Qowaiv with MVC (not ASP.NET core) you need a specific model binder.
This binder is needed because the default model binder don't call a type
converter in case the input is string.Empty.
The example can be found [here](src/Qowaiv.Web/Mvc/typeConverterModelBinder.cs).

## Qowaiv clock
The `Clock` class is an outsider within the Qowaiv library. It is a solution
for a problem that is not related to Domain-Driven Design, but to the fact that
Expand Down
1 change: 0 additions & 1 deletion props/common.props
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<Project>

<Import Project="version.props" />
<Import Project="analytics.props" />

<PropertyGroup>
Expand Down
7 changes: 0 additions & 7 deletions props/version.props

This file was deleted.

Expand Up @@ -31,7 +31,7 @@ public override bool IsValid(object value)
return true;
}

var collection = Guard.IsTypeOf<IEnumerable>(value, nameof(value)).Cast<object>();
var collection = Guard.IsInstanceOf<IEnumerable>(value, nameof(value)).Cast<object>();
var checker = new HashSet<object>(EqualityComparer);

return collection.All(checker.Add);
Expand Down
20 changes: 4 additions & 16 deletions src/Qowaiv.ComponentModel/Qowaiv.ComponentModel.csproj
Expand Up @@ -3,25 +3,13 @@
<Import Project="..\..\props\common.props" />

<PropertyGroup>
<TargetFrameworks>netstandard2.0;net45</TargetFrameworks>
<TargetFramework>netstandard2.0</TargetFramework>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<Version>4.0.0</Version>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
<DocumentationFile>bin\Release\netstandard2.0\Qowaiv.ComponentModel.xml</DocumentationFile>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<DocumentationFile>bin\Debug\netstandard2.0\Qowaiv.ComponentModel.xml</DocumentationFile>
</PropertyGroup>

<ItemGroup Condition="'$(TargetFramework)'=='net45'">
<Reference Include="System.ComponentModel.DataAnnotations" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)'=='netstandard2.0'">
<PackageReference Include="System.ComponentModel.Annotations" Version="4.5.0" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="System.ComponentModel.Annotations" Version="4.5.0" />
<PackageReference Include="Microsoft.CSharp" Version="4.5.0" />
</ItemGroup>

Expand Down
56 changes: 0 additions & 56 deletions src/Qowaiv.ComponentModel/Rules/Globalization/PostalCodeRule.cs

This file was deleted.

26 changes: 0 additions & 26 deletions src/Qowaiv.ComponentModel/Rules/IValidationRule.cs

This file was deleted.

29 changes: 0 additions & 29 deletions src/Qowaiv.ComponentModel/Rules/ValidationExpression.cs

This file was deleted.

136 changes: 0 additions & 136 deletions src/Qowaiv.ComponentModel/Rules/ValidationRule.cs

This file was deleted.

0 comments on commit 40a9e04

Please sign in to comment.