Class DeserializableMember
Represents a member of a type to use when deserializing.
Inheritance
System.Object
DeserializableMember
Namespace: Cesil
Assembly: Cesil.dll
Syntax
public sealed class DeserializableMember : Object, IEquatable<DeserializableMember>
Properties
Name
The name of the column that maps to this member.
Declaration
public string Name { get; }
Property Value
Type |
Description |
System.String |
|
Methods
Create(TypeInfo, String, Setter, Parser, MemberRequired, Reset)
Create a DeserializableMember with an explicit type being serialized, name, setter, parser, whether it is required, and a reset method.
Declaration
public static DeserializableMember Create(TypeInfo forType, string name, Setter setter, Parser parser, MemberRequired required, Reset reset)
Parameters
Returns
Equals(DeserializableMember)
Returns true if this object equals the given DeserializableMember.
Declaration
public bool Equals(DeserializableMember deserializableMember)
Parameters
Returns
Type |
Description |
System.Boolean |
|
Equals(Object)
Returns true if this object equals the given DeserializableMember.
Declaration
public override bool Equals(object obj)
Parameters
Type |
Name |
Description |
System.Object |
obj |
|
Returns
Type |
Description |
System.Boolean |
|
ForField(FieldInfo)
Creates a DeserializableMember for the given field.
Declaration
public static DeserializableMember ForField(FieldInfo field)
Parameters
Type |
Name |
Description |
System.Reflection.FieldInfo |
field |
|
Returns
ForField(FieldInfo, String)
Creates a DeserializableMember for the given field, with the given name.
Declaration
public static DeserializableMember ForField(FieldInfo field, string name)
Parameters
Type |
Name |
Description |
System.Reflection.FieldInfo |
field |
|
System.String |
name |
|
Returns
ForField(FieldInfo, String, Parser)
Creates a DeserializableMember for the given field, with the given name and parser.
Declaration
public static DeserializableMember ForField(FieldInfo field, string name, Parser parser)
Parameters
Type |
Name |
Description |
System.Reflection.FieldInfo |
field |
|
System.String |
name |
|
Parser |
parser |
|
Returns
ForField(FieldInfo, String, Parser, MemberRequired)
Creates a DeserializableMember for the given property, with the given name, parser, and whether it is required.
Declaration
public static DeserializableMember ForField(FieldInfo field, string name, Parser parser, MemberRequired required)
Parameters
Type |
Name |
Description |
System.Reflection.FieldInfo |
field |
|
System.String |
name |
|
Parser |
parser |
|
MemberRequired |
required |
|
Returns
ForField(FieldInfo, String, Parser, MemberRequired, Reset)
Creates a DeserializableMember for the given property, with the given name, parser, whether it is required, and a reset method.
Declaration
public static DeserializableMember ForField(FieldInfo field, string name, Parser parser, MemberRequired required, Reset reset)
Parameters
Returns
ForProperty(PropertyInfo)
Creates a DeserializableMember for the given property.
Declaration
public static DeserializableMember ForProperty(PropertyInfo property)
Parameters
Type |
Name |
Description |
System.Reflection.PropertyInfo |
property |
|
Returns
ForProperty(PropertyInfo, String)
Creates a DeserializableMember for the given property, with the given name.
Declaration
public static DeserializableMember ForProperty(PropertyInfo property, string name)
Parameters
Type |
Name |
Description |
System.Reflection.PropertyInfo |
property |
|
System.String |
name |
|
Returns
ForProperty(PropertyInfo, String, Parser)
Creates a DeserializableMember for the given property, with the given name and parser.
Declaration
public static DeserializableMember ForProperty(PropertyInfo property, string name, Parser parser)
Parameters
Type |
Name |
Description |
System.Reflection.PropertyInfo |
property |
|
System.String |
name |
|
Parser |
parser |
|
Returns
ForProperty(PropertyInfo, String, Parser, MemberRequired)
Creates a DeserializableMember for the given property, with the given name, parser, and whether it is required.
Declaration
public static DeserializableMember ForProperty(PropertyInfo property, string name, Parser parser, MemberRequired required)
Parameters
Type |
Name |
Description |
System.Reflection.PropertyInfo |
property |
|
System.String |
name |
|
Parser |
parser |
|
MemberRequired |
required |
|
Returns
ForProperty(PropertyInfo, String, Parser, MemberRequired, Reset)
Creates a DeserializableMember for the given property, with the given name, parser, whether it is required, and a reset method.
Declaration
public static DeserializableMember ForProperty(PropertyInfo property, string name, Parser parser, MemberRequired required, Reset reset)
Parameters
Type |
Name |
Description |
System.Reflection.PropertyInfo |
property |
|
System.String |
name |
|
Parser |
parser |
|
MemberRequired |
required |
|
Reset |
reset |
|
Returns
GetHashCode()
Returns a stable hash for this DeserializableMember.
Declaration
public override int GetHashCode()
Returns
Type |
Description |
System.Int32 |
|
ToString()
Describes this DeserializableMember.
This is provided for debugging purposes, and the format is not guaranteed to be stable between releases.
Declaration
public override string ToString()
Returns
Type |
Description |
System.String |
|
Operators
Equality(DeserializableMember, DeserializableMember)
Compare two DeserializableMembers for equality
Declaration
public static bool operator ==(DeserializableMember a, DeserializableMember b)
Parameters
Returns
Type |
Description |
System.Boolean |
|
Inequality(DeserializableMember, DeserializableMember)
Compare two DeserializableMembers for inequality
Declaration
public static bool operator !=(DeserializableMember a, DeserializableMember b)
Parameters
Returns
Type |
Description |
System.Boolean |
|
Implements
System.IEquatable<>