Ejemplo n.º 1
0
        // ---- Data Methods ----
        // ----------------------
        // UNITY Note: Data is never coerced from a string to an Object(Hash)
        // which is left as an exercise for the reader
        public void load(string key, Roar.Callback <string> callback)
        {
            // If data is already present in the client cache, return that
            if (Data_[key] != null)
            {
                var ret = Data_[key] as string;
                if (callback != null)
                {
                    callback(new Roar.CallbackInfo <string>(ret, IWebAPI.OK, ret));
                }
            }
            else
            {
                WebObjects.User.NetdriveFetchArguments args = new Roar.WebObjects.User.NetdriveFetchArguments();
                args.ikey = key;

                user_actions_.netdrive_fetch(args, new OnGetData(callback, this, key));
            }
        }
Ejemplo n.º 2
0
 public void netdrive_fetch(Roar.WebObjects.User.NetdriveFetchArguments args, ZWebAPI.Callback <Roar.WebObjects.User.NetdriveFetchResponse> cb)
 {
     api.MakeCall("user/netdrive_get", args.ToHashtable(), new CallbackBridge <Roar.WebObjects.User.NetdriveFetchResponse>(cb, netdrive_fetch_response_parser), true);
 }