Пример #1
0
 public ReadOnlyActiveDirectorySchemaPropertyCollection FindAllProperties(PropertyTypes type)
 {
     base.CheckIfDisposed();
     if (((int)type & -7) == 0)
     {
         StringBuilder stringBuilder = new StringBuilder(25);
         stringBuilder.Append("(&(");
         stringBuilder.Append(PropertyManager.ObjectCategory);
         stringBuilder.Append("=attributeSchema)");
         stringBuilder.Append("(!(");
         stringBuilder.Append(PropertyManager.IsDefunct);
         stringBuilder.Append("=TRUE))");
         if ((type & PropertyTypes.Indexed) != 0)
         {
             stringBuilder.Append("(");
             stringBuilder.Append(PropertyManager.SearchFlags);
             stringBuilder.Append(":1.2.840.113556.1.4.804:=");
             stringBuilder.Append(1);
             stringBuilder.Append(")");
         }
         if ((type & PropertyTypes.InGlobalCatalog) != 0)
         {
             stringBuilder.Append("(");
             stringBuilder.Append(PropertyManager.IsMemberOfPartialAttributeSet);
             stringBuilder.Append("=TRUE)");
         }
         stringBuilder.Append(")");
         return(ActiveDirectorySchema.GetAllProperties(this.context, this.schemaEntry, stringBuilder.ToString()));
     }
     else
     {
         throw new ArgumentException(Res.GetString("InvalidFlags"), "type");
     }
 }
Пример #2
0
        public ReadOnlyActiveDirectorySchemaPropertyCollection FindAllProperties()
        {
            base.CheckIfDisposed();
            string[] objectCategory = new string[5];
            objectCategory[0] = "(&(";
            objectCategory[1] = PropertyManager.ObjectCategory;
            objectCategory[2] = "=attributeSchema)(!(";
            objectCategory[3] = PropertyManager.IsDefunct;
            objectCategory[4] = "=TRUE)))";
            string str = string.Concat(objectCategory);

            return(ActiveDirectorySchema.GetAllProperties(this.context, this.schemaEntry, str));
        }