internal virtual NullableDictionary <object, Type> GetSubTypeMapping(Type type)
        {
            var dictionary = new NullableDictionary <object, Type>();

            GetAttributes <KnownSubTypeAttribute>(ToTypeInfo(type))
            .ToList()
            .ForEach(x => dictionary.Add(x.AssociatedValue, x.SubType));

            return(dictionary);
        }
Beispiel #2
0
 public JsonSubtypesConverterBuilder RegisterSubtype(Type subtype, object value)
 {
     _subTypeMapping.Add(value, subtype);
     return(this);
 }