コード例 #1
0
        public object ToObject(DbValue item, IMember member)
        {
            // Gracefully migrate from number sets to a custom binary serializer that respects order
            switch (item.Kind)
            {
            case DbValueType.NS: return(new Int32List(item.ToArray <int>()));

            case DbValueType.B: return(Int32List.FromBytes(item.ToBinary()));

            default: return(new Int32List());
            }
        }
コード例 #2
0
        public object ToObject(DbValue item, IMember member)
        {
            // Gracefully migrates from StringSets and custom binary provider to a List

            switch (item.Kind)
            {
            case DbValueType.SS: return(new StringList(item.ToStringSet()));

            case DbValueType.B: return(StringList.FromBytes(item.ToBinary()));

            case DbValueType.L: return(new StringList(item.ToArray <string>()));

            default: return(new StringList());
            }
        }
コード例 #3
0
 public object ToObject(DbValue item, IMember member) => item.ToArray <T>();
コード例 #4
0
        // item.ToStringSet().ToArray();

        public override string[] Parse(DbValue dbValue) => dbValue.ToArray <string>();