public dmCollection()
     : base(null)
 {
     Disabled         = new dmGroup(this);
     Disabled.Name    = "Disabled";
     Disabled.Comment = "Disabled Groups and Rulesets";
 }
        protected int ParseGroup(string[] strArray, int nLineStart, dmContainer Parent)
        {
            int     nReturn  = nLineStart;
            dmGroup newGroup = new dmGroup(this);
            Dictionary <string, string> itemParameters = GetParameters(strArray[nReturn]);

            foreach (KeyValuePair <string, string> item in itemParameters)
            {
                switch (item.Key)
                {
                case "FILTERSANDDEFAULTS":
                    newGroup.FiltersAndDefaults.Parse(item.Value);
                    break;

                case "GROUP":
                    newGroup.Name = item.Value;
                    break;

                case "COMMENT":
                    newGroup.Comment = item.Value;
                    break;
                }
            }
            nReturn++;

            //parses until it reaches the end of the group and returns the line number after the end of the group
            while (nReturn < strArray.Length && IdentifyLineType(strArray[nReturn]) != LineParseType.GroupEndLine)
            {
                string[] tmpVariable = new string[0];
                switch (IdentifyLineType(strArray[nReturn]))
                {
                case LineParseType.GroupStartLine:
                    nReturn = ParseGroup(strArray, nReturn, newGroup);
                    break;

                case LineParseType.RulesetLine:
                case LineParseType.RulesetNameLine:
                    nReturn = ParseRuleset(strArray, nReturn, newGroup);
                    break;

                default:
                    nReturn++;
                    break;
                }
            }
            nReturn++;
            Parent.AddGroup(newGroup);

            return(nReturn);
        }
 public dmCollection(dmGroup rsGroup)
     : this()
 {
     this.Groups.Add(rsGroup.Clone(this));
 }
 public int IndexOfGroup(dmGroup item)
 {
     return(Groups.IndexOf(item));
 }
 public bool ContainsGroup(dmGroup item)
 {
     return(Groups.Contains(item));
 }
 public void InsertGroup(int index, dmGroup item)
 {
     Groups.Insert(index, item);
 }
 public bool RemoveGroup(dmGroup item)
 {
     return(Groups.Remove(item));
 }
 public bool Contains(dmGroup item)
 {
     return(ContainsGroup(item));
 }
 public void AddGroup(dmGroup rsgGroup)
 {
     this.Groups.Add(rsgGroup);
 }