Show / Hide Table of Contents

Interface IUnitOfWork

Предоставляет интерфейс, реализующий шаблон "Единица работы" ("Unit of Work").

Namespace:InfinniPlatform.DocumentStorage.Transactions
Assembly:InfinniPlatform.DocumentStorage.Abstractions.dll
Syntax
public interface IUnitOfWork : IDisposable
Remarks

http://martinfowler.com/eaaCatalog/unitOfWork.html

Methods

| Improve this Doc View Source

Commit(Boolean)

Подтверждает все действия.

Declaration
void Commit(bool isOrdered = false)
Parameters
Type Name Description
System.Boolean isOrdered

Обязательно ли выполнять команды по порядку.

| Improve this Doc View Source

CommitAsync(Boolean)

Подтверждает все действия.

Declaration
Task CommitAsync(bool isOrdered = false)
Parameters
Type Name Description
System.Boolean isOrdered

Обязательно ли выполнять команды по порядку.

Returns
Type Description
Task
| Improve this Doc View Source

DeleteMany(String, Func<IDocumentFilterBuilder, Object>)

Удаляет все документы, удовлетворяющие указанному фильтру.

Declaration
void DeleteMany(string documentType, Func<IDocumentFilterBuilder, object> filter = null)
Parameters
Type Name Description
System.String documentType

Имя типа документа.

Func<IDocumentFilterBuilder, System.Object> filter

Фильтр для поиска документов.

| Improve this Doc View Source

DeleteMany<TDocument>(Expression<Func<TDocument, Boolean>>)

Удаляет все документы, удовлетворяющие указанному фильтру.

Declaration
void DeleteMany<TDocument>(Expression<Func<TDocument, bool>> filter = null)where TDocument : Document
Parameters
Type Name Description
Expression<Func<TDocument, System.Boolean>> filter

Фильтр для поиска документов.

Type Parameters
Name Description
TDocument

Тип документа.

| Improve this Doc View Source

DeleteMany<TDocument>(String, Expression<Func<TDocument, Boolean>>)

Удаляет все документы, удовлетворяющие указанному фильтру.

Declaration
void DeleteMany<TDocument>(string documentType, Expression<Func<TDocument, bool>> filter = null)where TDocument : Document
Parameters
Type Name Description
System.String documentType

Имя типа документа.

Expression<Func<TDocument, System.Boolean>> filter

Фильтр для поиска документов.

Type Parameters
Name Description
TDocument

Тип документа.

| Improve this Doc View Source

DeleteOne(String, Func<IDocumentFilterBuilder, Object>)

Удаляет первый найденный документ, удовлетворяющий указанному фильтру.

Declaration
void DeleteOne(string documentType, Func<IDocumentFilterBuilder, object> filter = null)
Parameters
Type Name Description
System.String documentType

Имя типа документа.

Func<IDocumentFilterBuilder, System.Object> filter

Фильтр для поиска документов.

| Improve this Doc View Source

DeleteOne<TDocument>(Expression<Func<TDocument, Boolean>>)

Удаляет первый найденный документ, удовлетворяющий указанному фильтру.

Declaration
void DeleteOne<TDocument>(Expression<Func<TDocument, bool>> filter = null)where TDocument : Document
Parameters
Type Name Description
Expression<Func<TDocument, System.Boolean>> filter

Фильтр для поиска документов.

Type Parameters
Name Description
TDocument

Тип документа.

| Improve this Doc View Source

DeleteOne<TDocument>(String, Expression<Func<TDocument, Boolean>>)

Удаляет первый найденный документ, удовлетворяющий указанному фильтру.

Declaration
void DeleteOne<TDocument>(string documentType, Expression<Func<TDocument, bool>> filter = null)where TDocument : Document
Parameters
Type Name Description
System.String documentType

Имя типа документа.

Expression<Func<TDocument, System.Boolean>> filter

Фильтр для поиска документов.

Type Parameters
Name Description
TDocument

Тип документа.

| Improve this Doc View Source

InsertMany(String, IEnumerable<DynamicDocument>)

