Example #1
0
        private static TypeDescription GetTypeDescription(Type type, SerializerState state)
        {
            var typeDescription = state.GetDescription(type);

            if (typeDescription == null &&
                !type.GetTypeInfo().IsAbstract &&
                !type.GetTypeInfo().IsInterface &&
                !type.IsBuiltInType() &&
                !type.IsEnumerableType() &&
                !type.IsDictionaryType() &&
                !type.GetTypeInfo().IsEnum)
            {
                type.TypeNotSupported(type);
            }
            return(typeDescription);
        }
Example #2
0
 public ComplexNullableBuilder(Type underlyingType, SerializerState state)
 {
     _underlyingType = underlyingType;
     _description    = state.GetDescription(underlyingType);
     _builderType    = GetType();
 }