HumanReadableSerializerOptionsExtensions Class

Provides extension methods for HumanReadableSerializerOptions.

public static class HumanReadableSerializerOptionsExtensions

Methods

NameDescription
IgnoreMember(HumanReadableSerializerOptions, FieldInfo)Configures the options to ignore the specified field.
IgnoreMember(HumanReadableSerializerOptions, PropertyInfo)Configures the options to ignore the specified property.
IgnoreMember(HumanReadableSerializerOptions, Type, string)Configures the options to ignore the specified member by name.
IgnoreMember(HumanReadableSerializerOptions, Type, string[])Configures the options to ignore multiple members by name.
IgnoreMember<T>(HumanReadableSerializerOptions, Expression<Func<T, object>>)Configures the options to ignore the specified member.
IgnoreMember<T>(HumanReadableSerializerOptions, string)Configures the options to ignore the specified member by name.
IgnoreMember<T>(HumanReadableSerializerOptions, string[])Configures the options to ignore multiple members by name.
IgnoreMembersThatThrow(HumanReadableSerializerOptions)Configures the options to ignore members that throw any exception when accessed.
IgnoreMembersThatThrow(HumanReadableSerializerOptions, Type)Configures the options to ignore members that throw an exception of the specified type when accessed.
IgnoreMembersThatThrow<T>(HumanReadableSerializerOptions)Configures the options to ignore members that throw an exception of the specified type when accessed.
IgnoreMembersWithType(HumanReadableSerializerOptions, Type)Configures the options to ignore all members with the specified type.
IgnoreMembersWithType<T>(HumanReadableSerializerOptions)Configures the options to ignore all members with the specified type.

IgnoreMember overloads

IgnoreMember(HumanReadableSerializerOptions, FieldInfo)

HumanReadableSerializerOptionsExtensions.cs

Configures the options to ignore the specified field.

public static void IgnoreMember(this HumanReadableSerializerOptions options, FieldInfo fieldInfo)
Parameters
options HumanReadableSerializerOptions
The serialization options.
fieldInfo FieldInfo
The field to ignore.

IgnoreMember(HumanReadableSerializerOptions, PropertyInfo)

HumanReadableSerializerOptionsExtensions.cs

Configures the options to ignore the specified property.

public static void IgnoreMember(this HumanReadableSerializerOptions options, PropertyInfo propertyInfo)
Parameters
options HumanReadableSerializerOptions
The serialization options.
propertyInfo PropertyInfo
The property to ignore.

IgnoreMember(HumanReadableSerializerOptions, Type, string)

HumanReadableSerializerOptionsExtensions.cs

Configures the options to ignore the specified member by name.

public static void IgnoreMember(this HumanReadableSerializerOptions options, Type type, string memberName)
Parameters
options HumanReadableSerializerOptions
The serialization options.
type Type
The type containing the member.
memberName string
The name of the member to ignore.

IgnoreMember(HumanReadableSerializerOptions, Type, string[])

HumanReadableSerializerOptionsExtensions.cs

Configures the options to ignore multiple members by name.

public static void IgnoreMember(this HumanReadableSerializerOptions options, Type type, params string[] memberNames)
Parameters
options HumanReadableSerializerOptions
The serialization options.
type Type
The type containing the members.
memberNames string[]
The names of the members to ignore.

IgnoreMember<T>(HumanReadableSerializerOptions, Expression<Func<T, object>>)

HumanReadableSerializerOptionsExtensions.cs

Configures the options to ignore the specified member.

public static void IgnoreMember<T>(this HumanReadableSerializerOptions options, Expression<Func<T, object>> member)
Type parameters
T
The type containing the member.
Parameters
options HumanReadableSerializerOptions
The serialization options.
member Expression<Func<T, object>>
An expression identifying the member to ignore, such as x => x.Name, or several members, such as x => new { x.Name, x.Age }.
Remarks

See HumanReadableSerializerOptions.AddAttribute for the types the member is ignored on.

IgnoreMember<T>(HumanReadableSerializerOptions, string)

HumanReadableSerializerOptionsExtensions.cs

Configures the options to ignore the specified member by name.

public static void IgnoreMember<T>(this HumanReadableSerializerOptions options, string memberName)
Type parameters
T
The type containing the member.
Parameters
options HumanReadableSerializerOptions
The serialization options.
memberName string
The name of the member to ignore.

IgnoreMember<T>(HumanReadableSerializerOptions, string[])

HumanReadableSerializerOptionsExtensions.cs

Configures the options to ignore multiple members by name.

public static void IgnoreMember<T>(this HumanReadableSerializerOptions options, params string[] memberNames)
Type parameters
T
The type containing the members.
Parameters
options HumanReadableSerializerOptions
The serialization options.
memberNames string[]
The names of the members to ignore.

IgnoreMembersThatThrow overloads

IgnoreMembersThatThrow(HumanReadableSerializerOptions)

HumanReadableSerializerOptionsExtensions.cs

Configures the options to ignore members that throw any exception when accessed.

public static void IgnoreMembersThatThrow(this HumanReadableSerializerOptions options)
Parameters
options HumanReadableSerializerOptions
The serialization options.

IgnoreMembersThatThrow(HumanReadableSerializerOptions, Type)

HumanReadableSerializerOptionsExtensions.cs

Configures the options to ignore members that throw an exception of the specified type when accessed.

public static void IgnoreMembersThatThrow(this HumanReadableSerializerOptions options, Type exceptionType)
Parameters
options HumanReadableSerializerOptions
The serialization options.
exceptionType Type
The type of exception to ignore.

IgnoreMembersThatThrow<T>(HumanReadableSerializerOptions)

HumanReadableSerializerOptionsExtensions.cs

Configures the options to ignore members that throw an exception of the specified type when accessed.

public static void IgnoreMembersThatThrow<T>(this HumanReadableSerializerOptions options)
Type parameters
T
The type of exception to ignore.
Parameters
options HumanReadableSerializerOptions
The serialization options.

IgnoreMembersWithType overloads

IgnoreMembersWithType(HumanReadableSerializerOptions, Type)

HumanReadableSerializerOptionsExtensions.cs

Configures the options to ignore all members with the specified type.

public static void IgnoreMembersWithType(this HumanReadableSerializerOptions options, Type type)
Parameters
options HumanReadableSerializerOptions
The serialization options.
type Type
The type of members to ignore.

IgnoreMembersWithType<T>(HumanReadableSerializerOptions)

HumanReadableSerializerOptionsExtensions.cs

Configures the options to ignore all members with the specified type.

public static void IgnoreMembersWithType<T>(this HumanReadableSerializerOptions options)
Type parameters
T
The type of members to ignore.
Parameters
options HumanReadableSerializerOptions
The serialization options.