示例#1
0
 public DataIndex(DbTable <T> loader, string name, Func <T, K> getter, IComparer <K> comparer, Func <K, object, Lazy <T> > lazyCtor, MemberInfo[] members)
 {
     _name     = name;
     _keys     = members;
     _getter   = getter;
     _table    = loader;
     _lazyCtor = lazyCtor;
     _tree     = new RBTree <K, DataNode <K> >(comparer);
 }
示例#2
0
        public KeyIndex(DbTable <T> table, Func <T, K> getter, MemberInfo key, IComparer <K> comparer)
        {
            _tree   = new RBTree <K, KeyNode <K> >(comparer);
            _getter = getter;
            _table  = table;

            if (key != null)
            {
                _setter = MakeSetter(key);
            }

            _keys = new[] { key };
        }