You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Aug 30, 2025. It is now read-only.
Copy file name to clipboardExpand all lines: src/ErrorExtensions.cs
+11Lines changed: 11 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -4,23 +4,27 @@
4
4
5
5
namespacePowerUtils.Results
6
6
{
7
+
[Obsolete("This package has been discontinued because it never evolved, and the code present in this package does not justify its continuation. It is preferable to implement this code directly in the project if necessary.")]
7
8
publicstaticclassErrorExtensions
8
9
{
9
10
/// <summary>
10
11
/// Get Errors as a list
11
12
/// </summary>
13
+
[Obsolete("This package has been discontinued because it never evolved, and the code present in this package does not justify its continuation. It is preferable to implement this code directly in the project if necessary.")]
[Obsolete("This package has been discontinued because it never evolved, and the code present in this package does not justify its continuation. It is preferable to implement this code directly in the project if necessary.")]
18
21
publicstaticIErrorFirstError(thisIResultresult)
19
22
=>result.Errors.First();
20
23
21
24
/// <summary>
22
25
/// Gets the first error, if does not contain errors returns null
23
26
/// </summary>
27
+
[Obsolete("This package has been discontinued because it never evolved, and the code present in this package does not justify its continuation. It is preferable to implement this code directly in the project if necessary.")]
@@ -34,6 +38,7 @@ public static IError FirstError(this IResult result)
34
38
/// <summary>
35
39
/// Gets the first error that satisfies the condition otherwise returns null
36
40
/// </summary>
41
+
[Obsolete("This package has been discontinued because it never evolved, and the code present in this package does not justify its continuation. It is preferable to implement this code directly in the project if necessary.")]
@@ -47,12 +52,14 @@ public static IError FirstError(this IResult result)
47
52
/// <summary>
48
53
/// Gets the last error
49
54
/// </summary>
55
+
[Obsolete("This package has been discontinued because it never evolved, and the code present in this package does not justify its continuation. It is preferable to implement this code directly in the project if necessary.")]
50
56
publicstaticIErrorLastError(thisIResultresult)
51
57
=>result.Errors.Last();
52
58
53
59
/// <summary>
54
60
/// Gets the last error, if does not contain errors returns null
55
61
/// </summary>
62
+
[Obsolete("This package has been discontinued because it never evolved, and the code present in this package does not justify its continuation. It is preferable to implement this code directly in the project if necessary.")]
@@ -66,6 +73,7 @@ public static IError LastError(this IResult result)
66
73
/// <summary>
67
74
/// Gets the last error that satisfies the condition otherwise returns null
68
75
/// </summary>
76
+
[Obsolete("This package has been discontinued because it never evolved, and the code present in this package does not justify its continuation. It is preferable to implement this code directly in the project if necessary.")]
@@ -79,12 +87,14 @@ public static IError LastError(this IResult result)
79
87
/// <summary>
80
88
/// Gets the error when only exists one
81
89
/// </summary>
90
+
[Obsolete("This package has been discontinued because it never evolved, and the code present in this package does not justify its continuation. It is preferable to implement this code directly in the project if necessary.")]
82
91
publicstaticIErrorSingleError(thisIResultresult)
83
92
=>result.Errors.Single();
84
93
85
94
/// <summary>
86
95
/// Gets the error when only exists one, if does not contain errors returns null
87
96
/// </summary>
97
+
[Obsolete("This package has been discontinued because it never evolved, and the code present in this package does not justify its continuation. It is preferable to implement this code directly in the project if necessary.")]
@@ -98,6 +108,7 @@ public static IError SingleError(this IResult result)
98
108
/// <summary>
99
109
/// Gets the error when only one satisfies the condition otherwise returns null
100
110
/// </summary>
111
+
[Obsolete("This package has been discontinued because it never evolved, and the code present in this package does not justify its continuation. It is preferable to implement this code directly in the project if necessary.")]
Copy file name to clipboardExpand all lines: src/ErrorFactory.cs
+17-1Lines changed: 17 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -1,14 +1,18 @@
1
-
namespacePowerUtils.Results
1
+
usingSystem;
2
+
3
+
namespacePowerUtils.Results
2
4
{
3
5
#if NET6_0_OR_GREATER
4
6
publicreadonlypartialrecordstructError:IError
5
7
#else
8
+
[Obsolete("This package has been discontinued because it never evolved, and the code present in this package does not justify its continuation. It is preferable to implement this code directly in the project if necessary.")]
6
9
public partial struct Error : IError
7
10
#endif
8
11
{
9
12
/// <summary>
10
13
/// Creates a custom error result with the given error similar to a BadRequest:400
11
14
/// </summary>
15
+
[Obsolete("This package has been discontinued because it never evolved, and the code present in this package does not justify its continuation. It is preferable to implement this code directly in the project if necessary.")]
/// Creates an 'Unauthorized:401' error result with the given error
19
23
/// </summary>
24
+
[Obsolete("This package has been discontinued because it never evolved, and the code present in this package does not justify its continuation. It is preferable to implement this code directly in the project if necessary.")]
/// Creates an 'Unauthorized:401' error result with the given error and code: 'UNAUTHORIZED'
25
30
/// </summary>
31
+
[Obsolete("This package has been discontinued because it never evolved, and the code present in this package does not justify its continuation. It is preferable to implement this code directly in the project if necessary.")]
/// Creates an 'Forbidden:403' error result with the given error
33
39
/// </summary>
40
+
[Obsolete("This package has been discontinued because it never evolved, and the code present in this package does not justify its continuation. It is preferable to implement this code directly in the project if necessary.")]
/// Creates an 'Forbidden:403' error result with the given error and code: 'FORBIDDEN'
39
46
/// </summary>
47
+
[Obsolete("This package has been discontinued because it never evolved, and the code present in this package does not justify its continuation. It is preferable to implement this code directly in the project if necessary.")]
@@ -45,12 +53,14 @@ public static ForbiddenError Forbidden(string property, string? description = nu
45
53
/// <summary>
46
54
/// Creates an 'NotFound:404' error result with the given error
47
55
/// </summary>
56
+
[Obsolete("This package has been discontinued because it never evolved, and the code present in this package does not justify its continuation. It is preferable to implement this code directly in the project if necessary.")]
/// Creates an 'NotFound:404' error result with the given error and code: 'NOT_FOUND'
53
62
/// </summary>
63
+
[Obsolete("This package has been discontinued because it never evolved, and the code present in this package does not justify its continuation. It is preferable to implement this code directly in the project if necessary.")]
/// Creates an 'Conflict:409' error result with the given error
61
71
/// </summary>
72
+
[Obsolete("This package has been discontinued because it never evolved, and the code present in this package does not justify its continuation. It is preferable to implement this code directly in the project if necessary.")]
/// Creates an 'Conflict:409' error result with the given error and code: 'CONFLICT'
67
78
/// </summary>
79
+
[Obsolete("This package has been discontinued because it never evolved, and the code present in this package does not justify its continuation. It is preferable to implement this code directly in the project if necessary.")]
/// Create an 'Validation:400' error result with the given error
75
87
/// </summary>
88
+
[Obsolete("This package has been discontinued because it never evolved, and the code present in this package does not justify its continuation. It is preferable to implement this code directly in the project if necessary.")]
/// Create an 'Validation:400' error result with the given error and code: 'VALIDATION'
81
94
/// </summary>
95
+
[Obsolete("This package has been discontinued because it never evolved, and the code present in this package does not justify its continuation. It is preferable to implement this code directly in the project if necessary.")]
/// Create an 'Unexpected:500' error result with the given error
89
103
/// </summary>
104
+
[Obsolete("This package has been discontinued because it never evolved, and the code present in this package does not justify its continuation. It is preferable to implement this code directly in the project if necessary.")]
/// Create an 'Unexpected:500' error result with the given error and code: 'UNEXPECTED'
95
110
/// </summary>
111
+
[Obsolete("This package has been discontinued because it never evolved, and the code present in this package does not justify its continuation. It is preferable to implement this code directly in the project if necessary.")]
0 commit comments