public PropertySerializationInfo(PropertyInfo info, string name, JsonFormatterAttribute formatterInfo) #endif { Info = info; MemberName = name; FormatterInfo = formatterInfo; MemberNameByteLengthWithQuotation = NullableStringFormatter.CalcByteLength(name); IsFormatterDirect = DirectTypeEnumHelper.FromTypeAndFormatter(info.PropertyType, FormatterInfo?.FormatterType); }
public ShouldSerializeFieldSerializationInfo(FieldInfo info, MethodInfo shouldSerialize, string name, JsonFormatterAttribute formatterInfo) #endif { Info = info; ShouldSerialize = shouldSerialize; MemberName = name; MemberNameByteLengthWithQuotation = NullableStringFormatter.CalcByteLength(name); FormatterInfo = formatterInfo; IsFormatterDirect = DirectTypeEnumHelper.FromTypeAndFormatter(info.FieldType, FormatterInfo?.FormatterType); }