Last active
August 30, 2023 17:19
-
-
Save hishaamn/b97e8f8ce17c9d7a1b1f616ea17e71a2 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/////// FROM /////// | |
protected static XNamespace Xhtml { get; } = (XNamespace) "http://www.w3.org/1999/XMLSchema-instance"; | |
protected virtual XElement BuildAlternateLinkElement(string href, string hreflang, string rel = "alternate") => new XElement(SitemapGenerator.Xhtml + "link", new object[3] | |
{ | |
(object) new XAttribute((XName) nameof (rel), (object) rel), | |
(object) new XAttribute((XName) nameof (hreflang), (object) hreflang), | |
(object) new XAttribute((XName) nameof (href), (object) href) | |
}); | |
/////// TO /////// | |
protected static XNamespace Xhtml { get; } = (XNamespace) "http://www.w3.org/2001/XMLSchema-instance"; | |
protected virtual XElement BuildAlternateLinkElement(string href, string hreflang, string rel = "alternate") => new XElement(YourClassName.Xhtml + "link", new object[3] | |
{ | |
(object) new XAttribute((XName) nameof (rel), (object) rel), | |
(object) new XAttribute((XName) nameof (hreflang), (object) hreflang), | |
(object) new XAttribute((XName) nameof (href), (object) href) | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment