Interface IDocumentStorageInterceptor<TDocument>
Обработчик событий изменения документов в хранилище.
Inherited Members
Namespace:InfinniPlatform.DocumentStorage.Interceptors
Assembly:InfinniPlatform.DocumentStorage.Abstractions.dll
Syntax
public interface IDocumentStorageInterceptor<TDocument> : IDocumentStorageInterceptor
Type Parameters
Name | Description |
---|---|
TDocument |
Methods
| Improve this Doc View SourceOnAfterBulk(DocumentBulkCommand<TDocument>, DocumentStorageWriteResult<DocumentBulkResult>, Exception)
Вызывается после выполнения набора команд изменения документов в рамках одного запроса к хранилищу.
Declaration
void OnAfterBulk(DocumentBulkCommand<TDocument> command, DocumentStorageWriteResult<DocumentBulkResult> result, Exception exception)
Parameters
Type | Name | Description |
---|---|---|
DocumentBulkCommand<TDocument> | command | Набор команд изменения документов. |
DocumentStorageWriteResult<DocumentBulkResult> | result | Результат выполнения набора команд изменения документов. |
Exception | exception | Исключение, возникшее при выполнении команды. |
OnAfterDeleteMany(DocumentDeleteManyCommand<TDocument>, DocumentStorageWriteResult<Int64>, Exception)
Вызывается после удаления набора документов из хранилища.
Declaration
void OnAfterDeleteMany(DocumentDeleteManyCommand<TDocument> command, DocumentStorageWriteResult<long> result, Exception exception)
Parameters
Type | Name | Description |
---|---|---|
DocumentDeleteManyCommand<TDocument> | command | Команда удаления набора документов. |
DocumentStorageWriteResult<System.Int64> | result | Результат выполнения команды удаления набора документов. |
Exception | exception | Исключение, возникшее при выполнении команды. |
OnAfterDeleteOne(DocumentDeleteOneCommand<TDocument>, DocumentStorageWriteResult<Int64>, Exception)
Вызывается после удаления одного документа из хранилища.
Declaration
void OnAfterDeleteOne(DocumentDeleteOneCommand<TDocument> command, DocumentStorageWriteResult<long> result, Exception exception)
Parameters
Type | Name | Description |
---|---|---|
DocumentDeleteOneCommand<TDocument> | command | Команда удаления одного документа. |
DocumentStorageWriteResult<System.Int64> | result | Результат выполнения команды удаления одного документа. |
Exception | exception | Исключение, возникшее при выполнении команды. |
OnAfterInsertMany(DocumentInsertManyCommand<TDocument>, DocumentStorageWriteResult<Object>, Exception)
Вызывается после вставки набора документов в хранилище.
Declaration
void OnAfterInsertMany(DocumentInsertManyCommand<TDocument> command, DocumentStorageWriteResult<object> result, Exception exception)
Parameters
Type | Name | Description |
---|---|---|
DocumentInsertManyCommand<TDocument> | command | Команда вставки набора документов. |
DocumentStorageWriteResult<System.Object> | result | Результат вставки набора документов. |
Exception | exception | Исключение, возникшее при выполнении команды. |
OnAfterInsertOne(DocumentInsertOneCommand<TDocument>, DocumentStorageWriteResult<Object>, Exception)
Вызывается после вставки одного документа в хранилище.
Declaration
void OnAfterInsertOne(DocumentInsertOneCommand<TDocument> command, DocumentStorageWriteResult<object> result, Exception exception)
Parameters
Type | Name | Description |
---|---|---|
DocumentInsertOneCommand<TDocument> | command | Команда вставки одного документа. |
DocumentStorageWriteResult<System.Object> | result | Результат вставки одного документа. |
Exception | exception | Исключение, возникшее при выполнении команды. |
OnAfterReplaceOne(DocumentReplaceOneCommand<TDocument>, DocumentStorageWriteResult<DocumentUpdateResult>, Exception)
Вызывается после замены одного документа в хранилище.
Declaration
void OnAfterReplaceOne(DocumentReplaceOneCommand<TDocument> command, DocumentStorageWriteResult<DocumentUpdateResult> result, Exception exception)
Parameters
Type | Name | Description |
---|---|---|
DocumentReplaceOneCommand<TDocument> | command | Команда замены одного документа. |
DocumentStorageWriteResult<DocumentUpdateResult> | result | Результат выполнения команды замены одного документа. |
Exception | exception | Исключение, возникшее при выполнении команды. |
OnAfterUpdateMany(DocumentUpdateManyCommand<TDocument>, DocumentStorageWriteResult<DocumentUpdateResult>, Exception)
Вызывается после обновления набора документов в хранилище.
Declaration
void OnAfterUpdateMany(DocumentUpdateManyCommand<TDocument> command, DocumentStorageWriteResult<DocumentUpdateResult> result, Exception exception)
Parameters
Type | Name | Description |
---|---|---|
DocumentUpdateManyCommand<TDocument> | command | Команда обновления набора документов. |
DocumentStorageWriteResult<DocumentUpdateResult> | result | Результат выполнения команды обновления набора документов. |
Exception | exception | Исключение, возникшее при выполнении команды. |
OnAfterUpdateOne(DocumentUpdateOneCommand<TDocument>, DocumentStorageWriteResult<DocumentUpdateResult>, Exception)
Вызывается после вставки набора документов в хранилище.
Declaration
void OnAfterUpdateOne(DocumentUpdateOneCommand<TDocument> command, DocumentStorageWriteResult<DocumentUpdateResult> result, Exception exception)
Parameters
Type | Name | Description |
---|---|---|
DocumentUpdateOneCommand<TDocument> | command | Команда обновления одного документа. |
DocumentStorageWriteResult<DocumentUpdateResult> | result | Результат выполнения команды обновления документа. |
Exception | exception | Исключение, возникшее при выполнении команды. |
OnBeforeBulk(DocumentBulkCommand<TDocument>)
Вызывается перед выполнением набора команд изменения документов в рамках одного запроса к хранилищу.
Declaration
DocumentStorageWriteResult<DocumentBulkResult> OnBeforeBulk(DocumentBulkCommand<TDocument> command)
Parameters
Type | Name | Description |
---|---|---|
DocumentBulkCommand<TDocument> | command | Набор команд изменения документов. |
Returns
Type | Description |
---|---|
DocumentStorageWriteResult<DocumentBulkResult> | Результат выполнения набора команд изменения документов. |
OnBeforeDeleteMany(DocumentDeleteManyCommand<TDocument>)
Вызывается перед удалением набора документов из хранилища.
Declaration
DocumentStorageWriteResult<long> OnBeforeDeleteMany(DocumentDeleteManyCommand<TDocument> command)
Parameters
Type | Name | Description |
---|---|---|
DocumentDeleteManyCommand<TDocument> | command | Команда удаления набора документов. |
Returns
Type | Description |
---|---|
DocumentStorageWriteResult<System.Int64> | Результат выполнения команды удаления набора документов. |
OnBeforeDeleteOne(DocumentDeleteOneCommand<TDocument>)
Вызывается перед удалением одного документа из хранилища.
Declaration
DocumentStorageWriteResult<long> OnBeforeDeleteOne(DocumentDeleteOneCommand<TDocument> command)
Parameters
Type | Name | Description |
---|---|---|
DocumentDeleteOneCommand<TDocument> | command | Команда удаления одного документа. |
Returns
Type | Description |
---|---|
DocumentStorageWriteResult<System.Int64> | Результат выполнения команды удаления одного документа. |
OnBeforeInsertMany(DocumentInsertManyCommand<TDocument>)
Вызывается перед вставкой набора документов в хранилище.
Declaration
DocumentStorageWriteResult<object> OnBeforeInsertMany(DocumentInsertManyCommand<TDocument> command)
Parameters
Type | Name | Description |
---|---|---|
DocumentInsertManyCommand<TDocument> | command | Команда вставки набора документов. |
Returns
Type | Description |
---|---|
DocumentStorageWriteResult<System.Object> | Результат вставки набора документов. |
OnBeforeInsertOne(DocumentInsertOneCommand<TDocument>)
Вызывается перед вставкой одного документа в хранилище.
Declaration
DocumentStorageWriteResult<object> OnBeforeInsertOne(DocumentInsertOneCommand<TDocument> command)
Parameters
Type | Name | Description |
---|---|---|
DocumentInsertOneCommand<TDocument> | command | Команда вставки одного документа. |
Returns
Type | Description |
---|---|
DocumentStorageWriteResult<System.Object> | Результат вставки одного документа. |
OnBeforeReplaceOne(DocumentReplaceOneCommand<TDocument>)
Вызывается перед заменой одного документа в хранилище.
Declaration
DocumentStorageWriteResult<DocumentUpdateResult> OnBeforeReplaceOne(DocumentReplaceOneCommand<TDocument> command)
Parameters
Type | Name | Description |
---|---|---|
DocumentReplaceOneCommand<TDocument> | command | Команда замены одного документа. |
Returns
Type | Description |
---|---|
DocumentStorageWriteResult<DocumentUpdateResult> | Результат выполнения команды замены одного документа. |
OnBeforeUpdateMany(DocumentUpdateManyCommand<TDocument>)
Вызывается перед обновлением набора документов в хранилище.
Declaration
DocumentStorageWriteResult<DocumentUpdateResult> OnBeforeUpdateMany(DocumentUpdateManyCommand<TDocument> command)
Parameters
Type | Name | Description |
---|---|---|
DocumentUpdateManyCommand<TDocument> | command | Команда обновления набора документов. |
Returns
Type | Description |
---|---|
DocumentStorageWriteResult<DocumentUpdateResult> | Результат выполнения команды обновления набора документов. |
OnBeforeUpdateOne(DocumentUpdateOneCommand<TDocument>)
Вызывается перед вставкой набора документов в хранилище.
Declaration
DocumentStorageWriteResult<DocumentUpdateResult> OnBeforeUpdateOne(DocumentUpdateOneCommand<TDocument> command)
Parameters
Type | Name | Description |
---|---|---|
DocumentUpdateOneCommand<TDocument> | command | Команда обновления одного документа. |
Returns
Type | Description |
---|---|
DocumentStorageWriteResult<DocumentUpdateResult> | Результат выполнения команды обновления документа. |