Result/ResultSuccess/Errors/Error.cs
/// <summary>
/// Create error with error messages and message params.
/// </summary>
/// <param name="generalErrorMessage">General message about error.</param>
/// <param name="detailErrorMessage">Detailed message about error.</param>
/// <param name="errorId">Error identifier.</param>
/// <param name="messageParams">Message parameters.</param>
/// <returns>Error object.</returns>
Create error with error messages and message params.
Create error with error messages and message params .
public static Error CreateError(string generalErrorMessage, string detailErrorMessage, int? errorId, IReadOnlyDictionary<string, object> messageParams = null)
        {
            Error error = new(generalErrorMessage, errorId);
            Error detailError = new(errorId, detailErrorMessage, messageParams);
            error.AddErrorDetail(detailError);
            return error;
        }
public static Error CreateError ( string generalErrorMessage , string detailErrorMessage , int ? errorId , IReadOnlyDictionary < string , object > messageParams = null ) { Error error = new ( generalErrorMessage , errorId ) ; Error detailError = new ( errorId , detailErrorMessage , messageParams ) ; error . AddErrorDetail ( detailError ) ; return error ; }
Create error with error messages and message params.
Create error with error messages and message params .
None
generalErrorMessage
string
General message about error.
General message about error .
detailErrorMessage
string
Detailed message about error.
Detailed message about error .
errorId
int?
None
messageParams
IReadOnlyDictionary<string, object>
None