Exemplo n.º 1
0
        /// <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);
                }
            }
        }
Exemplo n.º 2
0
        /// <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);
                }
            }
        }