Share via


Generator.OnInitialize Method

Initializes the generator.

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

Syntax

'Declaration
Protected Overridable Sub OnInitialize ( _
    initInfo As GeneratorInit _
)
protected virtual void OnInitialize(
    GeneratorInit initInfo
)
protected:
virtual void OnInitialize(
    GeneratorInit^ initInfo
)
abstract OnInitialize : 
        initInfo:GeneratorInit -> unit 
override OnInitialize : 
        initInfo:GeneratorInit -> unit 
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 nondeterministic. Deterministic data repeats the same random data every time it is generated 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 to make your generator deterministic.

The Initialize() method calls this method. To modify the functionality of the Initialize() method, you must override the OnInitialize method.

.NET Framework Security

See Also

Reference

Generator Class

Microsoft.Data.Schema.Tools.DataGenerator Namespace

Seed

Initialize()