C# Класс PhotoSharingApp.AppService.ServiceCore.ServiceFault

Helper class for instantiating errors returned. from the service.
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
BadRequest ( string source, ushort code, string description ) : HttpResponseException

Creates a fault exception with the HTTP status code 400.

Forbidden ( string source, ushort code, string description ) : HttpResponseException

Creates a fault exception with the HTTP status code 403.

InternalServerError ( string source, ushort code, string description ) : HttpResponseException

Creates a fault exception with the HTTP status code 500.

NotFound ( string source, ushort code, string description ) : HttpResponseException

Creates a fault exception with the HTTP status code 404.

ServiceUnavailable ( string source, ushort code, string description ) : HttpResponseException

Creates a fault exception with the HTTP status code 503.

Unauthorized ( string source, ushort code, string description ) : HttpResponseException

Creates a fault exception with the HTTP status code 401.

Приватные методы

Метод Описание
Create ( HttpStatusCode statusCode, ServiceFaultContract fault ) : HttpResponseException
Create ( HttpStatusCode statusCode, string source, ushort code, string description ) : HttpResponseException

Описание методов

BadRequest() публичный статический Метод

Creates a fault exception with the HTTP status code 400.
public static BadRequest ( string source, ushort code, string description ) : HttpResponseException
source string The source of the fault.
code ushort The code of the fault.
description string A human-readable description of what went wrong.
Результат HttpResponseException

Forbidden() публичный статический Метод

Creates a fault exception with the HTTP status code 403.
public static Forbidden ( string source, ushort code, string description ) : HttpResponseException
source string The source of the fault.
code ushort The code of the fault.
description string A human-readable description of what went wrong.
Результат HttpResponseException

InternalServerError() публичный статический Метод

Creates a fault exception with the HTTP status code 500.
public static InternalServerError ( string source, ushort code, string description ) : HttpResponseException
source string The source of the fault.
code ushort The code of the fault.
description string A human-readable description of what went wrong.
Результат HttpResponseException

NotFound() публичный статический Метод

Creates a fault exception with the HTTP status code 404.
public static NotFound ( string source, ushort code, string description ) : HttpResponseException
source string The source of the fault.
code ushort The code of the fault.
description string A human-readable description of what went wrong.
Результат HttpResponseException

ServiceUnavailable() публичный статический Метод

Creates a fault exception with the HTTP status code 503.
public static ServiceUnavailable ( string source, ushort code, string description ) : HttpResponseException
source string The source of the fault.
code ushort The code of the fault.
description string A human-readable description of what went wrong.
Результат HttpResponseException

Unauthorized() публичный статический Метод

Creates a fault exception with the HTTP status code 401.
public static Unauthorized ( string source, ushort code, string description ) : HttpResponseException
source string The source of the fault.
code ushort The code of the fault.
description string A human-readable description of what went wrong.
Результат HttpResponseException