Esempio n. 1
0
 public virtual void AddHttpEquiv(HttpEquiv httpEquiv, string content)
 {
     if (string.IsNullOrWhiteSpace(content))
     {
         throw new ArgumentException();
     }
     AddAttribute("content", content);
     AddAttribute("http-equiv", httpEquiv.LiteralValue());
 }
Esempio n. 2
0
        public static string LiteralValue(this HttpEquiv httpEquiv)
        {
            switch (httpEquiv)
            {
            case HttpEquiv.ContentType: return("content-type");

            case HttpEquiv.DefaultStyle: return("default-style");

            case HttpEquiv.Refresh: return("refresh");

            default: throw new ArgumentException();
            }
        }
Esempio n. 3
0
        /// <summary>Assigns all needed attributes to the tag</summary>
        /// <returns>This instance downcasted to base class</returns>
        public virtual IndexedTag attr(
            HttpEquiv httpequiv = null,
            MetaName name       = null,
            string content      = null,
            string scheme       = null,
            LangCode lang       = null,
            string xmllang      = null,
            Dir?dir             = null
            )
        {
            HttpEquiv = httpequiv;
            Name      = name;
            Content   = content;
            Scheme    = scheme;
            Lang      = lang;
            XmlLang   = xmllang;
            Dir       = dir;

            return(this);
        }
Esempio n. 4
0
        /// <summary>Assigns all needed attributes to the tag</summary>
        /// <returns>This instance downcasted to base class</returns>
        public virtual IndexedTag attr(
            HttpEquiv httpequiv = null,
            MetaName name = null,
            string content = null,
            string scheme = null,
            LangCode lang = null,
            string xmllang = null,
            Dir? dir = null
        )
        {
            HttpEquiv = httpequiv;
            Name = name;
            Content = content;
            Scheme = scheme;
            Lang = lang;
            XmlLang = xmllang;
            Dir = dir;

            return this;
        }
Esempio n. 5
0
 public static TagMeta httpequiv(this TagMeta tag, HttpEquiv value) { tag.HttpEquiv = value; return tag; }
Esempio n. 6
0
 public static HTMLBuilder <X, Y> HttpEquiv <X, Y>(this HTMLBuilder <X, Y> builder, HttpEquiv httpEquiv, string content)
     where X : Meta
     where Y : HTMLBuilder
 {
     builder.CurrentTag.AddHttpEquiv(httpEquiv, content);
     return(builder);
 }