Esempio n. 1
0
 public void SearchDoctors(SearchDoctorRequest request, Action <DoctorResponse> onCompleted)
 {
     onCompleted(new DoctorResponse()
     {
         Success = true,
         Result  = new List <Doctor>()
         {
             new Doctor()
             {
                 Title = "Doctor1", ID = 1, Department = "dep1", QualifiList = new List <string>()
                 {
                     "asfsdf, sdfds"
                 }, Bio = "asdf sdaf sda fsda fasd fasdf asdf adgdf sdf gsdfg sdfg sdf gsdf gsdfg sdf gsdfgsdfgdsgsd gsdf gsdf", Position = "sfasdfa fsdafd fds"
             },
             new Doctor()
             {
                 Title = "Doctor2", ID = 2, Department = "dep2", QualifiList = new List <string>()
                 {
                     "asfsdf, sdfds"
                 }, Bio = "asdf sdaf sda fsda fasd fasdf asdf adgdf sdf gsdfg sdfg sdf gsdf gsdfg sdf gsdfgsdfgdsgsd gsdf gsdf", Position = "sfasdfa fsdafd fds"
             },
             new Doctor()
             {
                 Title = "Doctor3", ID = 3, Department = "dep3", QualifiList = new List <string>()
                 {
                     "asfsdf, sdfds"
                 }, Bio = "asdf sdaf sda fsda fasd fasdf asdf adgdf sdf gsdfg sdfg sdf gsdf gsdfg sdf gsdfgsdfgdsgsd gsdf gsdf", Position = "sfasdfa fsdafd fds"
             },
             new Doctor()
             {
                 Title = "Doctor4", ID = 4, Department = "dep4", QualifiList = new List <string>()
                 {
                     "asfsdf, sdfds"
                 }, Bio = "asdf sdaf sda fsda fasd fasdf asdf adgdf sdf gsdfg sdfg sdf gsdf gsdfg sdf gsdfgsdfgdsgsd gsdf gsdf", Position = "sfasdfa fsdafd fds"
             },
             new Doctor()
             {
                 Title = "Doctor5", ID = 5, Department = "dep5", QualifiList = new List <string>()
                 {
                     "asfsdf, sdfds"
                 }, Bio = "asdf sdaf sda fsda fasd fasdf asdf adgdf sdf gsdfg sdfg sdf gsdf gsdfg sdf gsdfgsdfgdsgsd gsdf gsdf", Position = "sfasdfa fsdafd fds"
             },
             new Doctor()
             {
                 Title = "Doctor6", ID = 6, Department = "dep6", QualifiList = new List <string>()
                 {
                     "asfsdf, sdfds"
                 }, Bio = "asdf sdaf sda fsda fasd fasdf asdf adgdf sdf gsdfg sdfg sdf gsdf gsdfg sdf gsdfgsdfgdsgsd gsdf gsdf", Position = "sfasdfa fsdafd fds"
             },
         }
     });
 }
Esempio n. 2
0
        public async void SearchDoctors(SearchDoctorRequest request, Action <DoctorResponse> onCompleted)
        {
            var asyncResult = await ExecuteServiceMethod <DoctorResponse>("doctors/SearchDoctors", Method.POST, content =>
            {
                var response = new DoctorResponse()
                {
                    Result = JsonConvert.DeserializeObject <List <Doctor> >(content)
                };
                return(response);
            }, request);

            onCompleted(asyncResult);
        }