Пример #1
0
 protected void HandleNullResponse(ProxyWebRequest proxyWebRequest)
 {
     Application.ProxyWebRequestTracer.TraceError((long)proxyWebRequest.GetHashCode(), "{0}: Proxy web request returned NULL response.", new object[]
     {
         TraceContext.Get()
     });
 }
Пример #2
0
        public override void EndProxyWebRequest(ProxyWebRequest proxyWebRequest, QueryList queryList, IService service, IAsyncResult asyncResult)
        {
            GetUserAvailabilityResponse getUserAvailabilityResponse = service.EndGetUserAvailability(asyncResult);

            FreeBusyResponse[] array = null;
            if (getUserAvailabilityResponse != null)
            {
                array = getUserAvailabilityResponse.FreeBusyResponseArray;
            }
            if (array == null)
            {
                Application.ProxyWebRequestTracer.TraceError((long)proxyWebRequest.GetHashCode(), "{0}: Proxy web request returned NULL FreeBusyResponseArray.", new object[]
                {
                    TraceContext.Get()
                });
            }
            for (int i = 0; i < queryList.Count; i++)
            {
                FreeBusyQuery    freeBusyQuery    = (FreeBusyQuery)queryList[i];
                FreeBusyResponse freeBusyResponse = null;
                if (array != null && i < array.Length)
                {
                    freeBusyResponse = array[i];
                    if (freeBusyResponse == null)
                    {
                        Application.ProxyWebRequestTracer.TraceDebug <object, EmailAddress>((long)proxyWebRequest.GetHashCode(), "{0}: Proxy web request returned NULL FreeBusyResponse for mailbox {1}.", TraceContext.Get(), freeBusyQuery.Email);
                    }
                }
                FreeBusyQueryResult resultOnFirstCall;
                if (freeBusyResponse == null)
                {
                    resultOnFirstCall = new FreeBusyQueryResult(new ProxyNoResultException(Strings.descProxyNoResultError(freeBusyQuery.Email.Address, service.Url), 60732U));
                }
                else
                {
                    resultOnFirstCall = FreeBusyApplication.CopyViewAndResponseToResult(service.Url, freeBusyResponse.FreeBusyView, freeBusyResponse.ResponseMessage, freeBusyQuery.Email);
                }
                freeBusyQuery.SetResultOnFirstCall(resultOnFirstCall);
            }
        }
Пример #3
0
 public override void EndProxyWebRequest(ProxyWebRequest proxyWebRequest, QueryList queryList, IService service, IAsyncResult asyncResult)
 {
     throw new NotImplementedException();
 }
Пример #4
0
 public abstract void EndProxyWebRequest(ProxyWebRequest proxyWebRequest, QueryList queryList, IService service, IAsyncResult asyncResult);