Вставляет набор документов хранилище или возвращает исключение, если хранилище уже содержит один из указанных документов.

Declaration
void InsertMany(string documentType, IEnumerable<DynamicDocument> documents)
Parameters
Type Name Description
System.String documentType

Имя типа документа.

IEnumerable<DynamicDocument> documents

Список документов для вставки.

Exceptions
Type Condition
DocumentStorageWriteException
| Improve this Doc View Source

InsertMany<TDocument>(IEnumerable<TDocument>)

Вставляет набор документов хранилище или возвращает исключение, если хранилище уже содержит один из указанных документов.

Declaration
void InsertMany<TDocument>(IEnumerable<TDocument> documents)where TDocument : Document
Parameters
Type Name Description
IEnumerable<TDocument> documents

Список документов для вставки.

Type Parameters
Name Description
TDocument

Тип документа.

Exceptions
Type Condition
DocumentStorageWriteException
| Improve this Doc View Source

InsertMany<TDocument>(String, IEnumerable<TDocument>)

Вставляет набор документов хранилище или возвращает исключение, если хранилище уже содержит один из указанных документов.

Declaration
void InsertMany<TDocument>(string documentType, IEnumerable<TDocument> documents)where TDocument : Document
Parameters
Type Name Description
System.String documentType

Имя типа документа.

IEnumerable<TDocument> documents

Список документов для вставки.

Type Parameters
Name Description
TDocument

Тип документа.

Exceptions
Type Condition
DocumentStorageWriteException
| Improve this Doc View Source

InsertOne(String, DynamicDocument)

Вставляет один документ в хранилище или возвращает исключение, если хранилище уже содержит указанный документ.

Declaration
void InsertOne(string documentType, DynamicDocument document)
Parameters
Type Name Description
System.String documentType

Имя типа документа.

DynamicDocument document

Документ для вставки.

| Improve this Doc View Source

InsertOne<TDocument>(TDocument)

Вставляет один документ в хранилище или возвращает исключение, если хранилище уже содержит указанный документ.

Declaration
void InsertOne<TDocument>(TDocument document)where TDocument : Document
Parameters
Type Name Description
TDocument document

Документ для вставки.

Type Parameters
Name Description
TDocument

Тип документа.

| Improve this Doc View Source

InsertOne<TDocument>(String, TDocument)

Вставляет один документ в хранилище или возвращает исключение, если хранилище уже содержит указанный документ.

Declaration
void InsertOne<TDocument>(string documentType, TDocument document)where TDocument : Document
Parameters
Type Name Description
System.String documentType

Имя типа документа.

TDocument document

Документ для вставки.

Type Parameters
Name Description
TDocument

Тип документа.

| Improve this Doc View Source

ReplaceOne(String, DynamicDocument, Func<IDocumentFilterBuilder, Object>, Boolean)

Заменяет первый найденный документ, удовлетворяющий указанному фильтру.

Declaration
void ReplaceOne(string documentType, DynamicDocument replacement, Func<IDocumentFilterBuilder, object> filter = null, bool insertIfNotExists = false)
Parameters
Type Name Description
System.String documentType

Имя типа документа.

DynamicDocument replacement

Документ замены.

Func<IDocumentFilterBuilder, System.Object> filter

Фильтр для поиска документов.

System.Boolean insertIfNotExists

Следует ли создать документ, если ничего не найдено.

| Improve this Doc View Source

ReplaceOne<TDocument>(TDocument, Expression<Func<TDocument, Boolean>>, Boolean)

Заменяет первый найденный документ, удовлетворяющий указанному фильтру.

Declaration
void ReplaceOne<TDocument>(TDocument replacement, Expression<Func<TDocument, bool>> filter = null, bool insertIfNotExists = false)where TDocument : Document
Parameters
Type Name Description
TDocument replacement

Документ замены.

Expression<Func<TDocument, System.Boolean>> filter

Фильтр для поиска документов.

System.Boolean insertIfNotExists

Следует ли создать документ, если ничего не найдено.

Type Parameters
Name Description
TDocument

Тип документа.

| Improve this Doc View Source

