コード例 #1
0
ファイル: BagHolder.cs プロジェクト: wforney/portal
        /// <summary>
        ///     Get Data Value
        /// </summary>
        /// <value></value>
        public object this[string index]
        {
            get
            {
                var cookie = (HttpCookie)CookieUtil.Retrieve(index);

                return(cookie != null ? cookie.Value : null);
            }

            set
            {
                lock (this)
                {
                    CookieUtil.Add(index, value);
                }
            }
        }
コード例 #2
0
ファイル: BagHolder.cs プロジェクト: wforney/portal
        /// <summary>
        ///     Default property for accessing resources
        ///     <param name = "index">
        ///         Index for the desired resource</param>
        ///     <returns>
        ///         Resource string value</returns>
        /// </summary>
        /// <value></value>
        public object this[int index]
        {
            get
            {
                var cookie = (HttpCookie)CookieUtil.Retrieve(index);

                if (cookie != null)
                {
                    return(cookie.Value);
                }

                return(null);
            }

            set
            {
                lock (this)
                {
                    CookieUtil.Add(index, value);
                }
            }
        }