コード例 #1
0
ファイル: WebStream.cs プロジェクト: YunLi1988/ServiceBusFake
        public static bool IsSupportingScheme(Uri factoryEndpointUri, out Exception exception)
        {
            bool flag;

            exception = null;
            try
            {
                using (WebStream webStream = new WebStream(factoryEndpointUri, "connection", new EventTraceActivity()))
                {
                    flag = webStream.Connect();
                }
            }
            catch (WebException webException1)
            {
                WebException webException = webException1;
                string       str          = WebStream.CloseResponseInWebException(webException);
                exception = new CommunicationException(string.Concat(webException.Message, str), webException);
                flag      = false;
            }
            catch (Exception exception2)
            {
                Exception exception1 = exception2;
                if (Fx.IsFatal(exception1))
                {
                    throw;
                }
                exception = exception1;
                flag      = false;
            }
            return(flag);
        }