Skip to content

Commit

Permalink
Modified ResultCode so that it's visible in the ResultDetail
Browse files Browse the repository at this point in the history
  • Loading branch information
Yuck committed Feb 4, 2021
1 parent 54c45c4 commit f13347c
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 6 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.8</Version>
<Version>0.4.9</Version>
<PackageLicenseFile>LICENSE</PackageLicenseFile>
<Description>A .NET library for bootstrapping a domain services project.</Description>
</PropertyGroup>
Expand Down
2 changes: 1 addition & 1 deletion src/YuckQi.Domain.Validation/ResultCode.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public static implicit operator string(ResultCode resultCode)

#region Constants

public static readonly ResultCode InvalidRequestDetail = new ResultCode("invalidRequestDetail");
public static readonly ResultCode InvalidRequestDetail = new ResultCode(nameof(InvalidRequestDetail));

#endregion

Expand Down
13 changes: 11 additions & 2 deletions src/YuckQi.Domain.Validation/ResultDetail.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,30 @@
{
public class ResultDetail
{
#region Private Members

private readonly ResultCode _code;

#endregion


#region Properties

public ResultCode Code { get; }
public ResultMessage Message { get; }
public string Property { get; }
public ResultType Type { get; }

public string Code => _code;

#endregion


#region Constructors

public ResultDetail(ResultCode code, ResultMessage message, string property = null, ResultType type = ResultType.Error)
{
Code = code;
_code = code;

Message = message;
Property = property;
Type = type;
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.8</Version>
<Version>0.4.9</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.8</Version>
<Version>0.4.9</Version>
<PackageLicenseFile>LICENSE</PackageLicenseFile>
<Description>A .NET library for bootstrapping a domain model project.</Description>
</PropertyGroup>
Expand Down

0 comments on commit f13347c

Please sign in to comment.