示例#1
0
        /// <summary>
        /// Gets the cookie HTML representation.
        /// </summary>
        /// <returns>cookie string</returns>
        public override string ToString()
        {
            string temp = string.Format("{0}={1}; ", HttpUtilityHelper.UrlEncode(Name), HttpUtilityHelper.UrlEncode(Value));

            if (_persistant)
            {
                // Fixed by Albert, Team MediaPortal
                temp += string.Format("expires={0};", _expires.ToUniversalTime().ToString("r"));
            }
            if (!string.IsNullOrEmpty(_path))
            {
                temp += string.Format("path={0}; ", _path);
            }
            if (!string.IsNullOrEmpty(_domain))
            {
                temp += string.Format("domain={0}; ", _domain);
            }

            return(temp);
        }
示例#2
0
 /// <summary>
 /// Gets the cookie HTML representation.
 /// </summary>
 /// <returns>cookie string</returns>
 public override string ToString()
 {
     return(string.Format("{0}={1}; ", HttpUtilityHelper.UrlEncode(_name), HttpUtilityHelper.UrlEncode(_value)));
 }
示例#3
0
 private static void Add(IHttpInput input, string name, string value)
 {
     input.Add(HttpUtilityHelper.UrlDecode(name), HttpUtilityHelper.UrlDecode(value));
 }