public virtual void AddHttpEquiv(HttpEquiv httpEquiv, string content) { if (string.IsNullOrWhiteSpace(content)) { throw new ArgumentException(); } AddAttribute("content", content); AddAttribute("http-equiv", httpEquiv.LiteralValue()); }
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(); } }
/// <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); }
/// <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; }
public static TagMeta httpequiv(this TagMeta tag, HttpEquiv value) { tag.HttpEquiv = value; return tag; }
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); }