Skip to content

Commit 86d5605

Browse files
authored
Merge pull request #29 from I-RzR-I/feature/AddFailureBooleanValue
Add failure boolean value
2 parents 7f270f9 + 0039a57 commit 86d5605

17 files changed

Lines changed: 548 additions & 63 deletions

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2022-2024 RzR
3+
Copyright (c) 2022-2026 RzR
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

build/generateCustomVersion.bat

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
@echo off
2+
cls
3+
4+
echo Write the source branch name (you current branch name, where were the changes made):
5+
set /p userDefinedSourceBranch=
6+
echo.
7+
echo Write the destination branch name (the branch from which you can get the latest changes, like 'develop' or 'main/master'):
8+
set /p userDefinedDestinationBranch=
9+
echo.
10+
echo Write your custom version number:
11+
set /p userDefinedVersion=
12+
echo.
13+
14+
:: Set init params value
15+
set applicationName=AggregatedGenericResultMessage
16+
set runVersionIncrement=y
17+
set runGenChangeLog=y
18+
:: If runBuild > y(yes), build in release mode
19+
set runBuild=y
20+
set runSolutionTest=n
21+
set runTest=y
22+
set runPack=y
23+
set assemblyPath=$('..\src\shared\GeneralAssemblyInfo.cs')
24+
set genType=-2
25+
set setInChangeLogNewVersion=y
26+
set autoCommitAndPush=n
27+
set autoGetLatestDevelop=y
28+
set changeLogPath=$('..\docs\CHANGELOG.MD')
29+
set sourceBranch=%userDefinedSourceBranch%
30+
set destinationBranch=%userDefinedDestinationBranch%
31+
set customVersion=%userDefinedVersion%
32+
set solutionPath=$('..\src\RzR.Shared.ResultMessage.sln')
33+
set packResultPath=$('..\nuget\')
34+
set packProjectsPath=$('..\src\AggregatedGenericResultMessage\AggregatedGenericResultMessage.csproj')
35+
set testProjectsPath=$('..\src\tests\InfoResultTests\InfoResultTests.csproj')
36+
37+
38+
echo :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
39+
echo ::: Initialize: :::
40+
echo ::: - New application version generation :::
41+
echo ::: - Change log generation :::
42+
echo ::: - Build :::
43+
echo ::: - Test :::
44+
echo ::: - Create package :::
45+
echo :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
46+
echo:
47+
echo:
48+
49+
PowerShell -NoProfile -ExecutionPolicy ByPass -Command ".\GenerateBuildInfo.exe -scriptCommands \"runVersionIncrement=%runVersionIncrement%;runGenChangeLog=%runGenChangeLog%;runBuild=%runBuild%;runSolutionTest=%runSolutionTest%;runTest=%runTest%;runPack=%runPack%;setInChangeLogNewVersion=%setInChangeLogNewVersion%;autoCommitAndPush=%autoCommitAndPush%;autoGetLatestDevelop=%autoGetLatestDevelop%;changeLogPath=%changeLogPath%;sourceBranch=%sourceBranch%;destinationBranch=%destinationBranch%;assemblyPath=%assemblyPath%;customVersion=%customVersion%;genType=%genType%;solutionPath=%solutionPath%;packResultPath=%packResultPath%;packProjectsPath=%packProjectsPath%;testProjectsPath=%testProjectsPath%\"";
50+
51+
echo
52+
pause

build/generateNextMajorVersion.bat

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
@echo off
2+
cls
3+
4+
echo Write the source branch name (you current branch name, where were the changes made):
5+
set /p userDefinedSourceBranch=
6+
echo.
7+
echo Write the destination branch name (the branch from which you can get the latest changes, like 'develop' or 'main/master'):
8+
set /p userDefinedDestinationBranch=
9+
echo.
10+
11+
:: Set init params value
12+
set applicationName=AggregatedGenericResultMessage
13+
set runVersionIncrement=y
14+
set runGenChangeLog=y
15+
:: If runBuild > y(yes), build in release mode
16+
set runBuild=y
17+
set runSolutionTest=n
18+
set runTest=y
19+
set runPack=y
20+
set assemblyPath=$('..\src\shared\GeneralAssemblyInfo.cs')
21+
set genType=0
22+
set setInChangeLogNewVersion=y
23+
set autoCommitAndPush=n
24+
set autoGetLatestDevelop=y
25+
set changeLogPath=$('..\docs\CHANGELOG.MD')
26+
set sourceBranch=%userDefinedSourceBranch%
27+
set destinationBranch=%userDefinedDestinationBranch%
28+
set customVersion=$null
29+
set solutionPath=$('..\src\RzR.Shared.ResultMessage.sln')
30+
set packResultPath=$('..\nuget\')
31+
set packProjectsPath=$('..\src\AggregatedGenericResultMessage\AggregatedGenericResultMessage.csproj')
32+
set testProjectsPath=$('..\src\tests\InfoResultTests\InfoResultTests.csproj')
33+
34+
35+
echo :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
36+
echo ::: Initialize: :::
37+
echo ::: - New application version generation :::
38+
echo ::: - Change log generation :::
39+
echo ::: - Build :::
40+
echo ::: - Test :::
41+
echo ::: - Create package :::
42+
echo :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
43+
echo:
44+
echo:
45+
46+
PowerShell -NoProfile -ExecutionPolicy ByPass -Command ".\GenerateBuildInfo.exe -scriptCommands \"runVersionIncrement=%runVersionIncrement%;runGenChangeLog=%runGenChangeLog%;runBuild=%runBuild%;runSolutionTest=%runSolutionTest%;runTest=%runTest%;runPack=%runPack%;setInChangeLogNewVersion=%setInChangeLogNewVersion%;autoCommitAndPush=%autoCommitAndPush%;autoGetLatestDevelop=%autoGetLatestDevelop%;changeLogPath=%changeLogPath%;sourceBranch=%sourceBranch%;destinationBranch=%destinationBranch%;assemblyPath=%assemblyPath%;customVersion=%customVersion%;genType=%genType%;solutionPath=%solutionPath%;packResultPath=%packResultPath%;packProjectsPath=%packProjectsPath%;testProjectsPath=%testProjectsPath%\"";
47+
48+
echo
49+
pause

build/generateNextMinorVersion.bat

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
@echo off
2+
cls
3+
4+
echo Write the source branch name (you current branch name, where were the changes made):
5+
set /p userDefinedSourceBranch=
6+
echo.
7+
echo Write the destination branch name (the branch from which you can get the latest changes, like 'develop' or 'main/master'):
8+
set /p userDefinedDestinationBranch=
9+
echo.
10+
11+
:: Set init params value
12+
set applicationName=AggregatedGenericResultMessage
13+
set runVersionIncrement=y
14+
set runGenChangeLog=y
15+
:: If runBuild > y(yes), build in release mode
16+
set runBuild=y
17+
set runSolutionTest=n
18+
set runTest=y
19+
set runPack=y
20+
set assemblyPath=$('..\src\shared\GeneralAssemblyInfo.cs')
21+
set genType=1
22+
set setInChangeLogNewVersion=y
23+
set autoCommitAndPush=n
24+
set autoGetLatestDevelop=y
25+
set changeLogPath=$('..\docs\CHANGELOG.MD')
26+
set sourceBranch=%userDefinedSourceBranch%
27+
set destinationBranch=%userDefinedDestinationBranch%
28+
set customVersion=$null
29+
set solutionPath=$('..\src\RzR.Shared.ResultMessage.sln')
30+
set packResultPath=$('..\nuget\')
31+
set packProjectsPath=$('..\src\AggregatedGenericResultMessage\AggregatedGenericResultMessage.csproj')
32+
set testProjectsPath=$('..\src\tests\InfoResultTests\InfoResultTests.csproj')
33+
34+
35+
echo :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
36+
echo ::: Initialize: :::
37+
echo ::: - New application version generation :::
38+
echo ::: - Change log generation :::
39+
echo ::: - Build :::
40+
echo ::: - Test :::
41+
echo ::: - Create package :::
42+
echo :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
43+
echo:
44+
echo:
45+
46+
PowerShell -NoProfile -ExecutionPolicy ByPass -Command ".\GenerateBuildInfo.exe -scriptCommands \"runVersionIncrement=%runVersionIncrement%;runGenChangeLog=%runGenChangeLog%;runBuild=%runBuild%;runSolutionTest=%runSolutionTest%;runTest=%runTest%;runPack=%runPack%;setInChangeLogNewVersion=%setInChangeLogNewVersion%;autoCommitAndPush=%autoCommitAndPush%;autoGetLatestDevelop=%autoGetLatestDevelop%;changeLogPath=%changeLogPath%;sourceBranch=%sourceBranch%;destinationBranch=%destinationBranch%;assemblyPath=%assemblyPath%;customVersion=%customVersion%;genType=%genType%;solutionPath=%solutionPath%;packResultPath=%packResultPath%;packProjectsPath=%packProjectsPath%;testProjectsPath=%testProjectsPath%\"";
47+
48+
echo
49+
pause

build/generateNextPatchVersion.bat

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
@echo off
2+
cls
3+
4+
echo Write the source branch name (you current branch name, where were the changes made):
5+
set /p userDefinedSourceBranch=
6+
echo.
7+
echo Write the destination branch name (the branch from which you can get the latest changes, like 'develop' or 'main/master'):
8+
set /p userDefinedDestinationBranch=
9+
echo.
10+
11+
:: Set init params value
12+
set applicationName=AggregatedGenericResultMessage
13+
set runVersionIncrement=y
14+
set runGenChangeLog=y
15+
:: If runBuild > y(yes), build in release mode
16+
set runBuild=y
17+
set runSolutionTest=n
18+
set runTest=y
19+
set runPack=y
20+
set assemblyPath=$('..\src\shared\GeneralAssemblyInfo.cs')
21+
set genType=2
22+
set setInChangeLogNewVersion=y
23+
set autoCommitAndPush=n
24+
set autoGetLatestDevelop=y
25+
set changeLogPath=$('..\docs\CHANGELOG.MD')
26+
set sourceBranch=%userDefinedSourceBranch%
27+
set destinationBranch=%userDefinedDestinationBranch%
28+
set customVersion=$null
29+
set solutionPath=$('..\src\RzR.Shared.ResultMessage.sln')
30+
set packResultPath=$('..\nuget\')
31+
set packProjectsPath=$('..\src\AggregatedGenericResultMessage\AggregatedGenericResultMessage.csproj')
32+
set testProjectsPath=$('..\src\tests\InfoResultTests\InfoResultTests.csproj')
33+
34+
35+
echo :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
36+
echo ::: Initialize: :::
37+
echo ::: - New application version generation :::
38+
echo ::: - Change log generation :::
39+
echo ::: - Build :::
40+
echo ::: - Test :::
41+
echo ::: - Create package :::
42+
echo :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
43+
echo:
44+
echo:
45+
46+
PowerShell -NoProfile -ExecutionPolicy ByPass -Command ".\GenerateBuildInfo.exe -scriptCommands \"runVersionIncrement=%runVersionIncrement%;runGenChangeLog=%runGenChangeLog%;runBuild=%runBuild%;runSolutionTest=%runSolutionTest%;runTest=%runTest%;runPack=%runPack%;setInChangeLogNewVersion=%setInChangeLogNewVersion%;autoCommitAndPush=%autoCommitAndPush%;autoGetLatestDevelop=%autoGetLatestDevelop%;changeLogPath=%changeLogPath%;sourceBranch=%sourceBranch%;destinationBranch=%destinationBranch%;assemblyPath=%assemblyPath%;customVersion=%customVersion%;genType=%genType%;solutionPath=%solutionPath%;packResultPath=%packResultPath%;packProjectsPath=%packProjectsPath%;testProjectsPath=%testProjectsPath%\"";
47+
48+
echo
49+
pause

docs/CHANGELOG.md

Lines changed: 52 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,35 @@
1-
### **v.1.0.1.1702**
2-
-> Was fixed runtime error on using lib in project
1+
### **v1.4.0.7788** [[RzR](mailto:108324929+I-RzR-I@users.noreply.github.com)] 09-02-2026
2+
* [f68e0f7] (RzR) -> Auto commit uncommited files
3+
* [1d311f9] (RzR) -> Add new script for version gen.
4+
* [c438299] (RzR) -> Add `IsFailure` in result. Add new extension methods: `WithMessages`, `ReturnAutoSuccessOrFailure`
35

4-
### **v.1.0.1.1731**
5-
-> Changed the readme file, by adding install from NuGet.
6+
### **v1.3.5.4696**
7+
-> Upgrade version for the 'CodeSource' package.<br />
68

7-
### **v.1.0.2.0946**
8-
-> Clean project and organized for more readable code.<br />
9-
-> Removed local string extension class.<br />
10-
-> Added missing comments.
9+
### **v1.3.4.6865**
10+
-> Upgrade minimum `System.Text.Json` package required version to `6.0.10`, fixing CVE (`CVE-2024-43485`).<br />
1111

12-
### **v.1.0.3.1836**
13-
-> Was added a new message result `Exception`.<br />
14-
-> Was added a new methods for 'Exception': `AddException`, `HasAnyExceptions`.<br />
15-
-> Was added a new method for 'Error result': `HasAnyErrorsOrExceptions`.<br />
16-
-> Was adjusted the method for 'Error result': `GetFirstError` return non null value.<br />
17-
-> Was added a new `operators` for: catch `Exception`, bool or T response on return from methods.<br />
18-
-> Was adjusted the methods from `ResultOfT` for `JoinResults` and added new method `JoinErrorResults`.<br />
19-
-> Was update libs, cleaned code, optimized and reorganized.<br />
12+
### **v1.3.3.6068**
13+
-> Adjust the location for methods: `GetFirstMessage`, `GetFirstMessageWithDetails`.<br />
14+
-> Add a new extension for result execution `FunctionExtensions` (`FunctionOnSuccess`, `FunctionOnFailure`, `FunctionOn`, `ExecuteFunction`), which allows to execute of one or more functions.<br />
2015

21-
### **v.1.0.3.1903**
22-
-> Libs upgrade and retested some cases.<br />
16+
### **v1.3.2.469**
17+
-> Add `RelatedObject` in code (means related object in code execution, usually used in case of some errors to show method name, stored procedure, table, etc).<br />
18+
-> Adjust code to solution code style.<br />
19+
-> Adjust exposed methods and add a few new.
2320

24-
### **v.1.0.4.1314**
25-
-> Added support for SOAP services result. Cast from `Result` or `Result<T>` to acceptable result for SOAP (to XML result) in particular use in .net framework.<br />
26-
-> Was added an extension method for SOAP result `ToSoapResult`.<br />
27-
-> Was added support for .net framework 4.6.1 - 4.8.<br />
21+
### **v1.2.2.2040**
22+
-> Adjust code to solution code style.<br />
23+
-> Update lib versions.
2824

29-
### **v.1.0.5.1813**
30-
-> Was added support for .net framework 4.5.<br />
25+
### **v.1.2.1.0**
26+
-> Hide internal used extension.
3127

32-
### **v.1.0.6.1706**
33-
-> Was added new custom responses.<br />
34-
-> Was updated libs.<br />
28+
### **v.1.2.0.0**
29+
-> Adjust JSON result/response property name (`result` => `response`).
30+
31+
### **1.1.1.2048**
32+
-> Added extension methods(`ActionOnSuccess`, `ActionOnFailure`, `ActionOn`, `ExecuteAction`) which allow executing custom actions on specific cases or in any case you want or need.
3533

3634
### **v.1.1.0.0**
3735
-> Removed from solution reference `DomainCommonExtensions` to reduce package size and allow more dynamic package use without adding unnecessary components.<br/>
@@ -41,31 +39,37 @@
4139
-> Added new model `ResultError` used in `WithError` and `WithErrors`.<br/>
4240
-> Cleaned up code and reorganization on project structure by extracting functionalities to separate classes.<br/>
4341

44-
### **1.1.1.2048**
45-
-> Added extension methods(`ActionOnSuccess`, `ActionOnFailure`, `ActionOn`, `ExecuteAction`) which allow executing custom actions on specific cases or in any case you want or need.
46-
47-
### **v.1.2.0.0**
48-
-> Adjust JSON result/response property name (`result` => `response`).
42+
### **v.1.0.6.1706**
43+
-> Was added new custom responses.<br />
44+
-> Was updated libs.<br />
4945

50-
### **v.1.2.1.0**
51-
-> Hide internal used extension.
46+
### **v.1.0.5.1813**
47+
-> Was added support for .net framework 4.5.<br />
5248

53-
### **v1.2.2.2040**
54-
-> Adjust code to solution code style.<br />
55-
-> Update lib versions.
49+
### **v.1.0.4.1314**
50+
-> Added support for SOAP services result. Cast from `Result` or `Result<T>` to acceptable result for SOAP (to XML result) in particular use in .net framework.<br />
51+
-> Was added an extension method for SOAP result `ToSoapResult`.<br />
52+
-> Was added support for .net framework 4.6.1 - 4.8.<br />
5653

57-
### **v1.3.2.469**
58-
-> Add `RelatedObject` in code (means related object in code execution, usually used in case of some errors to show method name, stored procedure, table, etc).<br />
59-
-> Adjust code to solution code style.<br />
60-
-> Adjust exposed methods and add a few new.
54+
### **v.1.0.3.1903**
55+
-> Libs upgrade and retested some cases.<br />
6156

57+
### **v.1.0.3.1836**
58+
-> Was added a new message result `Exception`.<br />
59+
-> Was added a new methods for 'Exception': `AddException`, `HasAnyExceptions`.<br />
60+
-> Was added a new method for 'Error result': `HasAnyErrorsOrExceptions`.<br />
61+
-> Was adjusted the method for 'Error result': `GetFirstError` return non null value.<br />
62+
-> Was added a new `operators` for: catch `Exception`, bool or T response on return from methods.<br />
63+
-> Was adjusted the methods from `ResultOfT` for `JoinResults` and added new method `JoinErrorResults`.<br />
64+
-> Was update libs, cleaned code, optimized and reorganized.<br />
6265

63-
### **v1.3.3.6068**
64-
-> Adjust the location for methods: `GetFirstMessage`, `GetFirstMessageWithDetails`.<br />
65-
-> Add a new extension for result execution `FunctionExtensions` (`FunctionOnSuccess`, `FunctionOnFailure`, `FunctionOn`, `ExecuteFunction`), which allows to execute of one or more functions.<br />
66+
### **v.1.0.2.0946**
67+
-> Clean project and organized for more readable code.<br />
68+
-> Removed local string extension class.<br />
69+
-> Added missing comments.
6670

67-
### **v1.3.4.6865**
68-
-> Upgrade minimum `System.Text.Json` package required version to `6.0.10`, fixing CVE (`CVE-2024-43485`).<br />
71+
### **v.1.0.1.1731**
72+
-> Changed the readme file, by adding install from NuGet.
6973

70-
### **v1.3.5.4696**
71-
-> Upgrade version for the 'CodeSource' package.<br />
74+
### **v.1.0.1.1702**
75+
-> Was fixed runtime error on using lib in project

src/AggregatedGenericResultMessage/Abstractions/IResult.cs

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,19 @@ public interface IResult
3333
{
3434
/// <summary>
3535
/// Bool indicating that the request resulted with success.
36-
/// If False than the <see cref="Messages" /> will
37-
/// contain a Error message that produced this error.
36+
/// If 'False', then the <see cref="Messages" /> will
37+
/// contain an Error message that produced this error.
3838
/// </summary>
3939
bool IsSuccess { get; set; }
4040

41+
/// <summary>
42+
/// Gets a value indicating whether this object is failure.
43+
/// </summary>
44+
/// <value>
45+
/// True if this object is failure, false if not.
46+
/// </value>
47+
bool IsFailure { get; }
48+
4149
/// <summary>
4250
/// This property will contain messages keys if any.
4351
/// </summary>

src/AggregatedGenericResultMessage/AggregatedGenericResultMessage.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
<Compile Include="..\shared\GeneralAssemblyInfo.cs" Link="Properties\GeneralAssemblyInfo.cs" />
4040
</ItemGroup>
4141
<ItemGroup>
42-
<PackageReference Include="CodeSource" Version="2.0.0.0" />
42+
<PackageReference Include="CodeSource" Version="4.0.2.4672" />
4343
<PackageReference Include="System.Runtime.Serialization.Primitives" Version="4.3.0" />
4444
</ItemGroup>
4545

0 commit comments

Comments
 (0)