Skip to content

Commit

Permalink
style: Add comment to parameter "errors"
Browse files Browse the repository at this point in the history
  • Loading branch information
MrDave1999 committed Nov 12, 2023
1 parent a4c837b commit 798063a
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/Core/Result.Errors.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ public static Result Failure()
public static Result Failure(string message)
=> Failure(message, Enumerable.Empty<string>());

/// <param name="errors">A collection of string that contains error messages.</param>
/// <inheritdoc cref="Failure(string, IEnumerable{string})" />
public static Result Failure(IEnumerable<string> errors)
=> Failure(string.Empty, errors);
Expand All @@ -47,6 +48,7 @@ public static Result Invalid()
public static Result Invalid(string message)
=> Invalid(message, Enumerable.Empty<string>());

/// <param name="errors">A collection of string that contains error messages.</param>
/// <inheritdoc cref="Invalid(string, IEnumerable{string})" />
public static Result Invalid(IEnumerable<string> errors)
=> Invalid(ResponseMessages.ValidationErrors, errors);
Expand All @@ -69,6 +71,7 @@ public static Result NotFound()
public static Result NotFound(string message)
=> NotFound(message, Enumerable.Empty<string>());

/// <param name="errors">A collection of string that contains error messages.</param>
/// <inheritdoc cref="NotFound(string, IEnumerable{string})" />
public static Result NotFound(IEnumerable<string> errors)
=> NotFound(string.Empty, errors);
Expand All @@ -90,6 +93,7 @@ public static Result Unauthorized()
public static Result Unauthorized(string message)
=> Unauthorized(message, Enumerable.Empty<string>());

/// <param name="errors">A collection of string that contains error messages.</param>
/// <inheritdoc cref="Unauthorized(string, IEnumerable{string})" />
public static Result Unauthorized(IEnumerable<string> errors)
=> Unauthorized(string.Empty, errors);
Expand All @@ -115,6 +119,7 @@ public static Result Conflict()
public static Result Conflict(string message)
=> Conflict(message, Enumerable.Empty<string>());

/// <param name="errors">A collection of string that contains error messages.</param>
/// <inheritdoc cref="Conflict(string, IEnumerable{string})" />
public static Result Conflict(IEnumerable<string> errors)
=> Conflict(string.Empty, errors);
Expand All @@ -136,12 +141,13 @@ public static Result CriticalError()
public static Result CriticalError(string message)
=> CriticalError(message, Enumerable.Empty<string>());

/// <param name="errors">A collection of string that contains error messages.</param>
/// <inheritdoc cref="CriticalError(string, IEnumerable{string})" />
public static Result CriticalError(IEnumerable<string> errors)
=> CriticalError(string.Empty, errors);

/// <summary>
/// Represents a critical error that occurred during the execution of the service.
/// Represents a situation where a service detects unexpected behavior (critical error) and does not know how to handle it.
/// </summary>
/// <remarks>
/// Everything provided by the user was valid, but the service was unable to complete due to an exception.
Expand All @@ -160,6 +166,7 @@ public static Result Forbidden()
public static Result Forbidden(string message)
=> Forbidden(message, Enumerable.Empty<string>());

/// <param name="errors">A collection of string that contains error messages.</param>
/// <inheritdoc cref="Forbidden(string, IEnumerable{string})" />
public static Result Forbidden(IEnumerable<string> errors)
=> Forbidden(string.Empty, errors);
Expand Down

0 comments on commit 798063a

Please sign in to comment.