Ejemplo n.º 1
0
        public async Task <Models.Adapter.UsersCollection> GetUsersAsync()
        {
            var request  = new Consumer.Request("/users", Consumer.Method.Get);
            var consumer = new Consumer.Consumer(this.ServiceUrl);

            return(await consumer.ExecuteAsync <Models.Adapter.UsersCollection>(request));
        }
Ejemplo n.º 2
0
        public Models.Adapter.UsersCollection GetUsers()
        {
            var request  = new Consumer.Request("/users", Consumer.Method.Get);
            var consumer = new Consumer.Consumer(this.ServiceUrl);

            return(consumer.Execute <Models.Adapter.UsersCollection>(request));
        }
Ejemplo n.º 3
0
        public Models.Adapter.UsersCollection GetUsers()
        {
            var request  = new Consumer.Request("/users", Consumer.Method.Get);
            var consumer = new Consumer.Consumer(this.ServiceUrl);

            return(consumer.Execute <Models.Adapter.UsersCollection, List <Models.Json.Users> >(request, new UsersCollectionAdapterFactory()));
        }
Ejemplo n.º 4
0
        public async Task <Models.Adapter.UsersCollection> GetUsersAsync()
        {
            var taskCompletionSource = new TaskCompletionSource <Models.Adapter.UsersCollection>();
            var request  = new Consumer.Request("/users", Consumer.Method.Get);
            var consumer = new Consumer.Consumer(this.ServiceUrl);

            return(await consumer.ExecuteAsync <Models.Adapter.UsersCollection, List <Models.Json.Users> >(request));
        }
Ejemplo n.º 5
0
        public async Task <Models.Adapter.Users> GetUserAsync(int id)
        {
            var request = new Consumer.Request("/users/{id}", Consumer.Method.Get);

            request.AddParameter("id", id.ToString(), true);

            var consumer = new Consumer.Consumer(this.ServiceUrl);

            return(await consumer.ExecuteAsync <Models.Adapter.Users>(request));
        }
Ejemplo n.º 6
0
        public Models.Adapter.Users GetUser(int id)
        {
            var request = new Consumer.Request("/users/{id}", Consumer.Method.Get);

            request.AddParameter("id", id.ToString(), true);

            var consumer = new Consumer.Consumer(this.ServiceUrl);

            return(consumer.Execute <Models.Adapter.Users, Models.Json.Users>(request, new UsersAdapterFactory()));
        }