Beispiel #1
0
        public ListColumn(IColumn <T> values, Nullability nullability = Nullability.DefaultToNull)
        {
            _indicesInner = new NumberListColumn <int>();
            _indices      = NullableColumn <NumberList <int> > .Wrap(_indicesInner, nullability);

            _values = values;
        }
Beispiel #2
0
        public DictionaryColumn(IColumn <TKey> keys, IColumn <TValue> values, Nullability nullability = Nullability.DefaultToNull)
        {
            _keys       = keys;
            _values     = values;
            _pairsInner = new NumberListColumn <int>();
            _pairs      = NullableColumn <NumberList <int> > .Wrap(_pairsInner, nullability);

            // Comparer for sorting Dictionary Keys, picked up by ColumnDictionary.
            // Comparer not exposed as argument because column won't work if serialized Dictionaries were sorted differently than comparer would sort.
            _keyComparer = (typeof(TKey) == typeof(string) ? (IComparer <TKey>)StringComparer.Ordinal : new DefaultComparer <TKey>());
        }
 public DictionaryColumn(IColumn <TKey> keys, IColumn <TValue> values)
 {
     _keys   = keys;
     _values = values;
     _pairs  = new NumberListColumn <int>();
 }