public void Add(JSONSubscription json) { subscriptions.Add(json.SubscriptionName, new Subscription(json)); byte[] certBytes = Storage.GetBlockBlobBytes(json.MgtCertFileName); X509Certificate2 cert = new X509Certificate2(certBytes, json.MgtCertPassword, X509KeyStorageFlags.MachineKeySet); subscriptions[json.SubscriptionName].MgtCertificate = cert; }
public Subscription(JSONSubscription json) { SubscriptionId = json.SubscriptionId; MgtCertFileName = json.MgtCertFileName; PackageStorageAcct = json.PackageStorageAcct; PackageStorageKey = json.PackageStorageKey; PackageContainerName = json.PackageContainerName; }