/// <summary> /// <para>Creates new Pinterest embedded pin 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="IPinterestHtmlHelper.Pin()"/> public static string Pin(this IPinterestHtmlHelper html, Action <IPinterestPinWidget> builder) { Assertion.NotNull(html); Assertion.NotNull(builder); var widget = html.Pin(); builder(widget); return(widget.ToHtmlString()); }