예제 #1
0
        void Start()
        {
            var repository = new RemoteRepository <Identity>();

            //Loding
            repository.Get <Response <User> >("http://192.168.199.233/User/List",
                                              new Identity()
            {
                DeviceId = SystemInfo.deviceUniqueIdentifier, Token = TokenHelper.Create()
            },
                                              (response) =>
            {
                Debug.Log(response.Items[0].Address.Name);
                stop = true;
            });
        }
예제 #2
0
        void Start()
        {
            var repository = new RemoteRepository <Identity>();

            //Proxy

            Proxy.Instance.SetTarget(repository)
            .SetMethod("Test")
            .SetArgs(new object[] {})
            .SetInvocationHandler(new LogInvocationHandler())
            .Invoke();

            //Loding
            repository.Get <Response <User> >("http://localhost/User/List",
                                              new Identity()
            {
                DeviceId = SystemInfo.deviceUniqueIdentifier, Token = TokenHelper.Create()
            },
                                              (response) =>
            {
                Debug.Log(response.Items[0].Address.Name);
                stop = true;
            });
        }