예제 #1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="YammerResult"/> class.
 /// </summary>
 /// <param name="result">The result.</param>
 /// <param name="exception">The WebException that was caught during the query</param>
 public YammerResult(WebQueryResult result, WebException exception)
 {
     Response = result.Response;
     RequestUri = result.RequestUri;
     ResponseDate = result.ResponseDate;
     RequestDate = result.RequestDate;
     Exception = exception;
 }
예제 #2
0
 private void InitializeResult()
 {
     Result = new WebQueryResult();
     QueryRequest += (s, e) =>
                         {
                             Result.RequestDate = DateTime.UtcNow;
                             Result.RequestUri = new Uri(e.Request);
                         };
     QueryResponse += (s, e) =>
                          {
                              Result.ResponseDate = DateTime.UtcNow;
                              Result.Response = e.Response;
                          };
 }