Skip to content

Commit 1fb93fb

Browse files
committed
Merge branch 'release/3.0.0' into production
2 parents 7d5b7b1 + 8a06f3e commit 1fb93fb

File tree

886 files changed

+166477
-8416
lines changed

Some content is hidden

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

886 files changed

+166477
-8416
lines changed

.appveyor.yml

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ init:
1515

1616
install:
1717
- cmd: dotnet tool install --global dotnet-sonarscanner
18+
- cmd: dotnet tool install --global coverlet.console
1819

1920
before_build:
2021
- dotnet --version
@@ -29,26 +30,32 @@ before_build:
2930
/o:craigfowler-github
3031
/d:sonar.host.url="https://sonarcloud.io"
3132
/d:sonar.login=%SONARCLOUD_SECRET_KEY%
32-
/d:sonar.cs.nunit.reportsPaths=%APPVEYOR_BUILD_FOLDER%\CSF.Validation.Tests\TestResults\TestResults.xml
33-
/d:sonar.cs.opencover.reportsPaths=%APPVEYOR_BUILD_FOLDER%\CSF.Validation.Tests\TestResults\coverage.opencover.xml
33+
/d:sonar.cs.nunit.reportsPaths=%APPVEYOR_BUILD_FOLDER%\**\TestResults.xml
34+
/d:sonar.cs.opencover.reportsPaths=%APPVEYOR_BUILD_FOLDER%\**\coverage.opencover.xml
3435
/d:sonar.branch.name=%BranchName%
3536
/s:%APPVEYOR_BUILD_FOLDER%\.sonarqube-analysisproperties.xml
3637
3738
build_script:
38-
- dotnet build
39+
- dotnet build --no-incremental
3940

4041
test_script:
41-
- >
42+
- cmd: >
43+
coverlet
44+
.\CSF.Validation.Tests\bin\Debug\net6.0\CSF.Validation.Tests.dll
45+
--target "dotnet"
46+
--targetargs "test --no-build --logger:nunit --test-adapter-path:."
47+
-f=opencover
48+
-o="TestResults\coverage.opencover.xml"
49+
- sh: >
4250
dotnet test
43-
/p:CollectCoverage=true
44-
/p:CoverletOutputFormat=\"json,opencover\"
45-
/p:CoverletOutput=\"TestResults/\"
4651
--test-adapter-path:.
47-
--logger:\"nunit\"
52+
--logger:nunit
4853
4954
after_test:
5055
- cmd: >
5156
dotnet-sonarscanner end
5257
/d:"sonar.login=%SONARCLOUD_SECRET_KEY%"
53-
- ps: if ($isWindows) { Tools\appveyor-publish-docs.ps1 }
58+
- ps: if ($isWindows) { Tools\appveyor-upload-test-results.ps1 }
59+
# Temporarily disabled due to #82
60+
# - ps: if ($isWindows) { Tools\appveyor-publish-docs.ps1 }
5461
- cmd: Tools\appveyor-create-packages.cmd

.gitignore

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
bin/
22
obj/
3-
TestResult.xml
4-
TestResult.formatted.xml
3+
TestResults/
54
*.userprefs
65
*.orig
76
.directory
87
packages/
98
.vs/
9+
*.drawio.bkp

