Class GenerateSerializerAttribute
When using Cesil's Source Generator (see Nuget.org for Cesil.SourceGenerator) marks a class or struct as needing a serializer generated at compile time.
When using the AheadOfTimeTypeDescriber, the created I(Async)Writers for this type will do no runtime code generation.
You can customize the behavior of the generated serialize with [DataMemberAttribute], and [SerializerMemberAttribute] attributes.
Default behavior (with no additional attributes) closely follows DefaultTypeDescriver.
Inheritance
Implements
Namespace: Cesil
Assembly: Cesil.dll
Syntax
public sealed class GenerateSerializerAttribute : Attribute, IEquatable<GenerateSerializerAttribute>
Constructors
GenerateSerializerAttribute()
Create a GenerateSerializerAttribute attribute.
Declaration
public GenerateSerializerAttribute()
Methods
Equals(GenerateSerializerAttribute)
Returns true if the given GenerateSerializerAttribute is equal to this one.
Declaration
public bool Equals(GenerateSerializerAttribute attribute)
Parameters
Type | Name | Description |
---|---|---|
GenerateSerializerAttribute | attribute |
Returns
Type | Description |
---|---|
System.Boolean |
Equals(Object)
Return true if the given object is a GenerateSerializerAttribute equal to this one.
Declaration
public override bool Equals(object obj)
Parameters
Type | Name | Description |
---|---|---|
System.Object | obj |
Returns
Type | Description |
---|---|
System.Boolean |
GetHashCode()
Returns a stable hash code for this GenerateSerializerAttribute.
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
System.Int32 |
ToString()
Returns a representation of this GenerateSerializerAttribute object.
Only for debugging, this value is not guaranteed to be stable.
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
System.String |
Operators
Equality(GenerateSerializerAttribute, GenerateSerializerAttribute)
Compare two GenerateSerializerAttributes for equality
Declaration
public static bool operator ==(GenerateSerializerAttribute a, GenerateSerializerAttribute b)
Parameters
Type | Name | Description |
---|---|---|
GenerateSerializerAttribute | a | |
GenerateSerializerAttribute | b |
Returns
Type | Description |
---|---|
System.Boolean |
Inequality(GenerateSerializerAttribute, GenerateSerializerAttribute)
Compare two GenerateSerializerAttributes for inequality
Declaration
public static bool operator !=(GenerateSerializerAttribute a, GenerateSerializerAttribute b)
Parameters
Type | Name | Description |
---|---|---|
GenerateSerializerAttribute | a | |
GenerateSerializerAttribute | b |
Returns
Type | Description |
---|---|
System.Boolean |