コード例 #1
0
        internal static MultiValuedProperty <ADObjectId> GetLinks(ADPropertyDefinition propertyDefinition, bool deleted, SearchResultAttributeCollection attributeCollection, List <ADPropertyDefinition> rangedProperties, List <ValidationError> errors)
        {
            int                  num   = deleted ? 0 : 1;
            IntRange             range = new IntRange(num, num);
            ADPropertyDefinition adpropertyDefinition = new ADPropertyDefinition(propertyDefinition.Name, propertyDefinition.VersionAdded, typeof(ADObjectId), propertyDefinition.LdapDisplayName, propertyDefinition.Flags | ADPropertyDefinitionFlags.MultiValued, propertyDefinition.DefaultValue, PropertyDefinitionConstraint.None, PropertyDefinitionConstraint.None, null, null);

            adpropertyDefinition = RangedPropertyHelper.CreateRangedProperty(adpropertyDefinition, range);
            DirectoryAttribute directoryAttribute = attributeCollection[adpropertyDefinition.LdapDisplayName];

            if (directoryAttribute != null)
            {
                return(ADValueConvertor.GetValueFromDirectoryAttribute(null, directoryAttribute, adpropertyDefinition, true, rangedProperties, null, errors, null, false) as MultiValuedProperty <ADObjectId>);
            }
            return(null);
        }