コード例 #1
0
        private void LoadPrefixMap(Cursor dataTableCursor)
        {
            // Find the Schema Naming Context using this filter: (objectCategory=dMD)
            dataTableCursor.FindAllRecords();
            dataTableCursor.CurrentIndex = this.FindIndexName(CommonDirectoryAttributes.ObjectCategory);
            int  schemaObjectCategoryId = this.FindClassId(CommonDirectoryClasses.Schema);
            bool schemaFound            = dataTableCursor.GotoKey(Key.Compose(schemaObjectCategoryId));

            // Load the prefix map from this object
            var prefixMapColId = this.FindColumnId(CommonDirectoryAttributes.PrefixMap);

            byte[] binaryPrefixMap = dataTableCursor.RetrieveColumnAsByteArray(prefixMapColId);
            this.PrefixMapper = new PrefixMap(binaryPrefixMap);

            foreach (var attribute in this.attributesByName.Values)
            {
                if (attribute.Id.HasValue)
                {
                    attribute.Oid = this.PrefixMapper.Translate((uint)attribute.Id.Value);
                }
            }
        }
コード例 #2
0
        private void LoadPrefixMap(Cursor dataTableCursor)
        {
            // Find the Schema Naming Context by its objectCategory
            dataTableCursor.CurrentIndex = this.FindIndexName(CommonDirectoryAttributes.ObjectCategory);
            int schemaObjectCategoryId = this.FindClassId(CommonDirectoryClasses.Schema);
            bool schemaFound = dataTableCursor.GotoKey(Key.Compose(schemaObjectCategoryId));

            // Load the prefix map from this object
            var prefixMapColId = this.FindColumnId(CommonDirectoryAttributes.PrefixMap);
            byte[] binaryPrefixMap = dataTableCursor.RetrieveColumnAsByteArray(prefixMapColId);
            this.PrefixMapper = new PrefixMap(binaryPrefixMap);

            foreach(var attribute in this.attributesByName.Values)
            {
                if (attribute.Id.HasValue)
                {
                    attribute.Oid = this.PrefixMapper.Translate((uint)attribute.Id.Value);
                }
            }
        }