Example #1
0
        public override Task GetTask(string uniqueName)
        {
            XmlTask t = new XmlTask();

            t.Load(uniqueName);

            return(new Task(t));
        }
Example #2
0
        public override IEnumerator <Task> GetTasks(IEnumerable <string> uniqueNames, Application application)
        {
            foreach (var item in FindElements(uniqueNames))
            {
                XmlTask t = new XmlTask();
                t.Load(item);

                yield return(new Task(t, application));
            }
        }
Example #3
0
        protected override void LoadInternal(XmlElement element)
        {
            base.LoadInternal(element);
            ApplicationVersion = GetAttribute(element, APPLICATIONVERSION);

            Groups          = new Collections.ApplicationGroupCollection(XmlApplicationGroup.GetChildren(element), false);
            Operations      = new Collections.OperationCollection(XmlOperation.GetChildren(element), false);
            Tasks           = new Collections.TaskCollection(XmlTask.GetTasks(element), false);
            Roles           = new Collections.RoleDefinitionCollection(XmlRoleDefinition.GetRoles(element), false);
            RoleAssignments = new Collections.RoleAssignmentsCollection(XmlRoleAssignments.GetChildren(element));
        }
Example #4
0
        public Task CreateTask(string parent, string name, string description)
        {
            XmlTask t = new XmlTask();

            t.Key         = System.Guid.NewGuid().ToString();
            t.Name        = name;
            t.Description = description;

            t.Operations = new Collections.OperationCollection(true);
            t.Tasks      = new Collections.TaskCollection(true);

            XmlElement thisNode = _Service.Load(parent);

            _Service.Save(t.ToXml(thisNode));

            return(new Task(t));
        }