Базовый класс сервисов по работе с документами.
Inheritance
System.Object
DocumentHttpServiceBase
Namespace:InfinniPlatform.DocumentStorage
Assembly:InfinniPlatform.DocumentStorage.HttpService.dll
public abstract class DocumentHttpServiceBase : object, IHttpService
Constructors
|
Improve this Doc
View Source
Declaration
protected DocumentHttpServiceBase(IPerformanceLogger perfLogger, ILogger logger)
Parameters
Properties
|
Improve this Doc
View Source
Разрешено ли удаление документов.
Declaration
public bool CanDelete { get; protected set; }
Property Value
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
Разрешено ли получение документов.
Declaration
public bool CanGet { get; protected set; }
Property Value
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
CanPost
Разрешено ли сохранение документов.
Declaration
public bool CanPost { get; protected set; }
Property Value
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
Declaration
public string DocumentType { get; protected set; }
Property Value
Type |
Description |
System.String |
|
Methods
|
Improve this Doc
View Source
Обрабатывает запрос на удаление документа.
Declaration
protected abstract Task<object> Delete(IHttpRequest request)
Parameters
Returns
Type |
Description |
Task<System.Object> |
|
|
Improve this Doc
View Source
Обрабатывает запрос на получение документов.
Declaration
protected abstract Task<object> Get(IHttpRequest request)
Parameters
Returns
Type |
Description |
Task<System.Object> |
|
|
Improve this Doc
View Source
Загружает настройки сервиса по работе с документами.
Declaration
protected abstract void Load(IHttpServiceBuilder builder)
Parameters
|
Improve this Doc
View Source
Post(IHttpRequest)
Обрабатывает запрос на сохранение документа.
Declaration
protected abstract Task<object> Post(IHttpRequest request)
Parameters
Returns
Type |
Description |
Task<System.Object> |
|
|
Improve this Doc
View Source
Обрабатывает запрос с использованием указанных правил.
Declaration
protected Task<object> ProcessRequestAsync<TQuery, TResult>(IHttpRequest request, Func<IHttpRequest, TQuery> queryFunc, Func<TQuery, Task<TResult>> handlerFunc, Func<TQuery, Task<TResult>> onBefore, Func<TQuery, TResult, Exception, Task> onAfter, Func<Exception, string> onError)where TResult : DocumentQueryResult
Parameters
Type |
Name |
Description |
IHttpRequest |
request |
|
Func<IHttpRequest, TQuery> |
queryFunc |
|
Func<TQuery, Task<TResult>> |
handlerFunc |
|
Func<TQuery, Task<TResult>> |
onBefore |
|
Func<TQuery, TResult, Exception, Task> |
onAfter |
|
Func<Exception, System.String> |
onError |
|
Returns
Type |
Description |
Task<System.Object> |
|
Type Parameters
Name |
Description |
TQuery |
|
TResult |
|
Extension Methods