internal RecordsListView(object groupKey, Index dataIndex, Table <T> table, IRecordsComparer <T> comparer, IMemoryValidator validator, DataIndexBase <T> owner, ValueLockRW locker)
 {
     this.dataIndex = dataIndex;
     this.table     = table;
     this.comparer  = comparer;
     this.validator = validator;
     this.owner     = owner;
     this.locker    = locker;
     this.groupKey  = groupKey;
 }
        // Возвращает оригинальный обьект по коду
        public T GetOriginal(int code, DataIndexBase <T> indexBase)
        {
            var rec = this[code];

            if (rec == null)
            {
                return(rec);
            }

            var obj = Create();

            obj.Code = code;
            obj.Data = rec.GetOrignalForRead(indexBase.Id);

            return(obj);
        }
Example #3
0
        public MapedMultyListInlineKeyIndex(string uniqueName, Table <T> table, IRecordsComparer <T>[] recordsComparers, DataIndexBase <T> owner)
        {
            Name      = uniqueName;
            dataIndex = table.DataBase.Index;

            this.table            = table;
            this.recordsComparers = recordsComparers;
            this.owner            = owner;

            Fields = new Field[0];

            for (var i = 0; i < recordsComparers.Length; ++i)
            {
                recordsComparers[i].Owner = owner;

                Fields = Helper.Concat(Fields, recordsComparers[i].Fields);
            }

            RegisterIndex();
        }
 // Добавить индекс
 internal void AddIndex(DataIndexBase <T> indexBase)
 {
     indexBase.Id = Indexes.Count;
     Indexes.Add(indexBase);
 }