Add() public method

public Add ( string attributeName ) : void
attributeName string
return void
Exemplo n.º 1
0
        public static Cookie Parse(string value)
        {
            var cookie = new Cookie();
            foreach (var pair in HeaderStore.ParseMultiValue(value, ';'))
            {
                var eq = pair.IndexOf('=');
                if (eq == -1)
                {
                    cookie.Add(pair, Cookie.AttributeOnly);
                    continue;
                }

                cookie.Add(pair.Substring(0, eq).Trim(), pair.Substring(eq + 1).Trim());
            }

            return cookie;
        }
        public static Cookie Parse(string value)
        {
            var cookie = new Cookie();

            foreach (var pair in HeaderStore.ParseMultiValue(value, ';'))
            {
                var eq = pair.IndexOf('=');
                if (eq == -1)
                {
                    cookie.Add(pair, Cookie.AttributeOnly);
                    continue;
                }

                cookie.Add(pair.Substring(0, eq).Trim(), pair.Substring(eq + 1).Trim());
            }

            return(cookie);
        }