/// <summary> /// Constructor. ResourceManager runs the worflows against resources. /// </summary> /// <param name="pathToAuth"> path to a valid azure auth file which defines credentials for AAD file. </param> public ResourceManager(string pathToAuth) { this.accountWorkflow = new AccountWorkflows(pathToAuth); this.docdbWorkflows = new Dictionary <string, DocumentDBWorkflows>(); this.mongodbWorkflows = new Dictionary <string, MongoDBWorkflows>(); this.graphWorkflows = new Dictionary <string, GraphWorkflows>(); this.tableWorkflows = new Dictionary <string, TableWorkflows>(); }
/// <summary> /// executes account level operations. /// </summary> /// <param name="wf"> an instance of account workflows. </param> /// <param name="op"> the operation to complete. </param> public void RunAccount(AccountWorkflows wf, int op) { switch (op) { case 0: wf.CreateDatabaseAccountWF(); break; case 1: wf.DeleteDatabaseAccountWF(); break; case 2: wf.ListDatabaseAccountsWF(); break; case 3: wf.ListDatabaseAccountInformationWF(); break; } }