Exemplo n.º 1
0
 public CompanyServices()
 {
     _service      = new NetServices();
     _jsonSettings = new JsonSerializerSettings()
     {
         NullValueHandling = NullValueHandling.Ignore
     };
     Task.Run(async() => AppSettings.Companies = await GetCompanies());
 }
Exemplo n.º 2
0
        public async Task <bool> CheckConnection(string domain)
        {
            NetServices service = new NetServices(AppSettings.BaseServerTimeout);

            try
            {
                HttpResponseMessage response = await service.GetResponse($"{domain}/api/home");

                return(response.IsSuccessStatusCode);
            }
            catch
            {
                return(false);
            }
        }
Exemplo n.º 3
0
        public async Task <List <DashboardItem> > GetItems()
        {
            NetServices service = new NetServices();

            return(await service.GetDeserializedObject <List <DashboardItem> >($"{AppSettings.CurrentDomain}/api/dashboarditems"));
        }