예제 #1
0
 public async Task <AttachmentResult> GetRevisionAsync(string documentId, string name, string changeVector, CancellationToken token = default)
 {
     using (Session.AsyncTaskHolder())
     {
         var operation = new GetAttachmentOperation(documentId, name, AttachmentType.Revision, changeVector);
         return(await Session.Operations.SendAsync(operation, sessionInfo : SessionInfo, token).ConfigureAwait(false));
     }
 }
 public async Task <AttachmentResult> GetAsync(string documentId, string name, CancellationToken token = default)
 {
     using (Session.AsyncTaskHolder())
     {
         var operation = new GetAttachmentOperation(documentId, name, AttachmentType.Document, null);
         Session.IncrementRequestCount();
         return(await Session.Operations.SendAsync(operation, sessionInfo : SessionInfo, token).ConfigureAwait(false));
     }
 }
예제 #3
0
        public AttachmentResult GetAttachment(object entity, string name)
        {
            if (DocumentsByEntity.TryGetValue(entity, out DocumentInfo document) == false)
            {
                ThrowEntityNotInSession(entity);
            }

            var operation = new GetAttachmentOperation(document.Id, name, AttachmentType.Document, null);

            return(DocumentStore.Operations.Send(operation, SessionInfo));
        }
        public async Task <AttachmentResult> GetAsync(object entity, string name)
        {
            if (DocumentsByEntity.TryGetValue(entity, out DocumentInfo document) == false)
            {
                ThrowEntityNotInSession(entity);
            }

            var operation = new GetAttachmentOperation(document.Id, name, AttachmentType.Document, null);

            return(await DocumentStore.Operations.SendAsync(operation, sessionInfo : SessionInfo).ConfigureAwait(false));
        }
        public Task <AttachmentResult> GetAsync(object entity, string name, CancellationToken token = default)
        {
            if (DocumentsByEntity.TryGetValue(entity, out DocumentInfo document) == false)
            {
                ThrowEntityNotInSessionOrMissingId(entity);
            }

            var operation = new GetAttachmentOperation(document.Id, name, AttachmentType.Document, null);

            return(Session.Operations.SendAsync(operation, sessionInfo: SessionInfo, token));
        }
        public async Task <AttachmentResult> GetAsync(object entity, string name, CancellationToken token = default)
        {
            using (Session.AsyncTaskHolder())
            {
                if (Session.DocumentsByEntity.TryGetValue(entity, out DocumentInfo document) == false)
                {
                    ThrowEntityNotInSessionOrMissingId(entity);
                }

                var operation = new GetAttachmentOperation(document.Id, name, AttachmentType.Document, null);
                Session.IncrementRequestCount();
                return(await Session.Operations.SendAsync(operation, sessionInfo : SessionInfo, token).ConfigureAwait(false));
            }
        }
예제 #7
0
        public AttachmentResult GetRevisionAttachment(string documentId, string name, string changeVector)
        {
            var operation = new GetAttachmentOperation(documentId, name, AttachmentType.Revision, changeVector);

            return(DocumentStore.Operations.Send(operation, SessionInfo));
        }
예제 #8
0
        public AttachmentResult GetAttachment(string documentId, string name)
        {
            var operation = new GetAttachmentOperation(documentId, name, AttachmentType.Document, null);

            return(DocumentStore.Operations.Send(operation, SessionInfo));
        }
        public async Task <AttachmentResult> GetRevisionAsync(string documentId, string name, string changeVector)
        {
            var operation = new GetAttachmentOperation(documentId, name, AttachmentType.Revision, changeVector);

            return(await DocumentStore.Operations.SendAsync(operation, sessionInfo : SessionInfo).ConfigureAwait(false));
        }
        public Task <AttachmentResult> GetRevisionAsync(string documentId, string name, string changeVector)
        {
            var operation = new GetAttachmentOperation(documentId, name, AttachmentType.Revision, changeVector);

            return(Session.Operations.SendAsync(operation, sessionInfo: SessionInfo));
        }
        public Task <AttachmentResult> GetAsync(string documentId, string name)
        {
            var operation = new GetAttachmentOperation(documentId, name, AttachmentType.Document, null);

            return(Session.Operations.SendAsync(operation, sessionInfo: SessionInfo));
        }