public NpgsqlParameter Clone()
{
// use fields instead of properties
// to avoid auto-initializing something like type_info
var clone = new NpgsqlParameter
{
_precision = _precision,
_scale = _scale,
_size = _size,
_dbType = _dbType,
_npgsqlDbType = _npgsqlDbType,
_specificType = _specificType,
Direction = Direction,
IsNullable = IsNullable,
_name = _name,
SourceColumn = SourceColumn,
#if NET45 || NET451
SourceVersion = SourceVersion,
#endif
_value = _value,
_npgsqlValue = _npgsqlValue,
SourceColumnNullMapping = SourceColumnNullMapping,
AutoAssignedName = AutoAssignedName
};
return clone;
}