Generator.OnInitialize Method

Initializes the generator.

Namespace:  Microsoft.Data.Schema.DataGenerator
Assembly:  Microsoft.Data.Schema (in Microsoft.Data.Schema.dll)

Syntax

'Declaration
Protected Overridable Sub OnInitialize ( _
    initInfo As GeneratorInit _
)
'Usage
Dim initInfo As GeneratorInit 

Me.OnInitialize(initInfo)
protected virtual void OnInitialize(
    GeneratorInit initInfo
)
protected:
virtual void OnInitialize(
    GeneratorInit^ initInfo
)
protected function OnInitialize(
    initInfo : GeneratorInit
)

Parameters

Remarks

OnInitialize runs any initialization code that is required before data generation starts. This code can include initializing a random object or caching a database.

When you generate random data, it can be deterministic or non-deterministic. Deterministic data repeats the same random data every time that you generate it with the same seed. All data generators have a Seed property that the user can set. You can override the OnInitialize method to seed the Random objects and make your generator deterministic.

The Initialize method calls this method. You should override OnInitialize if you want to override the Initialize functionality.

.NET Framework Security

See Also

Reference

Generator Class

Generator Members

Microsoft.Data.Schema.DataGenerator Namespace