Пример #1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="RequestMulti"/> class.
 /// </summary>
 /// <param name="request">The request to wrap</param>
 /// <param name="context">Context associated with the request</param>
 /// <param name="callback">Callback to invoke when the request is completed</param>
 internal RequestMulti(
     RequestDefinitions.RequestMulti request,
     object context,
     OpsResultCallbackDelegate callback)
     : base(request, BackendRequest.Wrap(request.Requests), context, callback)
 {
 }
Пример #2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="BackendCompoundRequest{R}"/> class.
 /// </summary>
 /// <param name="request">The compound request to wrap</param>
 /// <param name="wrappedRequests">The wrapped requests</param>
 /// <param name="context">Context associated with the request</param>
 /// <param name="callback">Callback to invoke when the request is completed</param>
 public BackendCompoundRequest(
     TRequest request,
     IReadOnlyList <IRingMasterBackendRequest> wrappedRequests,
     object context,
     OpsResultCallbackDelegate callback)
     : base(request, context)
 {
     this.callback = callback;
     this.Requests = wrappedRequests;
 }
Пример #3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="RequestMulti"/> class.
 /// </summary>
 /// <param name="requests">The requests to execute</param>
 /// <param name="context">Context associated with the request</param>
 /// <param name="callback">Callback to invoke when the request is completed</param>
 /// <param name="completeSynchronously">If true, the multi will invoke cb only after the operations have been replicated locally.</param>
 /// <param name="uid">Optional unique id to assign to the request</param>
 public RequestMulti(
     IRingMasterBackendRequest[] requests,
     object context,
     OpsResultCallbackDelegate callback,
     bool completeSynchronously = false,
     ulong uid = 0)
     : this(
         new RequestDefinitions.RequestMulti(requests, completeSynchronously, null, MakeUid(uid)),
         context,
         callback)
 {
 }
Пример #4
0
 /// <summary>
 /// Initializes a new instance of the <see cref="RequestMulti"/> class.
 /// </summary>
 /// <param name="operations">The operations to execute</param>
 /// <param name="context">Context associated with the request</param>
 /// <param name="callback">Callback to invoke when the request is completed</param>
 /// <param name="completeSynchronously">If true, the multi will invoke cb only after the operations have been replicated locally.</param>
 /// <param name="uid">Optional unique id to assign to the request</param>
 public RequestMulti(
     IReadOnlyList <Op> operations,
     object context,
     OpsResultCallbackDelegate callback,
     bool completeSynchronously = false,
     ulong uid = 0)
     : this(
         new RequestDefinitions.RequestMulti(operations, completeSynchronously, MakeUid(uid)),
         context,
         callback)
 {
 }