Пример #1
0
        private static string GetUrlHelper(HttpContextBase context, string path, string publicKey, string errorCode)
        {
            publicKey = publicKey ?? PublicKey;
            if (String.IsNullOrEmpty(publicKey))
            {
                throw new ArgumentException(CommonResources.Argument_Cannot_Be_Null_Or_Empty, "publicKey");
            }

            var builder = new UrlBuilder(context.Request.IsSecureConnection ? _reCaptchaSecureUrl : _reCaptchaUrl);

            builder.AddPath(path);
            builder.AddParam("k", publicKey);
            if (!String.IsNullOrEmpty(errorCode))
            {
                builder.AddParam("error", errorCode);
            }
            return(builder);
        }
public static System.Web.WebPages.HelperResult LiveStream(
            int width = 400,
            int height = 500,
            string xid = "",
            string viaUrl = "",
            bool alwaysPostToFriends = false) {
return new System.Web.WebPages.HelperResult(__razor_helper_writer => {



#line 637 "..\..\Facebook.cshtml"
                                               
       
                
    var builder = new UrlBuilder("http://www.facebook.com/plugins/live_stream_box.php")
        .AddParam("app_id", AppId)
        .AddParam("width", width)
        .AddParam("height", height)
        .AddParam("always_post_to_friends", alwaysPostToFriends)
        .AddParam("locale", Language);

    if (!xid.IsEmpty()) {
        builder.AddParam("xid", xid);
        builder.AddParam("via_url", viaUrl);
    }
    

#line default
#line hidden

WriteLiteralTo(@__razor_helper_writer, "    <iframe src=\"");



#line 652 "..\..\Facebook.cshtml"
WriteTo(@__razor_helper_writer, builder);

#line default
#line hidden

WriteLiteralTo(@__razor_helper_writer, "\" scrolling=\"no\" frameborder=\"0\" style=\"border:none; overflow:hidden; width:");



#line 652 "..\..\Facebook.cshtml"
                                                                       WriteTo(@__razor_helper_writer, width);

#line default
#line hidden

WriteLiteralTo(@__razor_helper_writer, "px; height:");



#line 652 "..\..\Facebook.cshtml"
                                                                                          WriteTo(@__razor_helper_writer, height);

#line default
#line hidden

WriteLiteralTo(@__razor_helper_writer, "px;\" allowTransparency=\"true\"></iframe>\r\n");



#line 653 "..\..\Facebook.cshtml"

#line default
#line hidden

});

}
Пример #3
0
        public static System.Web.WebPages.HelperResult LiveStream(
            int width                = 400,
            int height               = 500,
            string xid               = "",
            string viaUrl            = "",
            bool alwaysPostToFriends = false)
        {
            return(new System.Web.WebPages.HelperResult(__razor_helper_writer => {
#line 637 "Facebook.cshtml"



                var builder = new UrlBuilder("http://www.facebook.com/plugins/live_stream_box.php")
                              .AddParam("app_id", AppId)
                              .AddParam("width", width)
                              .AddParam("height", height)
                              .AddParam("always_post_to_friends", alwaysPostToFriends)
                              .AddParam("locale", Language);

                if (!xid.IsEmpty())
                {
                    builder.AddParam("xid", xid);
                    builder.AddParam("via_url", viaUrl);
                }


#line default
#line hidden

                WriteLiteralTo(@__razor_helper_writer, "    <iframe src=\"");



#line 652 "Facebook.cshtml"
                WriteTo(@__razor_helper_writer, builder);

#line default
#line hidden

                WriteLiteralTo(@__razor_helper_writer, "\" scrolling=\"no\" frameborder=\"0\" style=\"border:none; overflow:hidden; width:");



#line 652 "Facebook.cshtml"
                WriteTo(@__razor_helper_writer, width);

#line default
#line hidden

                WriteLiteralTo(@__razor_helper_writer, "px; height:");



#line 652 "Facebook.cshtml"
                WriteTo(@__razor_helper_writer, height);

#line default
#line hidden

                WriteLiteralTo(@__razor_helper_writer, "px;\" allowTransparency=\"true\"></iframe>\r\n");



#line 653 "Facebook.cshtml"

#line default
#line hidden
            }));
        }
    private static string GetUrlHelper(HttpContextBase context, string path, string publicKey, string errorCode) {

        publicKey = publicKey ?? PublicKey;
        if (String.IsNullOrEmpty(publicKey)) {
            throw new ArgumentException(CommonResources.Argument_Cannot_Be_Null_Or_Empty, "publicKey");
        }

        var builder = new UrlBuilder(context.Request.IsSecureConnection ? _reCaptchaSecureUrl : _reCaptchaUrl);
        builder.AddPath(path);
        builder.AddParam("k", publicKey);
        if (!String.IsNullOrEmpty(errorCode)) {
            builder.AddParam("error", errorCode);
        }
        return builder;
    }