HumanReadableSerializerOptionsExtensions Class
Provides extension methods for HumanReadableSerializerOptions.
public static class HumanReadableSerializerOptionsExtensionsMethods
| Name | Description |
|---|---|
| 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.csConfigures the options to ignore the specified field.
public static void IgnoreMember(this HumanReadableSerializerOptions options, FieldInfo fieldInfo)Parameters
optionsHumanReadableSerializerOptions- The serialization options.
fieldInfoFieldInfo- The field to ignore.
IgnoreMember(HumanReadableSerializerOptions, PropertyInfo)
HumanReadableSerializerOptionsExtensions.csConfigures the options to ignore the specified property.
public static void IgnoreMember(this HumanReadableSerializerOptions options, PropertyInfo propertyInfo)Parameters
optionsHumanReadableSerializerOptions- The serialization options.
propertyInfoPropertyInfo- The property to ignore.
IgnoreMember(HumanReadableSerializerOptions, Type, string)
HumanReadableSerializerOptionsExtensions.csConfigures the options to ignore the specified member by name.
public static void IgnoreMember(this HumanReadableSerializerOptions options, Type type, string memberName)Parameters
optionsHumanReadableSerializerOptions- The serialization options.
typeType- The type containing the member.
memberNamestring- The name of the member to ignore.
IgnoreMember(HumanReadableSerializerOptions, Type, string[])
HumanReadableSerializerOptionsExtensions.csConfigures the options to ignore multiple members by name.
public static void IgnoreMember(this HumanReadableSerializerOptions options, Type type, params string[] memberNames)Parameters
optionsHumanReadableSerializerOptions- The serialization options.
typeType- The type containing the members.
memberNamesstring[]- The names of the members to ignore.
IgnoreMember<T>(HumanReadableSerializerOptions, Expression<Func<T, object>>)
HumanReadableSerializerOptionsExtensions.csConfigures 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
optionsHumanReadableSerializerOptions- The serialization options.
memberExpression<Func<T, object>>- An expression identifying the member to ignore, such as
x => x.Name, or several members, such asx => new { x.Name, x.Age }.
Remarks
See HumanReadableSerializerOptions.AddAttribute for the types the member is ignored on.
IgnoreMember<T>(HumanReadableSerializerOptions, string)
HumanReadableSerializerOptionsExtensions.csConfigures 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
optionsHumanReadableSerializerOptions- The serialization options.
memberNamestring- The name of the member to ignore.
IgnoreMember<T>(HumanReadableSerializerOptions, string[])
HumanReadableSerializerOptionsExtensions.csConfigures 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
optionsHumanReadableSerializerOptions- The serialization options.
memberNamesstring[]- The names of the members to ignore.
IgnoreMembersThatThrow overloads
IgnoreMembersThatThrow(HumanReadableSerializerOptions)
HumanReadableSerializerOptionsExtensions.csConfigures the options to ignore members that throw any exception when accessed.
public static void IgnoreMembersThatThrow(this HumanReadableSerializerOptions options)Parameters
optionsHumanReadableSerializerOptions- The serialization options.
IgnoreMembersThatThrow(HumanReadableSerializerOptions, Type)
HumanReadableSerializerOptionsExtensions.csConfigures 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
optionsHumanReadableSerializerOptions- The serialization options.
exceptionTypeType- The type of exception to ignore.
IgnoreMembersThatThrow<T>(HumanReadableSerializerOptions)
HumanReadableSerializerOptionsExtensions.csConfigures 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
optionsHumanReadableSerializerOptions- The serialization options.
IgnoreMembersWithType overloads
IgnoreMembersWithType(HumanReadableSerializerOptions, Type)
HumanReadableSerializerOptionsExtensions.csConfigures the options to ignore all members with the specified type.
public static void IgnoreMembersWithType(this HumanReadableSerializerOptions options, Type type)Parameters
optionsHumanReadableSerializerOptions- The serialization options.
typeType- The type of members to ignore.
IgnoreMembersWithType<T>(HumanReadableSerializerOptions)
HumanReadableSerializerOptionsExtensions.csConfigures 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
optionsHumanReadableSerializerOptions- The serialization options.