Skip to content

Commit

Permalink
Added constructor overload for validation result with one detail item
Browse files Browse the repository at this point in the history
  • Loading branch information
Yuck committed Jan 6, 2021
1 parent 254c2df commit d0a267a
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/YuckQi.Domain.Services/YuckQi.Domain.Services.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<TargetFramework>netstandard2.0</TargetFramework>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<Authors>Kevin J Lambert</Authors>
<Version>0.4.3</Version>
<Version>0.4.4</Version>
<PackageLicenseFile>LICENSE</PackageLicenseFile>
<Description>A .NET library for bootstrapping a domain services project.</Description>
</PropertyGroup>
Expand Down
4 changes: 4 additions & 0 deletions src/YuckQi.Domain.Validation/Result.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@ public class Result<T> : Result

#region Constructors

public Result(ResultDetail detail) : base(new List<ResultDetail> { detail })
{
}

public Result(T payload, IReadOnlyCollection<ResultDetail> detail = null) : base(detail)
{
Payload = payload;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<TargetFramework>netstandard2.0</TargetFramework>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<Authors>Kevin J Lambert</Authors>
<Version>0.4.3</Version>
<Version>0.4.4</Version>
<PackageLicenseFile>LICENSE</PackageLicenseFile>
<Description>A .NET library providing domain validation fundamentals.</Description>
</PropertyGroup>
Expand Down
2 changes: 1 addition & 1 deletion src/YuckQi.Domain/YuckQi.Domain.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<TargetFramework>netstandard2.0</TargetFramework>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<Authors>Kevin J Lambert</Authors>
<Version>0.4.3</Version>
<Version>0.4.4</Version>
<PackageLicenseFile>LICENSE</PackageLicenseFile>
<Description>A .NET library for bootstrapping a domain model project.</Description>
</PropertyGroup>
Expand Down

0 comments on commit d0a267a

Please sign in to comment.