예제 #1
0
        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);
        }
예제 #2
0
        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);
        }