public async Task <string> ProvisionPkgsAsync(DeviceManagementClient client) { try { var provInfo = new ProvisionInfo(); var ppkgPath = await ProvisioningPackage.DownloadToTempAsync(client); provInfo.ProvisioningPkgs.Add(ppkgPath); await client.ProvisionAsync(provInfo); var response = JsonConvert.SerializeObject(new { response = "succeeded" }); return(response); } catch (Exception e) { var response = JsonConvert.SerializeObject(new { response = "failed", reason = e.Message }); return(response); } }
public void Init() { instance = new ProvisionInfo(); }