@@ -34,15 +34,15 @@ public partial class MandrillApi
34
34
#region Constructors and Destructors
35
35
36
36
/// <summary>
37
- /// Initializes a new instance of the <see cref="MandrillApi"/> class.
37
+ /// Initializes a new instance of the <see cref="MandrillApi" /> class.
38
38
/// </summary>
39
39
/// <param name="apiKey">
40
- /// The API Key recieved from MandrillApp
40
+ /// The API Key recieved from MandrillApp
41
41
/// </param>
42
42
/// <param name="useSsl">
43
43
/// </param>
44
44
/// <param name="timeout">
45
- /// Timeout in milliseconds to use for requests.
45
+ /// Timeout in milliseconds to use for requests.
46
46
/// </param>
47
47
public MandrillApi ( string apiKey , bool useSsl = true , int timeout = 0 )
48
48
{
@@ -70,35 +70,32 @@ public MandrillApi(string apiKey, bool useSsl = true, int timeout = 0)
70
70
/// </summary>
71
71
public string ApiKey { get ; private set ; }
72
72
73
- /// <summary>
74
- /// UserAgent to use for requests.
75
- /// </summary>
76
- public string UserAgent
73
+ public IWebProxy Proxy
77
74
{
78
75
get
79
76
{
80
- return client . UserAgent ;
77
+ return this . client . Proxy ;
81
78
}
82
79
set
83
80
{
84
- client . UserAgent = value ;
81
+ this . client . Proxy = value ;
85
82
}
86
83
}
87
-
88
- public System . Net . IWebProxy Proxy
89
- {
84
+
85
+ /// <summary>
86
+ /// UserAgent to use for requests.
87
+ /// </summary>
88
+ public string UserAgent
89
+ {
90
90
get
91
91
{
92
- return client . Proxy ;
92
+ return this . client . UserAgent ;
93
93
}
94
94
set
95
95
{
96
- client . Proxy = value ;
96
+ this . client . UserAgent = value ;
97
97
}
98
98
}
99
-
100
-
101
-
102
99
103
100
#endregion
104
101
@@ -134,17 +131,18 @@ public System.Net.IWebProxy Proxy
134
131
135
132
// return tcs.Task;
136
133
// }
134
+
137
135
#region Public Methods and Operators
138
136
139
137
/// <summary>
140
- /// PostAsync (uses synchronous function right now because ExecuteAsync has a bug)
138
+ /// PostAsync (uses synchronous function right now because ExecuteAsync has a bug)
141
139
/// </summary>
142
140
/// <param name="path">
143
141
/// </param>
144
142
/// <param name="data">
145
143
/// </param>
146
144
/// <returns>
147
- /// The <see cref="Task"/>.
145
+ /// The <see cref="Task" />.
148
146
/// </returns>
149
147
public Task < IRestResponse > PostAsync ( string path , dynamic data )
150
148
{
@@ -184,18 +182,18 @@ public Task<IRestResponse> PostAsync(string path, dynamic data)
184
182
}
185
183
186
184
/// <summary>
187
- /// The post async.
185
+ /// The post async.
188
186
/// </summary>
189
187
/// <param name="path">
190
- /// The path.
188
+ /// The path.
191
189
/// </param>
192
190
/// <param name="data">
193
- /// The data.
191
+ /// The data.
194
192
/// </param>
195
193
/// <typeparam name="T">
196
194
/// </typeparam>
197
195
/// <returns>
198
- /// The <see cref="Task"/>.
196
+ /// The <see cref="Task" />.
199
197
/// </returns>
200
198
public Task < T > PostAsync < T > ( string path , dynamic data ) where T : new ( )
201
199
{
@@ -206,10 +204,10 @@ public Task<IRestResponse> PostAsync(string path, dynamic data)
206
204
{
207
205
var t = JSON . Parse < T > ( p . Result . Content ) ;
208
206
return t ;
209
- } ,
207
+ } ,
210
208
TaskContinuationOptions . ExecuteSynchronously ) ;
211
209
}
212
210
213
211
#endregion
214
212
}
215
- }
213
+ }
0 commit comments