C# Class WebApplications.Testing.Data.ColumnDefinition

Exibir arquivo Open project: webappsuk/CoreLibraries

Public Properties

Property Type Description
DbType DbType
DefaultValue object
Fill bool
FixedLength int
IsIsNullable bool
SqlDbType SqlDbType

Private Properties

Property Type Description

Public Methods

Method Description
ColumnDefinition ( [ name, DbType dbType, int length = -1, bool fill = false, bool isNullable = true, [ defaultValue = null ) : System

Initializes a new instance of the ColumnDefinition class.

ColumnDefinition ( [ name, SqlDbType sqlDbType, int length = -1, bool fill = false, bool isNullable = true, [ defaultValue = null ) : System

Initializes a new instance of the ColumnDefinition class.

GetRandomValue ( double nullProbability = 0.0 ) : object

Gets the random value.

ToString ( ) : string
Validate ( object value, object &sqlValue ) : bool

Validates the specified value, to see if it is valid for this column.

Method Details

ColumnDefinition() public method

Initializes a new instance of the ColumnDefinition class.
public ColumnDefinition ( [ name, DbType dbType, int length = -1, bool fill = false, bool isNullable = true, [ defaultValue = null ) : System
name [ The name.
dbType DbType The columns type.
length int The length (if fixed length).
fill bool if set to expects the column to be full (only appropriate for fixed length columns).
isNullable bool if set to the column is nullable.
defaultValue [ The default value (required if column is not nullable).
return System

ColumnDefinition() public method

Initializes a new instance of the ColumnDefinition class.
public ColumnDefinition ( [ name, SqlDbType sqlDbType, int length = -1, bool fill = false, bool isNullable = true, [ defaultValue = null ) : System
name [ The name.
sqlDbType SqlDbType The columns type.
length int The length (if fixed length).
fill bool if set to expects the column to be full (only appropriate for fixed length columns).
isNullable bool if set to the column is nullable.
defaultValue [ The default value (required if column is not nullable).
return System

GetRandomValue() public method

Gets the random value.
public GetRandomValue ( double nullProbability = 0.0 ) : object
nullProbability double The probability of a column's value being set to SQL null (0.0 for no nulls) [Defaults to 0.0 = 0%].
return object

ToString() public method

public ToString ( ) : string
return string

Validate() public method

Validates the specified value, to see if it is valid for this column.
public Validate ( object value, object &sqlValue ) : bool
value object The value.
sqlValue object The SQL value.
return bool

Property Details

DbType public_oe property

The DbType.
public DbType DbType
return DbType

DefaultValue public_oe property

The columns default value.
public object DefaultValue
return object

Fill public_oe property

Whether column should be full.
If this is set to then randomly filled columns will be filled, and explicitly set values must match the length; otherwise the length indicates a maximum.
public bool Fill
return bool

FixedLength public_oe property

The fixed length for the type (-1 indicates variable length - i.e. 'var' types).
public int FixedLength
return int

IsIsNullable public_oe property

Whether the column is nullable.
public bool IsIsNullable
return bool

SqlDbType public_oe property

The SqlDbType.
public SqlDbType SqlDbType
return SqlDbType