public override Task GetTask(string uniqueName) { AdTask t = new AdTask(); t.Load(Load(uniqueName)); return(new Task(t)); }
public override IEnumerator <Task> GetTasks(IEnumerable <string> uniqueNames, Application application) { using (LdapConnection conn = GetConnection()) { foreach (var item in uniqueNames) { AdTask a = new AdTask(); a.Load(Load(item, conn)); yield return(new Task(a, application)); } } }
public Task CreateTask(string parent, string name, string description) { AdTask t = new AdTask(); t.ContainerDn = parent; t.Name = name; t.Description = description; t.Operations = new Collections.OperationCollection(true); t.Tasks = new Collections.TaskCollection(true); _Service.Save(t.CreateNew()); return(new Task(t)); }
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; }
public void UpdateTask(Interfaces.ITask task) { AdTask t = (AdTask)task; _Service.Save(t.GetUpdate()); }