Table of Contents

Class GenerateCodecAttribute

Namespace
Shard.Codecs
Assembly
Shard.Codecs.dll

Requests compiler validation and the selected wire format endpoints for the annotated type.

[AttributeUsage(AttributeTargets.Class|AttributeTargets.Struct|AttributeTargets.Enum|AttributeTargets.Interface, Inherited = false)]
public sealed class GenerateCodecAttribute : Attribute
Inheritance
GenerateCodecAttribute
Inherited Members

Remarks

Public instance fields and properties are included unless CodecIgnoreAttribute excludes them. A supported declaration default makes a member optional, while a version range can make it inactive. Inherited members from another assembly must declare requiredness explicitly because the generator cannot inspect their source defaults.

Properties

Formats

Gets or sets the generated wire formats.

public CodecFormats Formats { get; set; }

Property Value

CodecFormats

NameStyle

Gets or sets the naming style for members without an explicit CodecNameAttribute.

public CodecNameStyle NameStyle { get; set; }

Property Value

CodecNameStyle

Remarks

Although the default is Preserve, schema names, aliases, enum values, codec map fields, and case names are always kept as written.