/// <summary> /// <para>Creates new Facebook Facepile widget.</para> /// </summary> /// <param name="html">Helper object to call method on.</param> /// <param name="builder">Delegate that performs configuration of the widget.</param> /// <returns>HTML contents of configured and rendered widget.</returns> /// <exception cref="ArgumentNullException">If either <paramref name="html"/> or <paramref name="builder"/> is a <c>null</c> reference.</exception> /// <seealso cref="IFacebookHtmlHelper.Facepile()"/> public static string Facepile(this IFacebookHtmlHelper html, Action <IFacebookFacepileWidget> builder) { Assertion.NotNull(html); Assertion.NotNull(builder); var widget = html.Facepile(); builder(widget); return(widget.ToHtmlString()); }
/// <summary> /// <para>Creates new Facebook comments widget.</para> /// </summary> /// <param name="html">Helper object to call method on.</param> /// <param name="builder">Delegate that performs configuration of the widget.</param> /// <returns>HTML contents of configured and rendered widget.</returns> /// <exception cref="ArgumentNullException">If either <paramref name="html"/> or <paramref name="builder"/> is a <c>null</c> reference.</exception> /// <seealso cref="IFacebookHtmlHelper.Comments()"/> public static string Comments(this IFacebookHtmlHelper html, Action <IFacebookCommentsWidget> builder) { Assertion.NotNull(html); Assertion.NotNull(builder); var widget = html.Comments(); builder(widget); return(widget.ToHtmlString()); }
/// <summary> /// <para>Creates new Facebook Recommendations Feed widget.</para> /// </summary> /// <param name="html">Helper object to call method on.</param> /// <param name="builder">Delegate that performs configuration of the widget.</param> /// <returns>HTML contents of configured and rendered widget.</returns> /// <exception cref="ArgumentNullException">If either <paramref name="html"/> or <paramref name="builder"/> is a <c>null</c> reference.</exception> /// <seealso cref="IFacebookHtmlHelper.RecommendationsFeed()"/> public static string RecommendationsFeed(this IFacebookHtmlHelper html, Action <IFacebookRecommendationsFeedWidget> builder) { Assertion.NotNull(html); Assertion.NotNull(builder); var widget = html.RecommendationsFeed(); builder(widget); return(widget.ToHtmlString()); }
/// <summary> /// <para>Creates new Facebook "Send" button widget.</para> /// </summary> /// <param name="html">Helper object to call method on.</param> /// <param name="builder">Delegate that performs configuration of the widget.</param> /// <returns>HTML contents of configured and rendered widget.</returns> /// <exception cref="ArgumentNullException">If either <paramref name="html"/> or <paramref name="builder"/> is a <c>null</c> reference.</exception> /// <seealso cref="IFacebookHtmlHelper.SendButton()"/> public static string SendButton(this IFacebookHtmlHelper html, Action <IFacebookSendButtonWidget> builder) { Assertion.NotNull(html); Assertion.NotNull(builder); var widget = html.SendButton(); builder(widget); return(widget.ToHtmlString()); }
/// <summary> /// <para>Initializes HTML helper object for rendering of Facebook widgets.</para> /// </summary> /// <param name="html">Helper object to call method on.</param> /// <returns>Widgets factory helper.</returns> /// <exception cref="ArgumentNullException">If <paramref name="html"/> is a <c>null</c> reference.</exception> public static IFacebookHtmlHelper Facebook(this HtmlHelper html) { Assertion.NotNull(html); return facebook ?? (facebook = new FacebookHtmlHelper()); }
/// <summary> /// <para>Initializes HTML helper object for rendering of Facebook widgets.</para> /// </summary> /// <param name="html">Helper object to call method on.</param> /// <returns>Widgets factory helper.</returns> /// <exception cref="ArgumentNullException">If <paramref name="html"/> is a <c>null</c> reference.</exception> public static IFacebookHtmlHelper Facebook(this HtmlHelper html) { Assertion.NotNull(html); return(facebook ?? (facebook = new FacebookHtmlHelper())); }