Пример #1
0
        public DistinguishedNameResolver(IsamDatabase database, DirectorySchema schema)
        {
            // Initialize the DN cache, while pre-caching the root DN as a sentinel.
            this.dnCache = new Dictionary <int, DistinguishedName>();
            this.dnCache.Add(ADConstants.RootDNTag, new DistinguishedName());

            // Cache AD schema and datatable cursor
            this.schema = schema;
            this.cursor = database.OpenCursor(ADConstants.DataTableName);
        }
Пример #2
0
        // TODO: Internal?
        // TODO: ISchema
        public DirectorySchema(IsamDatabase database)
        {
            TableDefinition dataTable = database.Tables[ADConstants.DataTableName];

            this.LoadColumnList(dataTable.Columns);
            this.LoadAttributeIndices(dataTable.Indices2);
            using (var cursor = database.OpenCursor(ADConstants.DataTableName))
            {
                this.LoadClassList(cursor);
                this.LoadAttributeProperties(cursor);
                this.LoadPrefixMap(cursor);
            }
            // TODO: Load Ext-Int Map from hiddentable
        }
Пример #3
0
        public LinkResolver(IsamDatabase database, DirectorySchema schema)
        {
            this.schema = schema;
            this.cursor = database.OpenCursor(ADConstants.LinkTableName);
            if (this.cursor.TableDefinition.Indices.Contains(linkIndex2008))
            {
                this.cursor.SetCurrentIndex(linkIndex2008);
            }
            else
            {
                // Fallback to the old index if the newer one does not exist
                cursor.SetCurrentIndex(linkIndex2003);
            }

            // TODO: Load column ids instead of names
        }
 public DistinguishedNameResolver(IsamDatabase database, DirectorySchema schema)
 {
     this.dnCache = new Dictionary <int, string>();
     this.schema  = schema;
     this.cursor  = database.OpenCursor(ADConstants.DataTableName);
 }
 public SecurityDescriptorRersolver(IsamDatabase database)
 {
     this.cursor = database.OpenCursor(ADConstants.SecurityDescriptorTableName);
 }