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 [GenerateSerializableMemberAttribute] attributes.
Inheritance
Implements
Inherited Members
Namespace: Cesil
Assembly: Cesil.dll
Syntax
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct, AllowMultiple = false, Inherited = false)]
public sealed class GenerateSerializerAttribute : Attribute, IEquatable<GenerateSerializerAttribute>
Constructors
| Improve this Doc View SourceGenerateSerializerAttribute()
Create a GenerateSerializerAttribute attribute.
Declaration
public GenerateSerializerAttribute()
Methods
| Improve this Doc View SourceEquals(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 |
Overrides
GetHashCode()
Returns a stable hash code for this GenerateSerializerAttribute.
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
System.Int32 |
Overrides
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 |
Overrides
Operators
| Improve this Doc View SourceEquality(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 |