/// <summary> /// Creates a string containing the Open Graph meta tags (Also used by Facebook). <see cref="OpenGraphMetadata"/> for more information. /// </summary> /// <param name="htmlHelper">The HTML helper.</param> /// <param name="openGraphMetadata">The open graph metadata.</param> /// <returns>The meta tags.</returns> public static HtmlString OpenGraph(this IHtmlHelper htmlHelper, OpenGraphMetadata openGraphMetadata) { if (htmlHelper is null) { throw new ArgumentNullException(nameof(htmlHelper)); } if (openGraphMetadata is null) { throw new ArgumentNullException(nameof(openGraphMetadata)); } return(new HtmlString(openGraphMetadata.ToString())); }
/// <summary> /// Creates a string containing the Open Graph meta tags (Also used by Facebook). <see cref="OpenGraphMetadata"/> for more information. /// </summary> /// <param name="htmlHelper">The HTML helper.</param> /// <param name="openGraphMetadata">The open graph metadata.</param> /// <returns>The meta tags.</returns> public static HtmlString OpenGraph(this IHtmlHelper htmlHelper, OpenGraphMetadata openGraphMetadata) => new HtmlString(openGraphMetadata.ToString());