private async Task LoginToManagedCompany(EnterpriseMcLoginOptions options) { var mcAuth = new ManagedCompanyAuth(); await mcAuth.LoginToManagedCompany(Enterprise, options.CompanyId); NextState = new McEnterpriseContext(mcAuth); }
public McEnterpriseContext(ManagedCompanyAuth auth) { if (auth.AuthContext.IsEnterpriseAdmin) { Enterprise = new EnterpriseData(auth, auth.TreeKey); Task.Run(async() => { try { await Enterprise.PopulateEnterprise(); await this.AppendEnterpriseCommands(this); } catch (Exception e) { Debug.WriteLine(e); } }); } }