Beispiel #1
0
        public APIDeviceCommand()
        {
            this.ID          = 0;
            this.Title       = "";
            this.Description = "";
            this.CommandCode = "";

            this.Device = new APIDevice();
        }
Beispiel #2
0
 public APIEndPoint()
 {
     this.ID = 0;
     //this.Guid = Guid.Empty;
     this.KeyPass      = Guid.Empty;
     this.Title        = "";
     this.Device       = new APIDevice();
     this.EndPointType = new APIEndPointType();
 }
Beispiel #3
0
        public static async Task<APIDevice> GetDeviceInfo(Guid deviceKeyPass)
        {
            APIDevice dev = new APIDevice();
            using (var client = new HttpClient())
            {
                client.BaseAddress = new Uri(C.WebAppURL);
                client.DefaultRequestHeaders.Accept.Clear();
                client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json"));

                HttpResponseMessage response = await client.GetAsync("api/APISimulatorServices/GetDeviceInfo?" + C.PlatformGUIDParam + "&deviceKeyPass=" + deviceKeyPass);
                if (response.IsSuccessStatusCode)
                {
                    dev = response.Content.ReadAsAsync<APIDevice>().Result;
                    return dev;
                }
            }
            return dev;
        }