Esempio n. 1
0
        public void InsertOrIgnore(TKey key, TRecord record)
        {
            IData ikey = KeyTransformer.ToIData(key);
            IData irec = RecordTransformer.ToIData(record);

            Index.InsertOrIgnore(ikey, irec);
        }
Esempio n. 2
0
        public void Replace(TKey key, TRecord record)
        {
            IData ikey = KeyTransformer.ToIData(key);
            IData irec = RecordTransformer.ToIData(record);

            Index.Replace(ikey, irec);
        }
Esempio n. 3
0
        public TRecord TryGetOrDefault(TKey key, TRecord defaultRecord)
        {
            IData ikey        = KeyTransformer.ToIData(key);
            IData idefaultRec = RecordTransformer.ToIData(defaultRecord);
            IData irec        = Index.TryGetOrDefault(ikey, idefaultRec);

            TRecord record = RecordTransformer.FromIData(irec);

            return(record);
        }
Esempio n. 4
0
        public TRecord this[TKey key]
        {
            get
            {
                IData ikey = KeyTransformer.ToIData(key);
                IData irec = Index[ikey];

                return(RecordTransformer.FromIData(irec));
            }
            set
            {
                IData ikey = KeyTransformer.ToIData(key);
                IData irec = RecordTransformer.ToIData(value);

                Index[ikey] = irec;
            }
        }