GenerateSerializerAttribute.IncludePrimaryConstructorParameters 属性

定义

获取或设置主构造函数参数是否应自动作为可序列化字段包含。 对于类型,默认 truerecordfalse 否则为 。

public bool IncludePrimaryConstructorParameters { get; init; }
member this.IncludePrimaryConstructorParameters : bool with get, set
Public Property IncludePrimaryConstructorParameters As Boolean

属性值

适用于