/// <summary>Gets the OneAll sharing display script for the currently initialized OneAll domain.</summary>
        /// <param name="page">The <see cref="Page" /> being executed.</param>
        /// <param name="style">The desired button style.</param>
        /// <param name="socialInsights">True to enable social insights and measure referral traffic.</param>
        /// <param name="titleFormat">The format for the button title, example: "Send to {0}" where "{0}" will be the provider name.</param>
        /// <param name="shareUrl">A custom URL to share, or null to share the URL of the page executing this script.</param>
        /// <param name="providers">The providers to be displayed.</param>
        /// <returns>A string of HTML to cause the sharing API to be rendered.</returns>
        public static string OneAllSharingDisplayScript(this Page page, OneAllButtonStyle style, bool socialInsights, string titleFormat, Uri shareUrl, params Provider[] providers)
        {
            string retVal = string.Empty;

            if (page != null)
            {
                retVal = ExtensionImplementations.OneAllSharingDisplayScript(style, socialInsights, titleFormat, shareUrl, providers);
            }

            return(retVal);
        }
Пример #2
0
        /// <summary>Gets the OneAll sharing display script for the currently initialized OneAll domain.</summary>
        /// <param name="helper">The standard MVC HTML helper.</param>
        /// <param name="style">The desired button style.</param>
        /// <param name="socialInsights">True to enable social insights and measure referral traffic.</param>
        /// <param name="titleFormat">The format for the button title, example: "Send to {0}" where "{0}" will be the provider name.</param>
        /// <param name="shareUrl">A custom URL to share, or null to share the URL of the page executing this script.</param>
        /// <param name="providers">The providers to be displayed.</param>
        /// <returns>A string of HTML to cause the sharing API to be rendered.</returns>
        public static MvcHtmlString OneAllSharingDisplayScript(this HtmlHelper helper, OneAllButtonStyle style, bool socialInsights, string titleFormat, Uri shareUrl, params Provider[] providers)
        {
            MvcHtmlString retVal = null;

            if (helper != null)
            {
                retVal = MvcHtmlString.Create(ExtensionImplementations.OneAllSharingDisplayScript(style, socialInsights, titleFormat, shareUrl, providers));
            }

            return(retVal);
        }