Share via


GeneratorStylesAttribute Class

The attribute that identifies the generator styles of a data generator.

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

Syntax

'Declaration
<AttributeUsageAttribute(AttributeTargets.Class, AllowMultiple := False, Inherited := True)> _
<CLSCompliantAttribute(True)> _
Public NotInheritable Class GeneratorStylesAttribute _
    Inherits Attribute
'Usage
Dim instance As GeneratorStylesAttribute
[AttributeUsageAttribute(AttributeTargets.Class, AllowMultiple = false, Inherited = true)]
[CLSCompliantAttribute(true)]
public sealed class GeneratorStylesAttribute : Attribute
[AttributeUsageAttribute(AttributeTargets::Class, AllowMultiple = false, Inherited = true)]
[CLSCompliantAttribute(true)]
public ref class GeneratorStylesAttribute sealed : public Attribute
public final class GeneratorStylesAttribute extends Attribute

Remarks

The designer uses DesignerStyles to determine whether to display a generator in a given context.

Examples

The following example demonstrates how to decorate a data generator with the GeneratorStylesAttribute. In this example, the designer style is set to CanProduceUniqueValues so that the generator can be used as the default data generator for a type of SQL column.

[GeneratorStyles(DesignerStyles = GeneratorDesignerStyles.CanProduceUniqueValues)]
public class TestGenerator:Generator
{

}
<GeneratorStyles(DesignerStyles:=GeneratorDesignerStyles.CanProduceUniqueValues)> _
Public Class TestGenerator
    Inherits Generator

End Class

Inheritance Hierarchy

System.Object
  System.Attribute
    Microsoft.Data.Schema.DataGenerator.GeneratorStylesAttribute

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also

Reference

GeneratorStylesAttribute Members

Microsoft.Data.Schema.DataGenerator Namespace

GeneratorDesignerStyles

Other Resources

How to: Create Custom Data Generators