private void createOrUpdateVariableAsset(string variableAssetName, AutomationVariable variableToEdit) { var dialog = new NewOrEditVariableDialog(variableToEdit); if (dialog.ShowDialog() == true) { var assetsToSave = new List <AutomationAsset>(); var newVariable = new AutomationVariable(variableAssetName, dialog.value, dialog.encrypted); assetsToSave.Add(newVariable); AutomationAssetManager.SaveLocally(iseClient.currWorkspace, assetsToSave, getEncryptionCertificateThumbprint()); refreshAssets(); } }
private void createOrUpdateCredentialAsset(string credentialAssetName, AutomationCredential credToEdit) { var dialog = new NewOrEditCredentialDialog(credToEdit); if (dialog.ShowDialog() == true) { var assetsToSave = new List <AutomationAsset>(); var newCred = new AutomationCredential(credentialAssetName, dialog.username, dialog.password); assetsToSave.Add(newCred); AutomationAssetManager.SaveLocally(iseClient.currWorkspace, assetsToSave, getEncryptionCertificateThumbprint()); refreshAssets(); } }