Пример #1
0
        /// <summary>
        ///   <para></para>
        /// </summary>
        /// <param name="html"></param>
        /// <param name="builder"></param>
        /// <returns></returns>
        /// <exception cref="ArgumentNullException">If either <paramref name="html"/> or <paramref name="builder"/> is a <c>null</c> reference.</exception>
        /// <seealso cref="IAddThisHtmlHelper.TrendingContent()"/>
        public static string TrendingContent(this IAddThisHtmlHelper html, Action <IAddThisTrendingContentWidget> builder)
        {
            Assertion.NotNull(html);
            Assertion.NotNull(builder);

            var widget = html.TrendingContent();

            builder(widget);
            return(widget.ToHtmlString());
        }
Пример #2
0
        /// <summary>
        ///   <para></para>
        /// </summary>
        /// <param name="html"></param>
        /// <param name="builder"></param>
        /// <returns></returns>
        /// <exception cref="ArgumentNullException">If either <paramref name="html"/> or <paramref name="builder"/> is a <c>null</c> reference.</exception>
        /// <seealso cref="IAddThisHtmlHelper.WelcomeBar()"/>
        public static string WelcomeBar(this IAddThisHtmlHelper html, Action <IAddThisWelcomeBarWidget> builder)
        {
            Assertion.NotNull(html);
            Assertion.NotNull(builder);

            var widget = html.WelcomeBar();

            builder(widget);
            return(widget.ToHtmlString());
        }
Пример #3
0
        /// <summary>
        ///   <para></para>
        /// </summary>
        /// <param name="html"></param>
        /// <param name="builder"></param>
        /// <returns></returns>
        /// <exception cref="ArgumentNullException">If either <paramref name="html"/> or <paramref name="builder"/> is a <c>null</c> reference.</exception>
        /// <seealso cref="IAddThisHtmlHelper.FollowButtons()"/>
        public static string FollowButtons(this IAddThisHtmlHelper html, Action <IAddThisFollowButtonsWidget> builder)
        {
            Assertion.NotNull(html);
            Assertion.NotNull(builder);

            var widget = html.FollowButtons();

            builder(widget);
            return(widget.ToHtmlString());
        }
Пример #4
0
        /// <summary>
        ///   <para></para>
        /// </summary>
        /// <param name="html"></param>
        /// <param name="builder"></param>
        /// <returns></returns>
        /// <exception cref="ArgumentNullException">If either <paramref name="html"/> or <paramref name="builder"/> is a <c>null</c> reference.</exception>
        /// <seealso cref="IAddThisHtmlHelper.SmartLayers()"/>
        public static string SmartLayers(this IAddThisHtmlHelper html, Action <IAddThisSmartLayersWidget> builder)
        {
            Assertion.NotNull(html);
            Assertion.NotNull(builder);

            var widget = html.SmartLayers();

            builder(widget);
            return(widget.ToHtmlString());
        }
        /// <summary>
        ///   <para>Initializes HTML helper object for rendering of AddThis 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 IAddThisHtmlHelper AddThis(this HtmlHelper html)
        {
            Assertion.NotNull(html);

            return(addthis ?? (addthis = new AddThisHtmlHelper()));
        }
    /// <summary>
    ///   <para>Initializes HTML helper object for rendering of AddThis 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 IAddThisHtmlHelper AddThis(this HtmlHelper html)
    {
      Assertion.NotNull(html);

      return addthis ?? (addthis = new AddThisHtmlHelper());
    }