Class SerializableMember

Represents a member of a type to use when serializing.

Inheritance
System.Object
SerializableMember
Implements
System.IEquatable<SerializableMember>
Namespace: Cesil
Assembly: Cesil.dll
Syntax
public sealed class SerializableMember : Object, IEquatable<SerializableMember>

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, Getter, Formatter, ShouldSerialize, EmitDefaultValue)

Create a SerializableMember with an explicit type being serialized, name, getter, formatter, ShouldSerialize method, and whether to emit a default value.

Declaration
public static SerializableMember Create(TypeInfo forType, string name, Getter getter, Formatter formatter, ShouldSerialize shouldSerialize, EmitDefaultValue emitDefault)
Parameters
Type Name Description
System.Reflection.TypeInfo forType
System.String name
Getter getter
Formatter formatter
ShouldSerialize shouldSerialize
EmitDefaultValue emitDefault
Returns
Type Description
SerializableMember

Equals(SerializableMember)

Returns true if this object equals the given SerializableMember.

Declaration
public bool Equals(SerializableMember serializableMember)
Parameters
Type Name Description
SerializableMember serializableMember
Returns
Type Description
System.Boolean

Equals(Object)

Returns true if this object equals the given SerializableMember.

Declaration
public override bool Equals(object obj)
Parameters
Type Name Description
System.Object obj
Returns
Type Description
System.Boolean

ForField(FieldInfo)

Creates a SerializableMember for the given field.

Declaration
public static SerializableMember ForField(FieldInfo field)
Parameters
Type Name Description
System.Reflection.FieldInfo field
Returns
Type Description
SerializableMember

ForField(FieldInfo, String)

Creates a SerializableMember for the given field, with the given name.

Declaration
public static SerializableMember ForField(FieldInfo field, string name)
Parameters
Type Name Description
System.Reflection.FieldInfo field
System.String name
Returns
Type Description
SerializableMember

ForField(FieldInfo, String, Formatter)

Creates a SerializableMember for the given field, with the given name and formatter.

Declaration
public static SerializableMember ForField(FieldInfo field, string name, Formatter formatter)
Parameters
Type Name Description
System.Reflection.FieldInfo field
System.String name
Formatter formatter
Returns
Type Description
SerializableMember

ForField(FieldInfo, String, Formatter, ShouldSerialize)

Creates a SerializableMember for the given field, with the given name, formatter, and ShouldSerialize method.

Declaration
public static SerializableMember ForField(FieldInfo field, string name, Formatter formatter, ShouldSerialize shouldSerialize)
Parameters
Type Name Description
System.Reflection.FieldInfo field
System.String name
Formatter formatter
ShouldSerialize shouldSerialize
Returns
Type Description
SerializableMember

ForField(FieldInfo, String, Formatter, ShouldSerialize, EmitDefaultValue)

Creates a SerializableMember for the given field, with the given name, formatter, ShouldSerialize method, and whether to emit a default value.

Declaration
public static SerializableMember ForField(FieldInfo field, string name, Formatter formatter, ShouldSerialize shouldSerialize, EmitDefaultValue emitDefault)
Parameters
Type Name Description
System.Reflection.FieldInfo field
System.String name
Formatter formatter
ShouldSerialize shouldSerialize
EmitDefaultValue emitDefault
Returns
Type Description
SerializableMember

ForProperty(PropertyInfo)

Creates a SerializableMember for the given property.

Declaration
public static SerializableMember ForProperty(PropertyInfo property)
Parameters
Type Name Description
System.Reflection.PropertyInfo property
Returns
Type Description
SerializableMember

ForProperty(PropertyInfo, String)

Creates a SerializableMember for the given property, with the given name.

Declaration
public static SerializableMember ForProperty(PropertyInfo property, string name)
Parameters
Type Name Description
System.Reflection.PropertyInfo property
System.String name
Returns
Type Description
SerializableMember

ForProperty(PropertyInfo, String, Formatter)

Creates a SerializableMember for the given property, with the given name and formatter.

Declaration
public static SerializableMember ForProperty(PropertyInfo property, string name, Formatter formatter)
Parameters
Type Name Description
System.Reflection.PropertyInfo property
System.String name
Formatter formatter
Returns
Type Description
SerializableMember

ForProperty(PropertyInfo, String, Formatter, ShouldSerialize)

Creates a SerializableMember for the given property, with the given name, formatter, and ShouldSerialize method.

Declaration
public static SerializableMember ForProperty(PropertyInfo property, string name, Formatter formatter, ShouldSerialize shouldSerialize)
Parameters
Type Name Description
System.Reflection.PropertyInfo property
System.String name
Formatter formatter
ShouldSerialize shouldSerialize
Returns
Type Description
SerializableMember

ForProperty(PropertyInfo, String, Formatter, ShouldSerialize, EmitDefaultValue)

Creates a SerializableMember for the given property, with the given name, formatter, ShouldSerialize method, and whether to emit a default value.

Declaration
public static SerializableMember ForProperty(PropertyInfo property, string name, Formatter formatter, ShouldSerialize shouldSerialize, EmitDefaultValue emitDefault)
Parameters
Type Name Description
System.Reflection.PropertyInfo property
System.String name
Formatter formatter
ShouldSerialize shouldSerialize
EmitDefaultValue emitDefault
Returns
Type Description
SerializableMember

GetHashCode()

Returns a stable hash for this SerializableMember.

Declaration
public override int GetHashCode()
Returns
Type Description
System.Int32

ToString()

Describes this SerializableMember.

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(SerializableMember, SerializableMember)

Compare two SerializableMembers for equality

Declaration
public static bool operator ==(SerializableMember a, SerializableMember b)
Parameters
Type Name Description
SerializableMember a
SerializableMember b
Returns
Type Description
System.Boolean

Inequality(SerializableMember, SerializableMember)

Compare two SerializableMembers for inequality

Declaration
public static bool operator !=(SerializableMember a, SerializableMember b)
Parameters
Type Name Description
SerializableMember a
SerializableMember b
Returns
Type Description
System.Boolean

Implements

System.IEquatable<>
In This Article
Back to top Generated by DocFX