Sha256: 07ca7f01eb4707807b49a7ce578e4ce2a229da300f46f77a10b94a45e3979ca8

Contents?: true

Size: 1.55 KB

Versions: 8

Compression:

Stored size: 1.55 KB

Contents

using Microsoft.Scripting.Utils;
using Microsoft.Scripting.Runtime;
using IronRuby.Runtime;
using IronRuby.Builtins;
using System;
using System.Runtime.InteropServices;
using rho.common;
using rho.net;

namespace rho.rubyext
{
    [RubyModule("Rho")]
    public static class RhoRoot
    {
        [RubyModule("AsyncHttp")]
        public static class RhoAsyncHttp
        {

            #region Private Implementation Details

            #endregion

            #region Private Instance & Singleton Methods

            [RubyMethodAttribute("cancel", RubyMethodAttributes.PublicSingleton)]
            public static void Cancel(RubyModule/*!*/ self, [NotNull]String cancelCallback)
            {
                if (CAsyncHttp.getInstance() != null)
                    CAsyncHttp.getInstance().cancelRequest(cancelCallback);
            }

            [RubyMethodAttribute("cancel", RubyMethodAttributes.PublicSingleton)]
            public static void Cancel(RubyModule/*!*/ self)
            {
                if (CAsyncHttp.getInstance() != null)
                    CAsyncHttp.getInstance().cancelRequest("*");
            }

            [RubyMethodAttribute("do_request", RubyMethodAttributes.PublicSingleton)]
            public static MutableString doRequest(RubyModule/*!*/ self, [NotNull]String command, Hash args)
            {
                CAsyncHttp.Create();
                RhoParams p = new RhoParams(args);
                return CAsyncHttp.getInstance().addHttpCommand(new CAsyncHttp.HttpCommand(command, p));
            }

            #endregion
        }
    }
}

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
rhodes-3.0.0 platform/wp7/RhoRubyLib/rubyext/RhoAsyncHttp.cs
rhodes-3.0.0.beta.7 platform/wp7/RhoRubyLib/rubyext/RhoAsyncHttp.cs
rhodes-3.0.0.beta.6 platform/wp7/RhoRubyLib/rubyext/RhoAsyncHttp.cs
rhodes-3.0.0.beta.5 platform/wp7/RhoRubyLib/rubyext/RhoAsyncHttp.cs
rhodes-3.0.0.beta.4 platform/wp7/RhoRubyLib/rubyext/RhoAsyncHttp.cs
rhodes-3.0.0.beta.3 platform/wp7/RhoRubyLib/rubyext/RhoAsyncHttp.cs
rhodes-3.0.0.beta.2 platform/wp7/RhoRubyLib/rubyext/RhoAsyncHttp.cs
rhodes-3.0.0.beta.1 platform/wp7/RhoRubyLib/rubyext/RhoAsyncHttp.cs