Skip to content

Commit 135cc71

Browse files
authored
Merge pull request #33 from I-RzR-I/feature/NameSpaceConceptChange
Namespace and concept change, build on new name
2 parents 90abaef + eced7a9 commit 135cc71

12 files changed

Lines changed: 101 additions & 529 deletions

File tree

README.md

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,19 @@
11
> **Note** This repository is developed in .netstandard2+ with support for SOAP service results mainly used in the .net framework (current support 4.5, 4.6.1 - 4.8)
22
3+
[![NuGet Version](https://img.shields.io/nuget/v/RzR.ResultMessage.svg?style=flat&logo=nuget)](https://www.nuget.org/packages/RzR.ResultMessage/)
4+
[![Nuget Downloads](https://img.shields.io/nuget/dt/RzR.ResultMessage.svg?style=flat&logo=nuget)](https://www.nuget.org/packages/RzR.ResultMessage)
5+
6+
<details>
7+
8+
<summary>Old version</summary>
9+
310
[![NuGet Version](https://img.shields.io/nuget/v/AggregatedGenericResultMessage.svg?style=flat&logo=nuget)](https://www.nuget.org/packages/AggregatedGenericResultMessage/)
411
[![Nuget Downloads](https://img.shields.io/nuget/dt/AggregatedGenericResultMessage.svg?style=flat&logo=nuget)](https://www.nuget.org/packages/AggregatedGenericResultMessage)
512

13+
</details>
14+
15+
<br />
16+
617
The goal of this repository is to offer the possibility to manage and agree on the answers received as a result of the execution of a method or a process.
718

819
In other words, it offers the possibility to use a single(general) response, structured and easier parsed model for the executed methods.
@@ -15,21 +26,11 @@ For more flexible and intuitive use, in solution persist extension method like f
1526

1627
For more efficiently using, when in some cases when you may need to execute some custom actions/functions after a successful or failed execution request. In that case was added extension methods (`ActionOnSuccess`, `ActionOnFailure`, `ActionOn`, `ExecuteAction`, `FunctionOnSuccess`, `FunctionOnFailure`, `FunctionOn`, `ExecuteFunction`) which allow you to execute this action/function like insert log when execution has a status equal to failure.
1728

18-
> **Note:** As of the latest version, the legacy `ActionOn*` and `Func<Task<TResult>>`-taking `Function*` overloads are marked `[Obsolete]`. Prefer the modern combinators below — they return values, fail fast on null arguments, and use `ConfigureAwait(false)`:
19-
>
20-
> | Replace | With |
21-
> |---|---|
22-
> | `ActionOnSuccess` (side-effect) | `Result<T>.Tap(Action<T>)` |
23-
> | `ActionOnFailure` / `ActionOn` | `Match(onSuccess, onFailure)` |
24-
> | `FunctionOnSuccess(... Task<TResult>)` | `FunctionOnSuccessAsync` (in `RzR.ResultMessage.Extensions.Result.Functions.FunctionExtensionsAsync`) |
25-
>
26-
> The new monadic / async combinators are: `Map`, `Bind`, `Match`, `Tap`, `MapAsync`, `BindAsync`, `TapAsync`, `MatchAsync`, plus fluent `Validate` / `Ensure` validation aggregation. See [USING](docs/usage.md) for details.
27-
2829
No additional components or packs are required for use. So, it only needs to be added/installed in the project and can be used instantly.
2930

30-
**In case you wish to use it in your project, u can install the package from <a href="https://www.nuget.org/packages/AggregatedGenericResultMessage" target="_blank">nuget.org</a>** or specify what version you want:
31+
**In case you wish to use it in your project, u can install the package from <a href="https://www.nuget.org/packages/RzR.ResultMessage" target="_blank">nuget.org</a>** or specify what version you want:
3132

32-
> `Install-Package AggregatedGenericResultMessage -Version x.x.x.x`
33+
> `Install-Package RzR.ResultMessage -Version x.x.x.x`
3334
3435
## Content
3536
1. [USING](docs/usage.md)

docs/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
### **v3.0.0.6928** [[RzR](mailto:108324929+I-RzR-I@users.noreply.github.com)] 24-05-2026
2+
* [063f7e3] (RzR) -> Cleanup for obsolete methods.
3+
* [709b9b2] (RzR) -> Add `CancellationToken` support to all async pipeline methods from `FunctionExtensionsAsync`.
4+
15
### **v2.0.0.4127** [[RzR](mailto:108324929+I-RzR-I@users.noreply.github.com)] 22-04-2026
26
> **Major release — contains breaking changes.** See [migration-guide.md](migration-guide.md) for full before/after porting steps.
37

src/AggregatedGenericResultMessage/AggregatedGenericResultMessage.csproj

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
<Language>en-US</Language>
2525

2626
<RootNamespace>RzR.ResultMessage</RootNamespace>
27+
<AssemblyName>RzR.ResultMessage</AssemblyName>
2728
<PackageReleaseNotes>
2829

2930
</PackageReleaseNotes>
@@ -41,7 +42,7 @@
4142
<Compile Include="..\shared\GeneralAssemblyInfo.cs" Link="Properties\GeneralAssemblyInfo.cs" />
4243
</ItemGroup>
4344
<ItemGroup>
44-
<PackageReference Include="CodeSource" Version="5.0.0.7373" />
45+
<PackageReference Include="RzR.Core.CodeSource" Version="6.0.0.94" />
4546
<PackageReference Include="System.Runtime.Serialization.Primitives" Version="4.3.0" />
4647
</ItemGroup>
4748

src/AggregatedGenericResultMessage/Extensions/Result/Actions/ActionExtensions.cs

Lines changed: 0 additions & 169 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
using RzR.ResultMessage.Extensions.Common;
2121
using RzR.ResultMessage.Models;
2222
using System;
23-
using System.Collections.Generic;
2423

2524
#endregion
2625

@@ -31,174 +30,6 @@ namespace RzR.ResultMessage.Extensions.Result.Actions
3130
/// </summary>
3231
public static class ActionExtensions
3332
{
34-
/// <summary>
35-
/// Action on success
36-
/// </summary>
37-
/// <typeparam name="TResult">Type of result</typeparam>
38-
/// <param name="result">Result</param>
39-
/// <param name="onSuccess">Success action</param>
40-
[Obsolete("Use Result<T>.Tap(Action<T>) for side-effects on success, or Match(onSuccess, onFailure) when you need to fold into a value.")]
41-
public static TResult ActionOnSuccess<TResult>(this TResult result, params Action<TResult>[] onSuccess)
42-
where TResult : IResult
43-
{
44-
if (result.IsSuccess.IsFalse())
45-
return result;
46-
47-
foreach (var action in onSuccess)
48-
action?.Invoke(result);
49-
50-
return result;
51-
}
52-
53-
/// <summary>
54-
/// Action on failure
55-
/// </summary>
56-
/// <typeparam name="TResult">Type of result</typeparam>
57-
/// <param name="result">Result</param>
58-
/// <param name="onFailure">Failure action</param>
59-
[Obsolete("Use Match(onSuccess, onFailure) which returns a value and makes both branches explicit.")]
60-
public static TResult ActionOnFailure<TResult>(this TResult result, params Action<TResult>[] onFailure)
61-
where TResult : IResult
62-
{
63-
if (result.IsSuccess)
64-
return result;
65-
66-
if (onFailure.IsNull())
67-
return result;
68-
69-
foreach (var action in onFailure)
70-
action?.Invoke(result);
71-
72-
return result;
73-
}
74-
75-
/// <summary>
76-
/// Action on success or failure
77-
/// </summary>
78-
/// <param name="result">Result</param>
79-
/// <param name="onSuccess">Action on success</param>
80-
/// <param name="onFailure">Action on failure</param>
81-
/// <typeparam name="TResult">Type of result</typeparam>
82-
/// <remarks></remarks>
83-
[Obsolete("Use Match(onSuccess, onFailure) which returns a value and makes both branches explicit.")]
84-
public static TResult ActionOn<TResult>(
85-
this TResult result, Action<TResult> onSuccess,
86-
Action<TResult> onFailure) where TResult : IResult
87-
{
88-
if (result.IsSuccess.IsFalse())
89-
{
90-
if (onFailure.IsNull())
91-
return result;
92-
93-
onFailure?.Invoke(result);
94-
95-
return result;
96-
}
97-
98-
if (onSuccess.IsNull())
99-
return result;
100-
onSuccess?.Invoke(result);
101-
102-
return result;
103-
}
104-
105-
/// <summary>
106-
/// Action on success or failure
107-
/// </summary>
108-
/// <param name="result">Result</param>
109-
/// <param name="onSuccess">Action on success</param>
110-
/// <param name="onFailure">Action on failure</param>
111-
/// <typeparam name="TResult">Type of result</typeparam>
112-
/// <remarks></remarks>
113-
[Obsolete("Use Match(onSuccess, onFailure) which returns a value and makes both branches explicit.")]
114-
public static TResult ActionOn<TResult>(
115-
this TResult result, Action<TResult> onSuccess,
116-
IEnumerable<Action<TResult>> onFailure) where TResult : IResult
117-
{
118-
if (!result.IsSuccess)
119-
{
120-
if (onFailure.IsNull())
121-
return result;
122-
123-
foreach (var action in onFailure)
124-
action?.Invoke(result);
125-
126-
return result;
127-
}
128-
129-
if (onSuccess.IsNull())
130-
return result;
131-
132-
onSuccess?.Invoke(result);
133-
134-
return result;
135-
}
136-
137-
/// <summary>
138-
/// Action on success or failure
139-
/// </summary>
140-
/// <param name="result">Result</param>
141-
/// <param name="onSuccess">Action on success</param>
142-
/// <param name="onFailure">Action on failure</param>
143-
/// <typeparam name="TResult">Type of result</typeparam>
144-
/// <remarks></remarks>
145-
[Obsolete("Use Match(onSuccess, onFailure) which returns a value and makes both branches explicit.")]
146-
public static TResult ActionOn<TResult>(
147-
this TResult result, IEnumerable<Action<TResult>> onSuccess,
148-
Action<TResult> onFailure) where TResult : IResult
149-
{
150-
if (!result.IsSuccess)
151-
{
152-
if (onFailure.IsNull())
153-
return result;
154-
155-
onFailure?.Invoke(result);
156-
157-
return result;
158-
}
159-
160-
if (onSuccess.IsNull())
161-
return result;
162-
163-
foreach (var action in onSuccess)
164-
action?.Invoke(result);
165-
166-
return result;
167-
}
168-
169-
/// <summary>
170-
/// Action on success or failure
171-
/// </summary>
172-
/// <param name="result">Result</param>
173-
/// <param name="onSuccess">Action on success</param>
174-
/// <param name="onFailure">Action on failure</param>
175-
/// <typeparam name="TResult">Type of result</typeparam>
176-
/// <remarks></remarks>
177-
[Obsolete("Use Match(onSuccess, onFailure) which returns a value and makes both branches explicit.")]
178-
public static TResult ActionOn<TResult>(
179-
this TResult result, IEnumerable<Action<TResult>> onSuccess,
180-
IEnumerable<Action<TResult>> onFailure) where TResult : IResult
181-
{
182-
if (result.IsSuccess.IsFalse())
183-
{
184-
if (onFailure.IsNull())
185-
return result;
186-
187-
foreach (var action in onFailure)
188-
action?.Invoke(result);
189-
190-
return result;
191-
}
192-
193-
if (onSuccess.IsNull())
194-
return result;
195-
196-
foreach (var action in onSuccess)
197-
action?.Invoke(result);
198-
199-
return result;
200-
}
201-
20233
/// <summary>
20334
/// Execute action
20435
/// </summary>

0 commit comments

Comments
 (0)