Beispiel #1
0
        private SchemaComparableList <ObjectClass> ConstructObjectClassList(List <LdapValue> ocVals, List <LdapValue> crVals)
        {
            SchemaComparableList <ObjectClass> ocList = new SchemaComparableList <ObjectClass>();
            SchemaComparableList <ContentRule> crList = new SchemaComparableList <ContentRule>();

            foreach (LdapValue v in ocVals)
            {
                ocList.Add(new ObjectClass(v.StringValue));
            }
            ocList.Sort();

            foreach (LdapValue v in crVals)
            {
                crList.Add(new ContentRule(v.StringValue));
            }
            crList.Sort();

            for (int i = 0, j = 0; i < ocList.Count && j < crList.Count; i++)
            {
                if (ocList[i].NameCompareTo(crList[j]) == 0)
                {
                    ocList[i].MergeContentRule(crList[j]);
                    j++;
                }
            }
            return(ocList);
        }
Beispiel #2
0
        private SchemaComparableList <AttributeMetadata> ConstructMetadataList(List <LdapValue> vals)
        {
            SchemaComparableList <AttributeMetadata> list = new SchemaComparableList <AttributeMetadata>();

            foreach (LdapValue v in vals)
            {
                list.Add(new AttributeMetadata(v.StringValue));
            }
            list.Sort();
            return(list);
        }
Beispiel #3
0
        private SchemaComparableList <AttributeType> ConstructAttributeTypeList(List <LdapValue> atVals)
        {
            SchemaComparableList <AttributeType> atList = new SchemaComparableList <AttributeType>();

            foreach (LdapValue v in atVals)
            {
                atList.Add(new AttributeType(v.StringValue));
            }
            atList.Sort();
            return(atList);
        }