예제 #1
0
        private static void RegisterSubClasses(DocumentFilterContext context, Type baseType)
        {
            var schemaGenerator = context.SchemaGenerator;
            var derivedTypes    = DerivedTypesHelper.GetDerivedTypes(typeof(T));

            foreach (var type in derivedTypes)
            {
                schemaGenerator.GenerateSchema(type, context.SchemaRepository);
            }
        }
예제 #2
0
 private static Dictionary <Type, string> Type2NameInit()
 {
     return(DerivedTypesHelper.GetType2JsonTypeName(DerivedTypesInit()));
 }
예제 #3
0
 private static HashSet <Type> DerivedTypesInit()
 {
     return(new HashSet <Type>(DerivedTypesHelper.GetDerivedTypes(typeof(T))));
 }