ReplaceOne<TDocument>(String, TDocument, Expression<Func<TDocument, Boolean>>, Boolean)

Заменяет первый найденный документ, удовлетворяющий указанному фильтру.

Declaration
void ReplaceOne<TDocument>(string documentType, TDocument replacement, Expression<Func<TDocument, bool>> filter = null, bool insertIfNotExists = false)where TDocument : Document
Parameters
Type Name Description
System.String documentType

Имя типа документа.

TDocument replacement

Документ замены.

Expression<Func<TDocument, System.Boolean>> filter

Фильтр для поиска документов.

System.Boolean insertIfNotExists

Следует ли создать документ, если ничего не найдено.

Type Parameters
Name Description
TDocument

Тип документа.

| Improve this Doc View Source

UpdateMany(String, Action<IDocumentUpdateBuilder>, Func<IDocumentFilterBuilder, Object>, Boolean)

Обновляет все документы, удовлетворяющие указанному фильтру.

Declaration
void UpdateMany(string documentType, Action<IDocumentUpdateBuilder> update, Func<IDocumentFilterBuilder, object> filter = null, bool insertIfNotExists = false)
Parameters
Type Name Description
System.String documentType

Имя типа документа.

Action<IDocumentUpdateBuilder> update

Оператор обновления документов.

Func<IDocumentFilterBuilder, System.Object> filter

Фильтр для поиска документов.

System.Boolean insertIfNotExists

Следует ли создать документ, если ничего не найдено.

| Improve this Doc View Source

UpdateMany<TDocument>(Action<IDocumentUpdateBuilder<TDocument>>, Expression<Func<TDocument, Boolean>>, Boolean)

Обновляет все документы, удовлетворяющие указанному фильтру.

Declaration
void UpdateMany<TDocument>(Action<IDocumentUpdateBuilder<TDocument>> update, Expression<Func<TDocument, bool>> filter = null, bool insertIfNotExists = false)where TDocument : Document
Parameters
Type Name Description
Action<IDocumentUpdateBuilder<TDocument>> update

Оператор обновления документов.

Expression<Func<TDocument, System.Boolean>> filter

Фильтр для поиска документов.

System.Boolean insertIfNotExists

Следует ли создать документ, если ничего не найдено.

Type Parameters
Name Description
TDocument

Тип документа.

| Improve this Doc View Source

UpdateMany<TDocument>(String, Action<IDocumentUpdateBuilder<TDocument>>, Expression<Func<TDocument, Boolean>>, Boolean)

Обновляет все документы, удовлетворяющие указанному фильтру.

Declaration
void UpdateMany<TDocument>(string documentType, Action<IDocumentUpdateBuilder<TDocument>> update, Expression<Func<TDocument, bool>> filter = null, bool insertIfNotExists = false)where TDocument : Document
Parameters
Type Name Description
System.String documentType

Имя типа документа.

Action<IDocumentUpdateBuilder<TDocument>> update

Оператор обновления документов.

Expression<Func<TDocument, System.Boolean>> filter

Фильтр для поиска документов.

System.Boolean insertIfNotExists

Следует ли создать документ, если ничего не найдено.

Type Parameters
Name Description
TDocument

Тип документа.

| Improve this Doc View Source

UpdateOne(String, Action<IDocumentUpdateBuilder>, Func<IDocumentFilterBuilder, Object>, Boolean)

Обновляет первый найденный документ, удовлетворяющий указанному фильтру.

Declaration
void UpdateOne(string documentType, Action<IDocumentUpdateBuilder> update, Func<IDocumentFilterBuilder, object> filter = null, bool insertIfNotExists = false)
Parameters
Type Name Description
System.String documentType

Имя типа документа.

Action<IDocumentUpdateBuilder> update

Оператор обновления документов.

Func<IDocumentFilterBuilder, System.Object> filter

Фильтр для поиска документов.

System.Boolean insertIfNotExists

Следует ли создать документ, если ничего не найдено.

| Improve this Doc View Source

UpdateOne<TDocument>(Action<IDocumentUpdateBuilder<TDocument>>, Expression<Func<TDocument, Boolean>>, Boolean)

