/// <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);
        }
        /// <summary>Gets the OneAll header script for the currently initialized OneAll domain.</summary>
        /// <param name="page">The standard MVC HTML helper.</param>
        /// <param name="domain">The full OneAll domain value</param>
        /// <returns>The HTML for the OneAll script intended for the page header.</returns>
        public static string OneAllHeaderScript(this Page page, Uri domain)
        {
            string retVal = string.Empty;

            if (page != null || page == null)
            {
                retVal = ExtensionImplementations.OneAllHeaderScript(domain);
            }

            return(retVal);
        }
        /// <summary>Gets the OneAll login display script for the currently initialized OneAll domain.</summary>
        /// <param name="page">The <see cref="Page" /> being executed.</param>
        /// <param name="link">True if this is a linking script, otherwise false for a login script.</param>
        /// <param name="token">A user token, or null, or empty.</param>
        /// <param name="targetId">The element ID where the display will render. This will be generated if empty.</param>
        /// <param name="countWide">The maximum number of providers to display horizontally. Any value less than 1 will equal unconstrained.</param>
        /// <param name="countHigh">The maximum number of providers to display vertically. Any value less than 1 will equal unconstrained.</param>
        /// <param name="theme">The URL for the display style sheet. Use null or empty for the default style.</param>
        /// <param name="callbackUrl">The URL the OneAll API calls back to with results. This cannot be null or empty.</param>
        /// <param name="createTarget">True to create an element with the ID of <paramref name="targetId" />, otherwise false.</param>
        /// <param name="sameWindow">True to conduct the operation in the current window, otherwise false and a new window may be used. The default value is false.</param>
        /// <param name="providers">A list of the providers to the displayed. This cannot be null or empty and cannot contain empty elements.</param>
        /// <returns>The HTML for the OneAll script intended for displaying the options.</returns>
        public static string OneAllDisplayScript(this Page page, bool link, string token, string targetId, int countWide, int countHigh, string theme, Uri callbackUrl, bool createTarget, bool sameWindow, params string[] providers)
        {
            string retVal = string.Empty;

            if (page != null || page == null)
            {
                retVal = ExtensionImplementations.OneAllDisplayScript(link, token, targetId, countWide, countHigh, theme, callbackUrl, createTarget, sameWindow, providers);
            }

            return(retVal);
        }
Exemplo n.º 4
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);
        }
Exemplo n.º 5
0
        /// <summary>Gets the OneAll header script for the currently initialized OneAll domain.</summary>
        /// <param name="helper">The standard MVC HTML helper.</param>
        /// <param name="domain">The full OneAll domain value</param>
        /// <returns>The HTML for the OneAll script intended for the page header.</returns>
        public static MvcHtmlString OneAllHeaderScript(this HtmlHelper helper, Uri domain)
        {
            MvcHtmlString retVal = null;

            if (helper != null || helper == null)
            {
                retVal = MvcHtmlString.Create(ExtensionImplementations.OneAllHeaderScript(domain));
            }

            return(retVal);
        }
Exemplo n.º 6
0
        /// <summary>Gets the OneAll login display script for the currently initialized OneAll domain.</summary>
        /// <param name="helper">The standard MVC HTML helper.</param>
        /// <param name="link">True if this is a linking script, otherwise false for a login script.</param>
        /// <param name="token">A user token, or null, or empty.</param>
        /// <param name="targetId">The element ID where the display will render. This will be generated if empty.</param>
        /// <param name="countWide">The maximum number of providers to display horizontally. Any value less than 1 will equal unconstrained.</param>
        /// <param name="countHigh">The maximum number of providers to display vertically. Any value less than 1 will equal unconstrained.</param>
        /// <param name="theme">The URL for the display style sheet. Use null or empty for the default style.</param>
        /// <param name="callbackUrl">The URL the OneAll API calls back to with results. This cannot be null or empty.</param>
        /// <param name="createTarget">True to create an element with the ID of <paramref name="targetId" />, otherwise false.</param>
        /// <param name="sameWindow">True to conduct the operation in the current window, otherwise false and a new window may be used. The default value is false.</param>
        /// <param name="providers">A list of the providers to the displayed. This cannot be null or empty and cannot contain empty elements.</param>
        /// <returns>The HTML for the OneAll script intended for displaying the options.</returns>
        public static MvcHtmlString OneAllDisplayScript(this HtmlHelper helper, bool link, string token, string targetId, int countWide, int countHigh, string theme, Uri callbackUrl, bool createTarget, bool sameWindow, params string[] providers)
        {
            MvcHtmlString retVal = null;

            if (helper != null || helper == null)
            {
                retVal = MvcHtmlString.Create(ExtensionImplementations.OneAllDisplayScript(link, token, targetId, countWide, countHigh, theme, callbackUrl, createTarget, sameWindow, providers));
            }

            return(retVal);
        }