public async Task <List <HoloLensProcess> > GetActiveProcessesAsync()
        {
            var content = await HoloLensHttpHelpers.GetContentAsync(Constants.ActiveProcessesUri);

            var jsonObject = JObject.Parse(content)["Processes"];

            return(jsonObject.ToObject <List <HoloLensProcess> >());
        }
        public async Task <Battery> GetBatteryAsync()
        {
            var content = await HoloLensHttpHelpers.GetContentAsync(Constants.BatteryUri);

            return(await Task.Run(() => JsonConvert.DeserializeObject <Battery>(content)));
        }
        public async Task <PowerState> GetPowerStateAsync()
        {
            var content = await HoloLensHttpHelpers.GetContentAsync(Constants.StateUri);

            return(await Task.Run(() => JsonConvert.DeserializeObject <PowerState>(content)));
        }
        public async Task <ActivePowerScheme> GetActivePowerSchemeIdAsync()
        {
            var content = await HoloLensHttpHelpers.GetContentAsync(Constants.ActiveConfigurationUri);

            return(await Task.Run(() => JsonConvert.DeserializeObject <ActivePowerScheme>(content)));
        }
Exemple #5
0
        public async Task <string> GetMachineNameAsync()
        {
            var content = await HoloLensHttpHelpers.GetContentAsync(Constants.MachineNameUri);

            return(JObject.Parse(content)["ComputerName"].ToString());
        }
Exemple #6
0
        public async Task <Info> GetInfoAsync()
        {
            var content = await HoloLensHttpHelpers.GetContentAsync(Constants.InfoUri);

            return(JsonConvert.DeserializeObject <Info>(content));
        }
        public async Task <string> GetInstallationStateAsync()
        {
            var content = await HoloLensHttpHelpers.GetContentAsync(Constants.InstallationStateUri);

            return(JObject.Parse(content)["Reason"].ToString());
        }
        public async Task <PackageManager> GetInstalledPackagesAsync()
        {
            var content = await HoloLensHttpHelpers.GetContentAsync(Constants.PackagesUri);

            return(JsonConvert.DeserializeObject <PackageManager>(content));
        }
        public async Task <WprStatus> GetWprStatusAsync()
        {
            var content = await HoloLensHttpHelpers.GetContentAsync(Constants.StatusUri);

            return(JsonConvert.DeserializeObject <WprStatus>(content));
        }
        public async Task <PowerScheme> GetCurrentSchemeAsync()
        {
            var content = await HoloLensHttpHelpers.GetContentAsync(Constants.SchemeCurrentUri);

            return(await new PowerSchemeParser().ParseAsync(content));
        }