Exemplo n.º 1
0
        public ServerEntry(ILdapEntry entry)
        {
            dn = entry.getDN();
            LdapValue val = entry.getAttributeValues(AttributeConstants.CN)[0];

            serverName = val.StringValue;
        }
Exemplo n.º 2
0
        public DseRootEntry(ILdapEntry entry)
        {
            LdapValue val = entry.getAttributeValues(AttributeConstants.NAMING_CONTEXT)[0];

            domain = val.StringValue;

            val      = entry.getAttributeValues(AttributeConstants.SERVER_NAME)[0];
            serverDn = val.StringValue;
        }
Exemplo n.º 3
0
        public SubSchemaSubEntry(ILdapEntry entry)
        {
            List <LdapValue> atVals = entry.getAttributeValues(AttributeConstants.ATTRIBUTE_TYPES);
            List <LdapValue> ocVals = entry.getAttributeValues(AttributeConstants.OBJECT_CLASSES);
            List <LdapValue> crVals = entry.getAttributeValues(AttributeConstants.DIT_CONTENT_RULES);

            attributeTypeList = ConstructAttributeTypeList(atVals);
            objectClassList   = ConstructObjectClassList(ocVals, crVals);
        }
Exemplo n.º 4
0
        public SchemaEntry(ILdapEntry entry)
        {
            LdapValue val = entry.getAttributeValues(AttributeConstants.CN)[0];

            defName = val.StringValue;

            List <LdapValue> vals = entry.getAttributeValues(AttributeConstants.ATTRIBUTE_METADATA);

            metadataList = ConstructMetadataList(vals);
        }
Exemplo n.º 5
0
        public Dictionary <string, VMDirAttributeDTO> GetEntryProperties(ILdapEntry entry)
        {
            Dictionary <string, VMDirAttributeDTO> properties = new Dictionary <string, VMDirAttributeDTO>();

            string[] attNamerArr = entry.getAttributeNames().ToArray();
            foreach (string attrName in attNamerArr)
            {
                LdapValue[]       attrValArr = entry.getAttributeValues(attrName).ToArray();
                var               typeDTO    = _schemaManager.GetAttributeType(attrName);
                VMDirAttributeDTO dto        = new VMDirAttributeDTO(attrName, new List <LdapValue>(attrValArr), typeDTO);
                properties[attrName] = dto;
            }
            return(properties);
        }
Exemplo n.º 6
0
        public static string GetObjectClass(ILdapEntry entry)
        {
            var values = entry.getAttributeValues(VMDirConstants.ATTR_OBJECT_CLASS);

            return(values[(values.Count - 1)].StringValue);
        }