コード例 #1
0
        internal static IEnumerator GetSingleResultFromRequest(SegmentInfo segmentInfo)
        {
            IEnumerator enumerator2;
            IEnumerator requestEnumerator = WebUtil.GetRequestEnumerator(segmentInfo.RequestEnumerable);
            bool        flag = true;

            try
            {
                WebUtil.CheckResourceExists(requestEnumerator.MoveNext(), segmentInfo.Identifier);
                RequestDescription.CheckNullDirectReference(requestEnumerator.Current, segmentInfo);
                flag        = false;
                enumerator2 = requestEnumerator;
            }
            finally
            {
                if (flag)
                {
                    WebUtil.Dispose(requestEnumerator);
                }
            }
            return(enumerator2);
        }