public ApplicationMappings(ContextMappings contextMappings) { // At this point, .NET will only ever has one application => "application" ContextMappings = new Dictionary <string, ContextMappings>() { { "application", contextMappings } }; }
protected internal ApplicationMappings GetApplicationMappings(HttpContext context) { IDictionary <string, IList <MappingDescription> > desc = new Dictionary <string, IList <MappingDescription> >(); if (_actionDescriptorCollectionProvider != null) { ApiDescriptionProviderContext apiContext = GetApiDescriptions(_actionDescriptorCollectionProvider?.ActionDescriptors?.Items); desc = GetMappingDescriptions(apiContext); } if (_routeMappings != null) { AddRouteMappingsDescriptions(_routeMappings, desc); } var contextMappings = new ContextMappings(desc); return(new ApplicationMappings(contextMappings)); }