Exemplo n.º 1
0
        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);
            }
        }
Exemplo n.º 2
0
 public void Init()
 {
     instance = new ProvisionInfo();
 }