Example #1
0
 /// <summary>
 /// Creates a new AsyncUnaryCall object with the specified properties.
 /// </summary>
 /// <param name="responseAsync">The response of the asynchronous call.</param>
 /// <param name="responseHeadersAsync">Response headers of the asynchronous call.</param>
 /// <param name="getStatusFunc">Delegate returning the status of the call.</param>
 /// <param name="getTrailersFunc">Delegate returning the trailing metadata of the call.</param>
 /// <param name="disposeAction">Delegate to invoke when Dispose is called on the call object.</param>
 public AsyncUnaryCall(Task <TResponse> responseAsync,
                       Task <Metadata> responseHeadersAsync,
                       Func <Status> getStatusFunc,
                       Func <Metadata> getTrailersFunc,
                       Action disposeAction)
 {
     this.responseAsync = responseAsync;
     this.callState     = new AsyncCallState(responseHeadersAsync, getStatusFunc, getTrailersFunc, disposeAction);
 }
 /// <summary>
 /// Creates a new AsyncDuplexStreamingCall object with the specified properties.
 /// </summary>
 /// <param name="responseStream">Stream of response values.</param>
 /// <param name="responseHeadersAsync">Response headers of the asynchronous call.</param>
 /// <param name="getStatusFunc">Delegate returning the status of the call.</param>
 /// <param name="getTrailersFunc">Delegate returning the trailing metadata of the call.</param>
 /// <param name="disposeAction">Delegate to invoke when Dispose is called on the call object.</param>
 public AsyncServerStreamingCall(IAsyncStreamReader <TResponse> responseStream,
                                 Task <Metadata> responseHeadersAsync,
                                 Func <Status> getStatusFunc,
                                 Func <Metadata> getTrailersFunc,
                                 Action disposeAction)
 {
     this.responseStream = responseStream;
     this.callState      = new AsyncCallState(responseHeadersAsync, getStatusFunc, getTrailersFunc, disposeAction);
 }
Example #3
0
 /// <summary>
 /// Creates a new AsyncUnaryCall object with the specified properties.
 /// </summary>
 /// <param name="responseAsync">The response of the asynchronous call.</param>
 /// <param name="responseHeadersAsync">Response headers of the asynchronous call.</param>
 /// <param name="getStatusFunc">Delegate returning the status of the call.</param>
 /// <param name="getTrailersFunc">Delegate returning the trailing metadata of the call.</param>
 /// <param name="disposeAction">Delegate to invoke when Dispose is called on the call object.</param>
 /// <param name="state">State object for use with the callback parameters.</param>
 public AsyncUnaryCall(Task <TResponse> responseAsync,
                       Func <object, Task <Metadata> > responseHeadersAsync,
                       Func <object, Status> getStatusFunc,
                       Func <object, Metadata> getTrailersFunc,
                       Action <object> disposeAction,
                       object state)
 {
     this.responseAsync = responseAsync;
     callState          = new AsyncCallState(responseHeadersAsync, getStatusFunc, getTrailersFunc, disposeAction, state);
 }
 /// <summary>
 /// Creates a new AsyncDuplexStreamingCall object with the specified properties.
 /// </summary>
 /// <param name="responseStream">Stream of response values.</param>
 /// <param name="responseHeadersAsync">Response headers of the asynchronous call.</param>
 /// <param name="getStatusFunc">Delegate returning the status of the call.</param>
 /// <param name="getTrailersFunc">Delegate returning the trailing metadata of the call.</param>
 /// <param name="disposeAction">Delegate to invoke when Dispose is called on the call object.</param>
 /// <param name="state">State object for use with the callback parameters.</param>
 public AsyncServerStreamingCall(IAsyncStreamReader <TResponse> responseStream,
                                 Func <object, Task <Metadata> > responseHeadersAsync,
                                 Func <object, Status> getStatusFunc,
                                 Func <object, Metadata> getTrailersFunc,
                                 Action <object> disposeAction,
                                 object state)
 {
     this.responseStream = responseStream;
     this.callState      = new AsyncCallState(responseHeadersAsync, getStatusFunc, getTrailersFunc, disposeAction, state);
 }
 /// <summary>
 /// Creates a new AsyncClientStreamingCall object with the specified properties.
 /// </summary>
 /// <param name="requestStream">Stream of request values.</param>
 /// <param name="responseAsync">The response of the asynchronous call.</param>
 /// <param name="responseHeadersAsync">Response headers of the asynchronous call.</param>
 /// <param name="getStatusFunc">Delegate returning the status of the call.</param>
 /// <param name="getTrailersFunc">Delegate returning the trailing metadata of the call.</param>
 /// <param name="disposeAction">Delegate to invoke when Dispose is called on the call object.</param>
 public AsyncClientStreamingCall(IClientStreamWriter <TRequest> requestStream,
                                 Task <TResponse> responseAsync,
                                 Task <Metadata> responseHeadersAsync,
                                 Func <Status> getStatusFunc,
                                 Func <Metadata> getTrailersFunc,
                                 Action disposeAction)
 {
     this.requestStream = requestStream;
     this.responseAsync = responseAsync;
     this.callState     = new AsyncCallState(responseHeadersAsync, getStatusFunc, getTrailersFunc, disposeAction);
 }