Beispiel #1
0
        private List <SecurityPolicyConditionDefinition> GetDefinitionTree(SecurityPolicyCondition c)
        {
            var output = new List <SecurityPolicyConditionDefinition>();

            foreach (var sc in c.SubConditions)
            {
                output.Add(sc.GetDefinition());
            }

            return(output);
        }
        private List <SecurityPolicyQuestion> get_condition_question(SecurityPolicyCondition c)
        {
            var qs = new List <SecurityPolicyQuestion>();

            qs.Add(c.Question);
            foreach (var sc in c.SubConditions)
            {
                qs.AddRange(get_condition_question(sc));
            }
            return(qs);
        }
        internal SecurityPolicyCondition GetObject(DBTable t)
        {
            var condition = new SecurityPolicyCondition
            {
                Order    = Order,
                Question = t.SecurityPolicyQuestions.Where(q => q.ID == Question).FirstOrDefault()
            };

            foreach (var scd in SubConditions)
            {
                condition.SubConditions.Add(scd.GetObject(t));
            }

            return(condition);
        }