Class DocumentHttpServiceHandler<TDocument>
Обработчик по умолчанию для сервиса по работе с документами.
Inheritance
Namespace:InfinniPlatform.DocumentStorage
Assembly:InfinniPlatform.DocumentStorage.HttpService.dll
Syntax
public class DocumentHttpServiceHandler<TDocument> : object, IDocumentHttpServiceHandler<TDocument>, IDocumentHttpServiceHandlerBase where TDocument : Document
Type Parameters
Name | Description |
---|---|
TDocument | Тип документа. |
Constructors
| Improve this Doc View SourceDocumentHttpServiceHandler(String)
Declaration
public DocumentHttpServiceHandler(string documentType = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | documentType |
Properties
| Improve this Doc View SourceAsSystem
Работать с системными документами.
Declaration
public bool AsSystem { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
Implements
| Improve this Doc View SourceCanDelete
Разрешено ли удаление документов.
Declaration
public virtual bool CanDelete { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
Implements
| Improve this Doc View SourceCanGet
Разрешено ли получение документов.
Declaration
public virtual bool CanGet { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
Implements
| Improve this Doc View SourceCanPost
Разрешено ли сохранение документов.
Declaration
public virtual bool CanPost { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
Implements
| Improve this Doc View SourceDocumentType
Имя типа документа.
Declaration
public string DocumentType { get; }
Property Value
Type | Description |
---|---|
System.String |
Implements
Methods
| Improve this Doc View SourceLoad(IHttpServiceBuilder)
Загружает модуль.
Declaration
public virtual void Load(IHttpServiceBuilder builder)
Parameters
Type | Name | Description |
---|---|---|
IHttpServiceBuilder | builder | Регистратор обработчиков запросов. |
Implements
| Improve this Doc View SourceOnAfterDelete(DocumentDeleteQuery<TDocument>, DocumentDeleteQueryResult, Exception)
Вызывается после удаления документов.
Declaration
public virtual Task OnAfterDelete(DocumentDeleteQuery<TDocument> query, DocumentDeleteQueryResult result, Exception exception)
Parameters
Type | Name | Description |
---|---|---|
DocumentDeleteQuery<TDocument> | query | Запрос на удаление документа. |
DocumentDeleteQueryResult | result | Результат обработки запроса. |
Exception | exception | Исключение обработки запроса. |
Returns
Type | Description |
---|---|
Task |
Implements
| Improve this Doc View SourceOnAfterGet(DocumentGetQuery<TDocument>, DocumentGetQueryResult, Exception)
Вызывается после получения документов.
Declaration
public virtual Task OnAfterGet(DocumentGetQuery<TDocument> query, DocumentGetQueryResult result, Exception exception)
Parameters
Type | Name | Description |
---|---|---|
DocumentGetQuery<TDocument> | query | Запрос на получение документов. |
DocumentGetQueryResult | result | Результат обработки запроса. |
Exception | exception | Исключение обработки запроса. |
Returns
Type | Description |
---|---|
Task |
Implements
| Improve this Doc View SourceOnAfterPost(DocumentPostQuery<TDocument>, DocumentPostQueryResult, Exception)
Вызывается после сохранения документов.
Declaration
public virtual Task OnAfterPost(DocumentPostQuery<TDocument> query, DocumentPostQueryResult result, Exception exception)
Parameters
Type | Name | Description |
---|---|---|
DocumentPostQuery<TDocument> | query | Запрос на сохранение документа. |
DocumentPostQueryResult | result | Результат обработки запроса. |
Exception | exception | Исключение обработки запроса. |
Returns
Type | Description |
---|---|
Task |
Implements
| Improve this Doc View SourceOnBeforeDelete(DocumentDeleteQuery<TDocument>)
Вызывается перед удалением документов.
Declaration
public virtual Task<DocumentDeleteQueryResult> OnBeforeDelete(DocumentDeleteQuery<TDocument> query)
Parameters
Type | Name | Description |
---|---|---|
DocumentDeleteQuery<TDocument> | query |
Returns
Type | Description |
---|---|
Task<DocumentDeleteQueryResult> | Результат обработки запроса или |
Implements
| Improve this Doc View SourceOnBeforeGet(DocumentGetQuery<TDocument>)
Вызывается перед получением документов.
Declaration
public virtual Task<DocumentGetQueryResult> OnBeforeGet(DocumentGetQuery<TDocument> query)
Parameters
Type | Name | Description |
---|---|---|
DocumentGetQuery<TDocument> | query | Запрос на получение документов. |
Returns
Type | Description |
---|---|
Task<DocumentGetQueryResult> | Результат обработки запроса или |
Implements
| Improve this Doc View SourceOnBeforePost(DocumentPostQuery<TDocument>)
Вызывается перед сохранением документов.
Declaration
public virtual Task<DocumentPostQueryResult> OnBeforePost(DocumentPostQuery<TDocument> query)
Parameters
Type | Name | Description |
---|---|---|
DocumentPostQuery<TDocument> | query | Запрос на сохранение документа. |
Returns
Type | Description |
---|---|
Task<DocumentPostQueryResult> | Результат обработки запроса или |
Implements
| Improve this Doc View SourceOnError(Exception)
Обрабатывает исключение.
Declaration
public string OnError(Exception exception)
Parameters
Type | Name | Description |
---|---|---|
Exception | exception | Исключение. |
Returns
Type | Description |
---|---|
System.String | Сообщение об ошибке. |