コード例 #1
0
    public void RequestRemoteData(string subsystemName, System.Action <string, object> callback)
    {
        EB.Sparx.Request request = m_Api.Get("/" + subsystemName + "/async");

        m_Api.Service(request, delegate(EB.Sparx.Response response) {
            if (response.sucessful == true)
            {
                if (callback != null)
                {
                    callback(null, response.result);
                }
            }
            else
            {
                if (callback != null)
                {
                    callback(response.localizedError, null);
                }
            }
        });
    }
コード例 #2
0
        static StackObject *Service_0(ILIntepreter __intp, StackObject *__esp, IList <object> __mStack, CLRMethod __method, bool isNewObj)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            StackObject *ptr_of_this_method;
            StackObject *__ret = ILIntepreter.Minus(__esp, 3);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
            System.Action <EB.Sparx.Response> @callback = (System.Action <EB.Sparx.Response>) typeof(System.Action <EB.Sparx.Response>).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
            __intp.Free(ptr_of_this_method);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
            EB.Sparx.Request @request = (EB.Sparx.Request) typeof(EB.Sparx.Request).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
            __intp.Free(ptr_of_this_method);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 3);
            EB.Sparx.EndPoint instance_of_this_method = (EB.Sparx.EndPoint) typeof(EB.Sparx.EndPoint).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
            __intp.Free(ptr_of_this_method);

            var result_of_this_method = instance_of_this_method.Service(@request, @callback);

            __ret->ObjectType = ObjectTypes.Integer;
            __ret->Value      = result_of_this_method;
            return(__ret + 1);
        }
コード例 #3
0
 public void Service(EB.Sparx.Request request, System.Action <EB.Sparx.Response> callback = null, bool cacheData = true)
 {
     System.Action <EB.Sparx.Response> onResponse = obj => StartCoroutine(OnResponseCoroutine(obj, callback, cacheData));
     m_endPoint.Service(request, onResponse);
 }