private static void RegisterDependencies(ServicesContainer servicesContainer, IWindsorContainer container) { // Notice that the container instance field is passed into // the constructor of WindsorCompositionRoot, so that it // can use the container instance to Resolve Controller instances. servicesContainer.Replace( typeof(IHttpControllerActivator), new WindsorCompositionRoot(container)); }
public static void ConfigureDocumentationProvider(string absoluteDocPath, ServicesContainer services) { try { var docProvider = new XmlCommentDocumentationProvider(absoluteDocPath); services.Replace(typeof(IDocumentationProvider), docProvider); } catch (FileNotFoundException) { throw new Exception("Please enable \"XML documentation file\" in project properties with default (bin\\Sample.WebApi.XML) value or edit value in App_Start\\SwaggerNet.cs"); } }
public static void RegisterDocumentation(ServicesContainer services) { services.Replace(typeof (IDocumentationProvider), new XmlCommentDocumentationProvider( HttpContext.Current.Server.MapPath("~/Content/ApiHelp.XML"))); }