Example #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));
        }
        private OptionalConverter GetOptionalConverter(Type type)
        {
            var optionalType = type.GenericTypeArguments[0];

            return(_optionalConverters.GetOrAdd(optionalType, (x, @this) => OptionalConverter.Create(@this.GetConverter(x)), this));
        }
Example #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));
        }