예제 #1
0
        private static NameValueCollection FaultIn(ref NameValueCollection collection)
        {
            if (collection == null)
            {
                collection = new HttpValuesCollection();
            }

            return(collection);
        }
예제 #2
0
        private NameValueCollection CopyCollection(HttpCookieCollection cookies)
        {
            if (cookies == null || cookies.Count == 0)
            {
                return(null);
            }

            NameValueCollection copy = new HttpValuesCollection(cookies.Count);

            for (int i = 0; i < cookies.Count; i++)
            {
                HttpCookie cookie = cookies[i];

                //
                // NOTE: We drop the Path and Domain properties of the
                // cookie for sake of simplicity.
                //

                copy.Add(cookie.Name, cookie.Value);
            }

            return(copy);
        }
예제 #3
0
파일: Error.cs 프로젝트: spbooks/ASPNETANT1
        private NameValueCollection CopyCollection(HttpCookieCollection cookies)
        {
            if (cookies == null || cookies.Count == 0)
            {
                return null;
            }

            NameValueCollection copy = new HttpValuesCollection(cookies.Count);

            for (int i = 0; i < cookies.Count; i++)
            {
                HttpCookie cookie = cookies[i];

                //
                // NOTE: We drop the Path and Domain properties of the
                // cookie for sake of simplicity.
                //

                copy.Add(cookie.Name, cookie.Value);
            }

            return copy;
        }
예제 #4
0
파일: Error.cs 프로젝트: spbooks/ASPNETANT1
        private static NameValueCollection FaultIn(ref NameValueCollection collection)
        {
            if (collection == null)
            {
                collection = new HttpValuesCollection();
            }

            return collection;
        }