Example #1
0
        public IAsyncResult BeginGetUserPhoto(PhotoRequest request, PhotosConfiguration configuration, AsyncCallback callback, object asyncState)
        {
            ArgumentValidator.ThrowIfNull("request", request);
            ArgumentValidator.ThrowIfNull("configuration", configuration);
            HttpWebRequest request2 = new HttpPhotoRequestBuilder(configuration, this.tracer).Build(this.targetUri, request, new PhotoRequestOutboundWebProxyProviderUsingLocalServerConfiguration(this.tracer), this.traceRequest);

            this.httpPhotoRequest = this.ConfigureRequest(request2);
            return(this.AuthenticateAndBeginInvoke(this.httpPhotoRequest, () => this.httpPhotoRequest.BeginGetResponse(callback, asyncState)));
        }
Example #2
0
 private void InitializeUrls(string smtpAddress, string owaUrl, string ewsUrl)
 {
     if (!string.IsNullOrEmpty(owaUrl))
     {
         this.OwaUrl       = owaUrl;
         this.CalendarUrl  = owaUrl + "?path=/group/" + smtpAddress + "/calendar";
         this.InboxUrl     = owaUrl + "?path=/group/" + smtpAddress + "/mail";
         this.PeopleUrl    = owaUrl + "?path=/group/" + smtpAddress + "/people";
         this.EditGroupUrl = owaUrl + "?path=/group/" + smtpAddress + "/action/edit";
     }
     if (!string.IsNullOrEmpty(ewsUrl))
     {
         this.EwsUrl = ewsUrl;
         HttpPhotoRequestBuilder httpPhotoRequestBuilder = new HttpPhotoRequestBuilder(MailboxUrls.PhotosConfiguration, MailboxUrls.Tracer);
         this.PhotoUrl = httpPhotoRequestBuilder.CreateUri(new Uri(ewsUrl), smtpAddress).AbsoluteUri;
     }
 }