How to: Add Input Properties to a Data Generator
Input properties of a custom data generator appear in the Properties window, and you can use them to change settings that affect data generation. For example, you might have an input property that specifies a range of numbers in which to generate data. You can create input properties by decorating public properties with the InputAttribute attribute.
To create an input property
Decorate a public property of the generator with the Input attribute, as shown in the following example.
<Input()> _ Public Property Min1() As Integer Set End Set End Property
[Input()] public int Min1 { set {} }
The Input attribute has the optional parameters
Name
andDescription
. These parameters specify the name and the description that appear in the Properties window. If you do not specify the name, the name of the property appears. The following example specifies theName
and theDescription
parameters.<Input(Name:="Range 1 Min", Description:="The minimum for the first range")> _ Public Property Min1 () As Integer Set End Set End Property
[Input(Name="Range 1 Min", Description="The minimum for the first range")] public int Min1 { set {} }
See Also
Tasks
How to: Add Output Properties to a Data Generator
How to: Create Custom Data Generators