.vscode/tasks.json

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"version": "2.0.0",
33
"tasks": [
44
{
5-
"label": "build",
5+
"label": "build (Debug)",
66
"command": "dotnet",
77
"type": "process",
88
"args": [
@@ -16,6 +16,20 @@
1616
"isDefault": true
1717
}
1818
},
19+
{
20+
"label": "build (Release)",
21+
"command": "dotnet",
22+
"type": "process",
23+
"args": [
24+
"build",
25+
"-c",
26+
"Release",
27+
"/property:GenerateFullPaths=true",
28+
"/consoleloggerparameters:NoSummary"
29+
],
30+
"problemMatcher": "$msCompile",
31+
"group": { "kind": "build" }
32+
},
1933
{
2034
"label": "test",
2135
"command": "dotnet",
@@ -31,6 +45,22 @@
3145
"isDefault": true
3246
}
3347
},
48+
{
49+
"label": "test (except integration)",
50+
"command": "dotnet",
51+
"type": "process",
52+
"args": [
53+
"test",
54+
"--filter",
55+
"TestCategory!=Integration",
56+
"/property:GenerateFullPaths=true",
57+
"/consoleloggerparameters:NoSummary"
58+
],
59+
"problemMatcher": "$msCompile",
60+
"group": {
61+
"kind": "test"
62+
}
63+
},
3464
{
3565
"label": "Serve documentation website",
3666
"command": "docfx",

CSF.Validation.Abstractions/CSF.Validation.Abstractions.csproj

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

3+
<Import Project="..\Tools\CommonSolutionProperties.props" />
4+
35
<PropertyGroup>
4-
<TargetFrameworks>netstandard2.0;net461</TargetFrameworks>
6+
<TargetFrameworks>netstandard2.0;net461;netstandard2.1</TargetFrameworks>
57
<RootNamespace>CSF.Validation</RootNamespace>
68
<DocumentationFile>bin\$(Configuration)\$(TargetFramework)\CSF.Validation.Abstractions.xml</DocumentationFile>
7-
<ReleaseVersion>3.0.0</ReleaseVersion>
89
<PackageId>CSF.Validation.Abstractions</PackageId>
9-
<Authors>craigfowler</Authors>
10+
<PackageReadmeFile>README.md</PackageReadmeFile>
1011
<Title>CSF.Validation.Abstractions</Title>
1112
<Description>A framework for business rule validation - abstractions package</Description>
12-
<VersionPrefix>$(ReleaseVersion)</VersionPrefix>
13-
<PackageLicenseExpression>MIT</PackageLicenseExpression>
14-
<PackageReadmeFile>README.md</PackageReadmeFile>
15-
<Copyright>Copyright 2021 - CSF Software Limited</Copyright>
16-
<PackageProjectUrl>https://github.com/csf-dev/CSF.Validation/</PackageProjectUrl>
17-
<RepositoryUrl>$(PackageProjectUrl)</RepositoryUrl>
18-
<SignAssembly>true</SignAssembly>
19-
<AssemblyOriginatorKeyFile>..\CSF-Software-OSS.snk</AssemblyOriginatorKeyFile>
20-
<ProduceReferenceAssembly>True</ProduceReferenceAssembly>
2113
</PropertyGroup>
2214

2315
<ItemGroup>
24-
<PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" Version="1.0.0" PrivateAssets="all" Condition="'$(TargetFramework)' == 'net461'" />
16+
<PackageReference Include="System.Threading.Tasks.Extensions" Version="4.5.2"
17+
Condition="'$(TargetFramework)' == 'net461' or '$(TargetFramework)' == 'netstandard2.0'" />
2518
</ItemGroup>
26-
19+
2720
<ItemGroup>
2821
<None Include="README.md" Pack="true" PackagePath="\"/>
2922
</ItemGroup>

CSF.Validation.Abstractions/IQueryableValidationResult.cs

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
using System;
12
using System.Collections.Generic;
23
using CSF.Validation.Manifest;
34

@@ -17,7 +18,24 @@ public interface IQueryableValidationResult : IEnumerable<ValidationRuleResult>
1718
/// Gets a reference to the manifest value which forms the logical
1819
/// root of the results in the current instance.
1920
/// </summary>
20-
IManifestItem ManifestValue { get; }
21+
ManifestItem ManifestValue { get; }
22+
23+
/// <summary>
24+
/// Gets a value indicating how long the validation process took.
25+
/// </summary>
26+
/// <remarks>
27+
/// <para>
28+
/// This value will only be populated if <see cref="ValidationOptions.InstrumentRuleExecution"/> is set to <see langword="true" />.
29+
/// Otherwise it will be <see langword="null" />.
30+
/// </para>
31+
/// <para>
32+
/// When <see cref="ValidationOptions.EnableRuleParallelization"/> is <see langword="true" /> the sum of the times reported within each
33+
/// <see cref="ValidationRuleResult.InstrumentationData"/> will likely not total the amount reported by this property. That is because
34+
/// many of the reported times for each of the rules will have run concurrently with other rules.
35+
/// On the other hand, this time does correspond to real "wall clock" time to perform validation.
36+
/// </para>
37+
/// </remarks>
38+
TimeSpan? ValidationTime { get; }
2139

2240
/// <summary>
2341
/// Gets a collection of the results of individual validation rules, making up

CSF.Validation.Abstractions/Manifest/IHasPolymorphicTypes.cs

Lines changed: 0 additions & 26 deletions
This file was deleted.

CSF.Validation.Abstractions/Manifest/IManifestItem.cs

Lines changed: 0 additions & 81 deletions
This file was deleted.
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
using System;
2+
3+
namespace CSF.Validation.Manifest
4+
{
5+
/// <summary>
6+
/// A node in the validation manifest. Typically either a <see cref="ValidationManifest"/>
7+
/// itself or a <see cref="ManifestItem"/>.
8+
/// </summary>
9+
public interface IManifestNode
10+
{
11+
/// <summary>
12+
/// Gets the type of the object which the current manifest node describes.
13+
/// </summary>
14+
Type ValidatedType { get; }
15+
}
16+
}

CSF.Validation.Abstractions/Manifest/IManifestValue.cs

Lines changed: 0 additions & 60 deletions
This file was deleted.

0 commit comments

Comments
 (0)