Beispiel #1
0
        public void CreateApi(IApiBuilder apiBuilder)
        {
            var autoConfigurer = new AutoConfigurer(_configuration);

            foreach (Type itemType in _itemTypes)
            {
                autoConfigurer.AddRootItem(apiBuilder, itemType, null);
            }
        }
Beispiel #2
0
        public static IApiItemBuilder <TItem> AutoConfigure <TItem>(this IApiItemBuilder <TItem> builder, AutoConfiguration configuration)
        {
            if (configuration == null)
            {
                configuration = new AutoConfiguration();
            }

            var configurer = new AutoConfigurer(configuration);

            configurer.AddItem <TItem>(builder);

            return(builder);
        }