Ejemplo n.º 1
0
        public IEnumerable <Application> GetApplications()
        {
            var helper = new AppsHelper(proxyUser, credMgr);
            IEnumerable <Application> apps = helper.GetApplications();

            foreach (var app in apps) // TODO not thrilled about this
            {
                app.User = proxyUser;
            }
            return(apps);
        }
Ejemplo n.º 2
0
        public void DeleteUser(string email)
        {
            // TODO: doing this causes a "not logged in" failure when the user
            // doesn't exist, which is kind of misleading.
            var appsHelper = new AppsHelper(proxyUser, credentialManager);
            foreach (var a in appsHelper.GetApplications(email))
            {
                appsHelper.Delete(a.Name);
            }

            var servicesHelper = new ServicesHelper(proxyUser, credentialManager);
            foreach (var ps in servicesHelper.GetProvisionedServices())
            {
                servicesHelper.DeleteService(ps.Name);
            }

            VcapJsonRequest r = BuildVcapJsonRequest(Method.DELETE, Constants.UsersResource, email);
            r.Execute();
        }
Ejemplo n.º 3
0
        public void DeleteUser(string email)
        {
            // TODO: doing this causes a "not logged in" failure when the user
            // doesn't exist, which is kind of misleading.
            var appsHelper = new AppsHelper(ProxyUser, CredentialManager);

            foreach (Application a in appsHelper.GetApplications(email))
            {
                appsHelper.Delete(a.Name);
            }

            var servicesHelper = new ServicesHelper(ProxyUser, CredentialManager);

            foreach (ProvisionedService ps in servicesHelper.GetProvisionedServices())
            {
                servicesHelper.DeleteService(ps.Name);
            }

            VcapJsonRequest r = BuildVcapJsonRequest(Method.DELETE, Constants.UsersResource, email);

            r.Execute();
        }
Ejemplo n.º 4
0
 public IEnumerable<Application> GetApplications()
 {
     var helper = new AppsHelper(_proxyUser, _credMgr);
     IEnumerable<Application> apps = helper.GetApplications();
     foreach (Application app in apps) // TODO not thrilled about this
     {
         app.User = _proxyUser;
     }
     return apps;
 }