public ConnectedAzureAccountTokenCache(ConnectedAzureAccount account) { _account = account; BeforeAccess = BeforeAccessImpl; AfterAccess = AfterAccessImpl; }
public AzureAccountControlViewModel() { Account = new ConnectedAzureAccount(); _azure = MultiTenantAzure.FromAccount(Account); _azure.UserTokenInteraction = this; InitialiseAsync().Forget(); }
public AzureAccount(ConnectedAzureAccount connectedAzureAccount) : base(connectedAzureAccount.DisplayName, "azure/directory") { _client = MultiTenantAzure.FromAccount(connectedAzureAccount); CommandGroups.Add(new HierarchicalResourceCommandGroup( new HierarchicalResourceCommand("refresh", Symbol.Refresh, RefreshAsync), new HierarchicalResourceCommand("delete", Symbol.Delete, DeleteAsync))); RefreshAsync().Forget(); _connectedAzureAccount = connectedAzureAccount; }
public static MultiTenantAzure FromAccount(ConnectedAzureAccount connectedAzureAccount) { var tokenCache = new ConnectedAzureAccountTokenCache(connectedAzureAccount); return(new MultiTenantAzure(AzureCliClientId, tokenCache)); }