Обновляет первый найденный документ, удовлетворяющий указанному фильтру.

Declaration
void UpdateOne<TDocument>(Action<IDocumentUpdateBuilder<TDocument>> update, Expression<Func<TDocument, bool>> filter = null, bool insertIfNotExists = false)where TDocument : Document
Parameters
Type Name Description
Action<IDocumentUpdateBuilder<TDocument>> update

Оператор обновления документов.

Expression<Func<TDocument, System.Boolean>> filter

Фильтр для поиска документов.

System.Boolean insertIfNotExists

Следует ли создать документ, если ничего не найдено.

Type Parameters
Name Description
TDocument

Тип документа.

| Improve this Doc View Source

UpdateOne<TDocument>(String, Action<IDocumentUpdateBuilder<TDocument>>, Expression<Func<TDocument, Boolean>>, Boolean)

Обновляет первый найденный документ, удовлетворяющий указанному фильтру.

Declaration
void UpdateOne<TDocument>(string documentType, Action<IDocumentUpdateBuilder<TDocument>> update, Expression<Func<TDocument, bool>> filter = null, bool insertIfNotExists = false)where TDocument : Document
Parameters
Type Name Description
System.String documentType

Имя типа документа.

Action<IDocumentUpdateBuilder<TDocument>> update

Оператор обновления документов.

Expression<Func<TDocument, System.Boolean>> filter

Фильтр для поиска документов.

System.Boolean insertIfNotExists

Следует ли создать документ, если ничего не найдено.

Type Parameters
Name Description
TDocument

Тип документа.

Extension Methods

DocumentStorageExtensions.SaveOne(IUnitOfWork, String, DynamicDocument)
DocumentStorageExtensions.SaveOne<TDocument>(IUnitOfWork, String, TDocument)
DocumentStorageExtensions.SaveOne<TDocument>(IUnitOfWork, TDocument)
DocumentStorageExtensions.SaveMany(IUnitOfWork, String, IEnumerable<DynamicDocument>)
DocumentStorageExtensions.SaveMany<TDocument>(IUnitOfWork, String, IEnumerable<TDocument>)
DocumentStorageExtensions.SaveMany<TDocument>(IUnitOfWork, IEnumerable<TDocument>)
DynamicCollectionExtensions.GetItem(Object, Int32)
DynamicCollectionExtensions.SetItem(Object, Int32, Object)
DynamicCollectionExtensions.AddItem(Object, Object)
DynamicCollectionExtensions.InsertItem(Object, Int32, Object)
DynamicCollectionExtensions.RemoveItem(Object, Object)
DynamicCollectionExtensions.RemoveItemAt(Object, Int32)
DynamicCollectionExtensions.MoveItem(Object, Object, Int32)
DynamicObjectExtensions.TryGetPropertyValue(Object, String)
DynamicObjectExtensions.TrySetPropertyValue(Object, String, Object)
DynamicObjectExtensions.TryGetPropertyValueByPath(Object, String)
DynamicObjectExtensions.TrySetPropertyValueByPath(Object, String, Object)
ReflectionExtensions.IsInstanceOfType(Object, Type)
ReflectionExtensions.GetMemberValue(Object, String)
ReflectionExtensions.SetMemberValue(Object, String, Object)
ReflectionExtensions.InvokeMember(Object, String, Object[], out Object, Type[])
ReflectionExtensions.GetFieldValue(Object, FieldInfo)
ReflectionExtensions.SetFieldValue(Object, FieldInfo, Object)
ReflectionExtensions.GetPropertyValue(Object, PropertyInfo)
ReflectionExtensions.SetPropertyValue(Object, PropertyInfo, Object)
ReflectionExtensions.GetMethodDelegate(Object, MethodInfo)
ReflectionExtensions.GetEventDelegate(Object, EventInfo)
ReflectionExtensions.SetEventDelegate(Object, EventInfo, Object)
CommonExtensions.ExecuteSilent<T>(T, Action<T>)
  • Improve this Doc
  • View Source
Back to top © Copyright Infinnity Solutions Ltd, 2010–2017.