Class NumberedTypeGeneratorAttribute
This attribute marks a type which should be cloned by the source generator with a changed constant field value. This type is mainly used by HybridString16 and related types.
[AttributeUsage(AttributeTargets.Struct, AllowMultiple = true)]
public class NumberedTypeGeneratorAttribute : Attribute
- Inheritance
-
NumberedTypeGeneratorAttribute
- Inherited Members
Constructors
NumberedTypeGeneratorAttribute(string, int)
This attribute marks a type which should be cloned by the source generator with a changed constant field value. This type is mainly used by HybridString16 and related types.
public NumberedTypeGeneratorAttribute(string fieldName, int value)
Parameters
fieldNamestringThe name of the field which should be updated.
valueintThe updated value to set to the field.
Properties
FieldName
Gets the name of the field which should be updated.
public string FieldName { get; }
Property Value
Value
Gets the updated value to set to the field.
public int Value { get; }