コード例 #1
0
        private string GetPoolName(IPooledColumnType type)
        {
            var arrayColumnType = type as IArrayColumnType;

            if (arrayColumnType != null)
            {
                return($"pool{NormalizeName(arrayColumnType.TypeName.Replace("[]", "Array"))}");
            }

            return($"pool{NormalizeName(type.TypeName)}");
        }
コード例 #2
0
            public override Pool GetPool(IPooledColumnType columnType)
            {
                Pool pool;

                if (!poolsDic.TryGetValue(columnType.TypeName, out pool))
                {
                    pool = new Pool();
                    pools.Add(new KeyValuePair <IPooledColumnType, Pool>(columnType, pool));
                    poolsDic.Add(columnType.TypeName, pool);
                }

                return(pool);
            }
コード例 #3
0
        private string GetReadFromPoolString(IPooledColumnType type)
        {
            var primitiveColomnType = type as IPrimitiveColomnType;

            if (primitiveColomnType != null)
            {
                return(GetReadFromPrimitiveTypeString(primitiveColomnType));
            }
            var arrayColumnType = type as IArrayColumnType;

            if (arrayColumnType != null)
            {
                return($"Load{NormalizeName(arrayColumnType.TypeName.Replace("[]", "Array"))}(binary)");
            }
            var customColumnType = type as ICustomColumnType;

            if (customColumnType != null)
            {
                return($"Load{NormalizeName(customColumnType.TypeName)}(binary)");
            }
            throw new Exception();
        }
コード例 #4
0
 public abstract Pool GetPool(IPooledColumnType columnType);
コード例 #5
0
 protected static bool IsPrimitivePooledColumnType(IPooledColumnType columnType)
 {
     return(columnType is IPrimitiveColomnType ||
            (columnType as IArrayColumnType)?.BaseType is IPrimitiveColomnType);
 }
コード例 #6
0
 public override Pool GetPool(IPooledColumnType columnType)
 {
     return(Parent.GetPool(columnType));
 }
コード例 #7
0
 public PooledData(IPooledColumnType columnType, object obj)
     : base(columnType, obj)
 {
     PooledColumnType = columnType;
 }
コード例 #8
0
 public PooledArrayData(IPooledColumnType columnType)
     : base(columnType)
 {
     PooledColumnType = columnType;
 }