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)}"); }
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); }
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(); }
public abstract Pool GetPool(IPooledColumnType columnType);
protected static bool IsPrimitivePooledColumnType(IPooledColumnType columnType) { return(columnType is IPrimitiveColomnType || (columnType as IArrayColumnType)?.BaseType is IPrimitiveColomnType); }
public override Pool GetPool(IPooledColumnType columnType) { return(Parent.GetPool(columnType)); }
public PooledData(IPooledColumnType columnType, object obj) : base(columnType, obj) { PooledColumnType = columnType; }
public PooledArrayData(IPooledColumnType columnType) : base(columnType) { PooledColumnType = columnType; }