LEFT | RIGHT |
1 /* | 1 /* |
2 Copyright 2011 Google Inc | 2 Copyright 2011 Google Inc |
3 | 3 |
4 Licensed under the Apache License, Version 2.0 (the "License"); | 4 Licensed under the Apache License, Version 2.0 (the "License"); |
5 you may not use this file except in compliance with the License. | 5 you may not use this file except in compliance with the License. |
6 You may obtain a copy of the License at | 6 You may obtain a copy of the License at |
7 | 7 |
8 http://www.apache.org/licenses/LICENSE-2.0 | 8 http://www.apache.org/licenses/LICENSE-2.0 |
9 | 9 |
10 Unless required by applicable law or agreed to in writing, software | 10 Unless required by applicable law or agreed to in writing, software |
(...skipping 13 matching lines...) Expand all Loading... |
24 | 24 |
25 namespace Google.Apis.Requests | 25 namespace Google.Apis.Requests |
26 { | 26 { |
27 /// <summary> | 27 /// <summary> |
28 /// Client service request represents a specific service request with the gi
ven response type. The request supports | 28 /// Client service request represents a specific service request with the gi
ven response type. The request supports |
29 /// both sync and async execution to get the response type and also sync and
async methods to return only the· | 29 /// both sync and async execution to get the response type and also sync and
async methods to return only the· |
30 /// stream. | 30 /// stream. |
31 /// </summary> | 31 /// </summary> |
32 public interface IClientServiceRequest<TResponse> | 32 public interface IClientServiceRequest<TResponse> |
33 { | 33 { |
34 /// <summary> Gets the service which is related to this request.</summar
y> | 34 /// <summary>Gets the service which is related to this request.</summary
> |
35 IClientService Service { get; } | 35 IClientService Service { get; } |
36 | 36 |
37 /// <summary> Gets the name of the method to which this request belongs.
</summary> | 37 /// <summary>Gets the name of the method to which this request belongs.<
/summary> |
38 string MethodName { get; } | 38 string MethodName { get; } |
39 | 39 |
40 /// <summary> Gets the rest path of this request.</summary> | 40 /// <summary>Gets the rest path of this request.</summary> |
41 string RestPath { get; } | 41 string RestPath { get; } |
42 | 42 |
43 /// <summary> Gets the HTTP method of this request.</summary> | 43 /// <summary>Gets the HTTP method of this request.</summary> |
44 string HttpMethod { get; } | 44 string HttpMethod { get; } |
45 | 45 |
46 /// <summary> Gets the parameters information for this specific request.
</summary> | 46 /// <summary>Gets the parameters information for this specific request.<
/summary> |
47 IDictionary<string, IParameter> RequestParameters { get; } | 47 IDictionary<string, IParameter> RequestParameters { get; } |
48 | 48 |
49 /// <summary> Executes the request asynchronously and returns the result
stream.</summary> | 49 /// <summary>Executes the request asynchronously and returns the result
stream.</summary> |
50 Task<Stream> ExecuteAsStreamAsync(); | 50 Task<Stream> ExecuteAsStreamAsync(); |
51 | 51 |
52 /// <summary> Executes the request asynchronously and returns the result
stream.</summary> | 52 /// <summary>Executes the request asynchronously and returns the result
stream.</summary> |
53 /// <param name="cencellationToken">A cancellation token for canceling t
he request in the middle of the· | 53 /// <param name="cencellationToken">A cancellation token for canceling t
he request in the middle of the· |
54 /// execution. operation.</param> | 54 /// execution. operation.</param> |
55 Task<Stream> ExecuteAsStreamAsync(CancellationToken cencellationToken); | 55 Task<Stream> ExecuteAsStreamAsync(CancellationToken cencellationToken); |
56 | 56 |
57 /// <summary> Executes the request and returns the result stream.</summa
ry> | 57 /// <summary>Executes the request and returns the result stream.</summar
y> |
58 Stream ExecuteAsStream(); | 58 Stream ExecuteAsStream(); |
59 | 59 |
60 /// <summary> Executes the request asynchronously and returns the result
object.</summary> | 60 /// <summary>Executes the request asynchronously and returns the result
object.</summary> |
61 Task<TResponse> ExecuteAsync(); | 61 Task<TResponse> ExecuteAsync(); |
62 | 62 |
63 /// <summary> Executes the request asynchronously and returns the result
object.</summary> | 63 /// <summary>Executes the request asynchronously and returns the result
object.</summary> |
64 /// <param name="cencellationToken">A cancellation token for cancelling
the request in the middle of execution. | 64 /// <param name="cencellationToken">A cancellation token for cancelling
the request in the middle of execution. |
65 /// </param> | 65 /// </param> |
66 Task<TResponse> ExecuteAsync(CancellationToken cencellationToken); | 66 Task<TResponse> ExecuteAsync(CancellationToken cencellationToken); |
67 | 67 |
68 /// <summary> Executes the request and returns the result object.</summa
ry> | 68 /// <summary>Executes the request and returns the result object.</summar
y> |
69 TResponse Execute(); | 69 TResponse Execute(); |
70 } | 70 } |
71 } | 71 } |
LEFT | RIGHT |