コード例 #1
0
 DataService()
 {
     roadInformation     = new RoadInformation();
     boothInformation    = new BoothInformation();
     agentInformation    = new AgentInformation();
     contactsInformation = new ContactsInformation();
 }
コード例 #2
0
        public static ContactsInformation GetContactsData(int accountId)
        {
            string data = SendData(baseUrl + accountId + "/contacts", null);
            ContactsInformation contacts = null;

            try
            {
                contacts = JsonConvert.DeserializeObject <ContactsInformation>(data);
            }
            catch (Exception ex)
            {
                Console.WriteLine("An error occured while parsing received JSON data: " + ex.Message);
            }

            return(contacts);
        }