Пример #1
0
        private OptionalConverter GetOptionalConverter(JsonAccessor accessor)
        {
            var optionalType = accessor.Type.GenericTypeArguments[0];

            return(_optionalConverters.GetOrAdd(optionalType, (x, @this) => OptionalConverter.Create(@this.GetConverter(x)), this));
        }
Пример #2
0
        private OptionalConverter GetOptionalConverter(Type type)
        {
            var optionalType = type.GenericTypeArguments[0];

            return(_optionalConverters.GetOrAdd(optionalType, (x, @this) => OptionalConverter.Create(@this.GetConverter(x)), this));
        }
Пример #3
0
        private OptionalConverter GetOptionalConverter(PropertyInfo property)
        {
            var optionalType = property.PropertyType.GenericTypeArguments[0];

            return(_optionalConverters.GetOrAdd(optionalType, (x, @this) => OptionalConverter.Create(@this.GetConverter(x)), this));
        }