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 override void Load(SearchResultEntry entry) { ChangeTrackingDisabled = true; base.Load(entry); CN = GetAttribute(entry.Attributes, "name"); ApplicationVersion = GetAttribute(entry.Attributes, VERSION); ContainerDn = Key.Substring(4 + CN.Length); Groups = AdApplicationGroup.GetCollection(string.Format("cn={0}{2},{1}", GROUPSCONTAINER, Key, CN), false); Roles = AdRoleDefinition.GetRoles(string.Format("cn={0}{2},{1}", TASKSCONTAINER, Key, CN), false); RoleAssignments = new Collections.RoleAssignmentsCollection(); Tasks = AdTask.GetTasks(string.Format("cn={0}{2},{1}", TASKSCONTAINER, Key, CN), false); Operations = AdOperation.GetCollection(string.Format("cn={0}{1},{2}", OPSCONTAINER, CN, Key), false); ChangeTrackingDisabled = false; }