public override Application GetApplication(string uniqueName)
        {
            AdApplication a = new AdApplication();

            a.Load(Load(uniqueName));

            return(new Application(a));
        }
        public override IEnumerator <Application> GetApplications(IEnumerable <string> uniqueNames, AdminManager store)
        {
            using (LdapConnection conn = GetConnection())
            {
                foreach (var item in uniqueNames)
                {
                    AdApplication a = new AdApplication();
                    a.Load(Load(item, conn));

                    yield return(new Application(a, store));
                }
            }
        }
        public AdAdminManager()
            : base()
        {
            ChangeTrackingDisabled = true;

            SearchResultEntry en = Service.LoadRoot();

            Load(en);

            MajorVersion = int.Parse(GetAttribute(en.Attributes, MAJORVERSION));
            MinorVersion = int.Parse(GetAttribute(en.Attributes, MINORVERSION));

            Groups       = AdApplicationGroup.GetCollection(GetGroupContainerName(), false);
            Applications = AdApplication.GetCollection(Key);

            ChangeTrackingDisabled = false;
        }
        public Application CreateApplication(string parent, string name, string description, string versionInformation)
        {
            AdApplication a = new AdApplication();

            a.ContainerDn        = parent;
            a.Name               = name;
            a.Description        = description;
            a.ApplicationVersion = versionInformation;
            a.Key = string.Format("cn={0},{1}", a.CN, a.ContainerDn);

            a.Groups          = new Collections.ApplicationGroupCollection(false);
            a.Operations      = new Collections.OperationCollection(false);
            a.RoleAssignments = new Collections.RoleAssignmentsCollection();
            a.Roles           = new Collections.RoleDefinitionCollection(false);
            a.Tasks           = new Collections.TaskCollection(false);

            _Service.Save(a.CreateNew());

            return(new Application(a));
        }
        public void UpdateApplication(Interfaces.IApplication application)
        {
            AdApplication a = (AdApplication)application;

            _Service.Save(a.GetUpdate());
        }