C# Class NContext.ErrorHandling.ErrorBase

Defines an abstraction for localized application errors.
Datei anzeigen Open project: PowerDMS/NContext

Public Methods

Method Description
NullObject ( ) : Error

Returns a default Error instance.

Protected Methods

Method Description
ErrorBase ( String localizationKey, HttpStatusCode httpStatusCode ) : System

Initializes a new instance of the ErrorBase class.

ErrorBase ( String localizationKey, HttpStatusCode httpStatusCode, String code ) : System

Initializes a new instance of the ErrorBase class.

GetLocalizedErrorMessage ( String localizationKey ) : String

Gets the localized error message.

Private Methods

Method Description
ErrorBase ( ) : System
SetErrorMessage ( String localizationKey ) : void

Method Details

ErrorBase() protected method

Initializes a new instance of the ErrorBase class.
protected ErrorBase ( String localizationKey, HttpStatusCode httpStatusCode ) : System
localizationKey String The localization key.
httpStatusCode HttpStatusCode The HTTP status code.
return System

ErrorBase() protected method

Initializes a new instance of the ErrorBase class.
protected ErrorBase ( String localizationKey, HttpStatusCode httpStatusCode, String code ) : System
localizationKey String The localization key.
httpStatusCode HttpStatusCode The HTTP status code.
code String A unique code that represents the reason for the error.
return System

GetLocalizedErrorMessage() protected method

Gets the localized error message.
protected GetLocalizedErrorMessage ( String localizationKey ) : String
localizationKey String The localization key.
return String

NullObject() public static method

Returns a default Error instance.
public static NullObject ( ) : Error
return Error