GeneratorStylesAttribute Class

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

Namespace: Microsoft.VisualStudio.TeamSystem.Data.DataGenerator
Assembly: Microsoft.VisualStudio.TeamSystem.Data (in microsoft.visualstudio.teamsystem.data.dll)

Syntax

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

Remarks

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

Example

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.VisualStudio.TeamSystem.Data.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

Tasks

How to: Create Custom Data Generators

Reference

GeneratorStylesAttribute Members
Microsoft.VisualStudio.TeamSystem.Data.DataGenerator Namespace
GeneratorDesignerStyles Enumeration