Ejemplo n.º 1
0
        private async Task LoginToManagedCompany(EnterpriseMcLoginOptions options)
        {
            var mcAuth = new ManagedCompanyAuth();
            await mcAuth.LoginToManagedCompany(Enterprise, options.CompanyId);

            NextState = new McEnterpriseContext(mcAuth);
        }
Ejemplo n.º 2
0
 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);
             }
         });
     }
 }