Ejemplo n.º 1
0
        public GetRequest CreateRequest(JsonOperationContext ctx)
        {
            GetRevisionsCommand getRevisionsCommand = _getRevisionOperation.CreateRequest();
            var sb = new StringBuilder("?");

            getRevisionsCommand.GetRequestQueryString(sb);
            return(new GetRequest {
                Method = HttpMethod.Get, Url = "/revisions", Query = sb.ToString()
            });
        }
Ejemplo n.º 2
0
            public async Task <DynamicArray> GetRevisionsForAsync(string id, int?start = null, int?pageSize = null, bool metadataOnly = false)
            {
                if (id == null)
                {
                    throw new ArgumentNullException(nameof(id));
                }

                var command = new GetRevisionsCommand(id, start, pageSize, metadataOnly);
                await RequestExecutor.ExecuteAsync(command, Context);

                return(new DynamicArray(command.Result.Results));
            }
Ejemplo n.º 3
0
 public GetRevisionOperation(InMemoryDocumentSessionOperations session, IEnumerable <string> changeVectors)
 {
     _session = session ?? throw new ArgumentNullException(nameof(session));
     _command = new GetRevisionsCommand(changeVectors.ToArray());
 }
Ejemplo n.º 4
0
 public GetRevisionOperation(InMemoryDocumentSessionOperations session, string changeVector)
 {
     _session = session ?? throw new ArgumentNullException(nameof(session));
     _command = new GetRevisionsCommand(changeVector);
 }
Ejemplo n.º 5
0
 public GetRevisionOperation(InMemoryDocumentSessionOperations session, string id, DateTime before)
 {
     _session = session ?? throw new ArgumentNullException(nameof(session));
     _command = new GetRevisionsCommand(id, before);
 }
Ejemplo n.º 6
0
 public GetRevisionOperation(InMemoryDocumentSessionOperations session, string id, int?start, int?pageSize, bool metadataOnly = false)
 {
     _session = session ?? throw new ArgumentNullException(nameof(session));
     _command = new GetRevisionsCommand(id, start, pageSize, metadataOnly);
 }
Ejemplo n.º 7
0
 public GetRevisionsResultCommand(string id, int?start, int?pageSize, ISerializationConventions serialization)
 {
     _serialization = serialization;
     _cmd           = new GetRevisionsCommand(id, start, pageSize);
 }