Left: | ||
Right: |
LEFT | RIGHT |
---|---|
1 /* | 1 /* |
2 Copyright 2010 Google Inc | 2 Copyright 2010 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 17 matching lines...) Expand all Loading... | |
28 { | 28 { |
29 /// <summary> | 29 /// <summary> |
30 /// Client service contains all the necessary information a Google service r equires.· | 30 /// Client service contains all the necessary information a Google service r equires.· |
31 /// Each concrete <seealso cref="Google.Apis.Requests.IClientServiceRequest" /> has a reference to a service for· | 31 /// Each concrete <seealso cref="Google.Apis.Requests.IClientServiceRequest" /> has a reference to a service for· |
32 /// important properties like API key, application name, base Uri, etc. | 32 /// important properties like API key, application name, base Uri, etc. |
33 /// This service interface also contains serialization methods to serialize an object to stream and deserialize a· | 33 /// This service interface also contains serialization methods to serialize an object to stream and deserialize a· |
34 /// stream into an object. | 34 /// stream into an object. |
35 /// </summary> | 35 /// </summary> |
36 public interface IClientService : IDisposable | 36 public interface IClientService : IDisposable |
37 { | 37 { |
38 /// <summary> Gets the HTTP client which is used to create requests. </s ummary> | 38 /// <summary>Gets the HTTP client which is used to create requests.</sum mary> |
class
2013/09/16 23:47:29
Odd spaces on markup, consider <summary>Gets ...
peleyal
2013/09/17 15:53:40
Done.
| |
39 ConfigurableHttpClient HttpClient { get; } | 39 ConfigurableHttpClient HttpClient { get; } |
40 | 40 |
41 /// <summary> | 41 /// <summary> |
42 /// Gets a HTTP client initializer which is able to custom properties on······ | 42 /// Gets a HTTP client initializer which is able to custom properties on······ |
43 /// <see cref="Google.Apis.Http.ConfigurableHttpClient"/> and· | 43 /// <see cref="Google.Apis.Http.ConfigurableHttpClient"/> and· |
44 /// <see cref="Google.Apis.Http.ConfigurableMessageHandler"/>. | 44 /// <see cref="Google.Apis.Http.ConfigurableMessageHandler"/>. |
45 /// </summary> | 45 /// </summary> |
46 IConfigurableHttpClientInitializer HttpClientInitializer { get; } | 46 IConfigurableHttpClientInitializer HttpClientInitializer { get; } |
47 | 47 |
48 /// <summary> Gets the service name. </summary> | 48 /// <summary>Gets the service name.</summary> |
49 string Name { get; } | 49 string Name { get; } |
50 | 50 |
51 /// <summary> Gets the BaseUri of the service. All request paths should be relative to this URI. </summary> | 51 /// <summary>Gets the BaseUri of the service. All request paths should b e relative to this URI.</summary> |
52 string BaseUri { get; } | 52 string BaseUri { get; } |
53 | 53 |
54 /// <summary> Gets the BasePath of the service. </summary> | 54 /// <summary>Gets the BasePath of the service.</summary> |
55 string BasePath { get; } | 55 string BasePath { get; } |
56 | 56 |
57 /// <summary> Gets the Authenticator for this service. </summary> | 57 /// <summary>Gets the Authenticator for this service.</summary> |
58 IAuthenticator Authenticator { get; } | 58 IAuthenticator Authenticator { get; } |
59 | 59 |
60 /// <summary> Gets the supported features by this service. </summary> | 60 /// <summary>Gets the supported features by this service.</summary> |
61 IList<string> Features { get; } | 61 IList<string> Features { get; } |
62 | 62 |
63 /// <summary> Gets or sets whether this service supports GZip. </summary > | 63 /// <summary>Gets or sets whether this service supports GZip.</summary> |
64 bool GZipEnabled { get; } | 64 bool GZipEnabled { get; } |
65 | 65 |
66 /// <summary> Gets the API-Key (DeveloperKey) which this service uses fo r all requests. </summary> | 66 /// <summary>Gets the API-Key (DeveloperKey) which this service uses for all requests.</summary> |
67 string ApiKey { get; } | 67 string ApiKey { get; } |
68 | 68 |
69 /// <summary> Gets the application name to be used in the User-Agent hea der. </summary> | 69 /// <summary>Gets the application name to be used in the User-Agent head er.</summary> |
70 string ApplicationName { get; } | 70 string ApplicationName { get; } |
71 | 71 |
72 /// <summary> | 72 /// <summary> |
73 /// Sets the content of the request by the given body and the this servi ce's configuration.· | 73 /// Sets the content of the request by the given body and the this servi ce's configuration.· |
74 /// First the body object is serialized by the Serializer and then, if t he GZip is enabled, the content will be | 74 /// First the body object is serialized by the Serializer and then, if t he GZip is enabled, the content will be |
75 /// wrapped in a GZip stream. | 75 /// wrapped in a GZip stream. |
76 /// </summary> | 76 /// </summary> |
77 void SetRequestSerailizedContent(HttpRequestMessage request, object body ); | 77 void SetRequestSerailizedContent(HttpRequestMessage request, object body ); |
78 | 78 |
79 #region Serialization Methods | 79 #region Serialization Methods |
80 | 80 |
81 /// <summary> Gets the Serializer used by this service. </summary> | 81 /// <summary>Gets the Serializer used by this service.</summary> |
82 ISerializer Serializer { get; } | 82 ISerializer Serializer { get; } |
83 | 83 |
84 /// <summary> Serializes an object into a string representation. </summa ry> | 84 /// <summary>Serializes an object into a string representation.</summary > |
85 string SerializeObject(object data); | 85 string SerializeObject(object data); |
86 | 86 |
87 /// <summary> Deserializes a response into the specified object. </summa ry> | 87 /// <summary>Deserializes a response into the specified object.</summary > |
88 Task<T> DeserializeResponse<T>(HttpResponseMessage response); | 88 Task<T> DeserializeResponse<T>(HttpResponseMessage response); |
89 | 89 |
90 /// <summary> Deserializes an error response into a <see cref="RequestEr ror"/> object. </summary> | 90 /// <summary>Deserializes an error response into a <see cref="RequestErr or"/> object.</summary> |
91 /// <exception cref="GoogleApiException">If no error is found in the res ponse.</exception> | 91 /// <exception cref="GoogleApiException">If no error is found in the res ponse.</exception> |
92 Task<RequestError> DeserializeError(HttpResponseMessage response); | 92 Task<RequestError> DeserializeError(HttpResponseMessage response); |
93 | 93 |
94 #endregion | 94 #endregion |
95 } | 95 } |
96 } | 96 } |
LEFT | RIGHT |