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)


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


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


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


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


GeneratorStylesAttribute Members

Microsoft.Data.Schema.DataGenerator Namespace


Other Resources

How to: Create Custom Data Generators