SimpleREST.NET 0.1
A simple and minimal api framework for .net base on Express.js
Loading...
Searching...
No Matches
SimpleRest.Api.StatusCode Class Reference
Inheritance diagram for SimpleRest.Api.StatusCode:
Collaboration diagram for SimpleRest.Api.StatusCode:

Public Member Functions

 StatusCode (int code, string name="", string message="", string severity="")
 
override string ToString ()
 

Static Public Attributes

static readonly StatusCode Success
 
static readonly StatusCode BadRequest
 
static readonly StatusCode Unauthorized
 
static readonly StatusCode NotFound
 
static readonly StatusCode InternalServerError
 

Properties

int Code [get]
 
string Name [get]
 
string Message [get]
 
string Severity [get]
 
- Properties inherited from SimpleRest.Api.IStatusCode

Detailed Description

Definition at line 5 of file StatusCode.cs.

Constructor & Destructor Documentation

◆ StatusCode()

SimpleRest.Api.StatusCode.StatusCode ( int code,
string name = "",
string message = "",
string severity = "" )

Definition at line 12 of file StatusCode.cs.

Member Function Documentation

◆ ToString()

override string SimpleRest.Api.StatusCode.ToString ( )

Member Data Documentation

◆ BadRequest

readonly StatusCode SimpleRest.Api.StatusCode.BadRequest
static
Initial value:
= new StatusCode(
400,
"BadRequest",
"Bad request",
"Warning"
)
StatusCode(int code, string name="", string message="", string severity="")
Definition StatusCode.cs:12

Definition at line 26 of file StatusCode.cs.

◆ InternalServerError

readonly StatusCode SimpleRest.Api.StatusCode.InternalServerError
static
Initial value:
= new StatusCode(
500,
"ServerError",
"Internal server error",
"Critical"
)

Definition at line 44 of file StatusCode.cs.

◆ NotFound

readonly StatusCode SimpleRest.Api.StatusCode.NotFound
static
Initial value:
= new StatusCode(
404,
"NotFound",
"Resource not found",
"Warning"
)

Definition at line 38 of file StatusCode.cs.

◆ Success

readonly StatusCode SimpleRest.Api.StatusCode.Success
static
Initial value:
= new StatusCode(
200,
"OK",
"Operation completed successfully",
"Info"
)

Definition at line 20 of file StatusCode.cs.

◆ Unauthorized

readonly StatusCode SimpleRest.Api.StatusCode.Unauthorized
static
Initial value:
= new StatusCode(
401,
"Unauthorized",
"Unauthorized access",
"Error"
)

Definition at line 32 of file StatusCode.cs.

Property Documentation

◆ Code

int SimpleRest.Api.StatusCode.Code
get

Implements SimpleRest.Api.IStatusCode.

Definition at line 7 of file StatusCode.cs.

◆ Message

string SimpleRest.Api.StatusCode.Message
get

Implements SimpleRest.Api.IStatusCode.

Definition at line 9 of file StatusCode.cs.

◆ Name

string SimpleRest.Api.StatusCode.Name
get

Implements SimpleRest.Api.IStatusCode.

Definition at line 8 of file StatusCode.cs.

◆ Severity

string SimpleRest.Api.StatusCode.Severity
get

Implements SimpleRest.Api.IStatusCode.

Definition at line 10 of file StatusCode.cs.


The documentation for this class was generated from the following file: