Example #1
0
 public ApiFactory(string virtualPath, XmlCommentDocumentationProvider docProvider, ParameterFactory parameterFactory, ModelFactory modelFactory, ICollection<ApiDescription> apiDescriptions)
 {
     _apiDescriptions = apiDescriptions;
     _modelFactory = modelFactory;
     _parameterFactory = parameterFactory;
     _appVirtualPath = virtualPath.TrimEnd('/');
     _docProvider = docProvider;
 }
Example #2
0
        public ApiFactory()
        {
            _appVirtualPath = HttpRuntime.AppDomainAppVirtualPath.TrimEnd('/'); ;
            _apiDescriptions = GlobalConfiguration.Configuration.Services.GetApiExplorer().ApiDescriptions;
            _parameterFactory = new ParameterFactory();

            _docProvider = (XmlCommentDocumentationProvider)GlobalConfiguration.Configuration.Services.GetService((typeof(IDocumentationProvider)));
            _modelFactory = new ModelFactory(_docProvider);
        }