Class SequentialWriteOneReadManyDocumentStore
An implementation of IDocumentStore that reads from many IDocumentStores but writes to only one of them.
public class SequentialWriteOneReadManyDocumentStore : IDocumentStore
- Inheritance
-
SequentialWriteOneReadManyDocumentStore
- Implements
- Inherited Members
Remarks
Reads will be sent to all provided stores in sequence and the first successful result returned.
Constructors
SequentialWriteOneReadManyDocumentStore(IDocumentStore, IEnumerable<IDocumentStore>)
An implementation of IDocumentStore that reads from many IDocumentStores but writes to only one of them.
public SequentialWriteOneReadManyDocumentStore(IDocumentStore readWriteDocumentStore, IEnumerable<IDocumentStore> readOnlyDocumentStores)
Parameters
readWriteDocumentStoreIDocumentStorereadOnlyDocumentStoresIEnumerable<IDocumentStore>
Remarks
Reads will be sent to all provided stores in sequence and the first successful result returned.
Methods
AddAccessRules(CallbackEnvironment, IServices, params IReadOnlyList<NewAccessRule>)
public Task AddAccessRules(CallbackEnvironment environment, IServices services, params IReadOnlyList<NewAccessRule> newRules)
Parameters
environmentCallbackEnvironmentservicesIServicesnewRulesIReadOnlyList<NewAccessRule>
Returns
GetDocumentData(CallbackEnvironment, IServices, Guid, DocumentAccessAssertion)
public Task<Stream?> GetDocumentData(CallbackEnvironment environment, IServices services, Guid id, DocumentAccessAssertion access)
Parameters
environmentCallbackEnvironmentservicesIServicesidGuidaccessDocumentAccessAssertion
Returns
GetFileMetadata(CallbackEnvironment, IServices, Guid, DocumentAccessAssertion)
public Task<FileMetadata?> GetFileMetadata(CallbackEnvironment environment, IServices services, Guid id, DocumentAccessAssertion access)
Parameters
environmentCallbackEnvironmentservicesIServicesidGuidaccessDocumentAccessAssertion
Returns
GetImageMetadata(CallbackEnvironment, IServices, Guid, DocumentAccessAssertion)
public Task<ImageMetadata?> GetImageMetadata(CallbackEnvironment environment, IServices services, Guid id, DocumentAccessAssertion access)
Parameters
environmentCallbackEnvironmentservicesIServicesidGuidaccessDocumentAccessAssertion
Returns
PutFile(CallbackEnvironment, IServices, Stream, string, string, DocumentAccessRule, IProgress<long>?)
public Task<Guid> PutFile(CallbackEnvironment environment, IServices services, Stream data, string originalFilename, string mimeType, DocumentAccessRule rule, IProgress<long>? progress = null)
Parameters
environmentCallbackEnvironmentservicesIServicesdataStreamoriginalFilenamestringmimeTypestringruleDocumentAccessRuleprogressIProgress<long>
Returns
PutImage(CallbackEnvironment, IServices, Stream, string, string, int, int, Guid?, DocumentAccessAssertion?, DocumentAccessRule, IProgress<long>?)
public Task<Guid> PutImage(CallbackEnvironment environment, IServices services, Stream data, string originalFilename, string mimeType, int width, int height, Guid? thumbnailFor, DocumentAccessAssertion? thumbnailAccess, DocumentAccessRule rule, IProgress<long>? progress = null)
Parameters
environmentCallbackEnvironmentservicesIServicesdataStreamoriginalFilenamestringmimeTypestringwidthintheightintthumbnailForGuid?thumbnailAccessDocumentAccessAssertionruleDocumentAccessRuleprogressIProgress<long>