// This method gets called by the runtime. Use this method to add services to the container. public void ConfigureServices(IServiceCollection services) { services.AddSingleton(Configuration); AutoMapperSetup.AddAutoMapperSetup(services); SwaggerSetup.AddSwaggerSetup(services); DependencyInjectionSetup.AddDependencyInjectionSetup(services, Configuration); ApiSetup.AddApiSetup(services, Configuration); }
public static List <MsDocEntryPoint> GenerateDocs(string msDocFolder) { //Generate the docs first var container = ApiSetup.ConfigureEntryPoints(); var entries = container.Resolve <IEnumerable <IApiMethodCall> >(); var apiEntryPoints = container.Registrations.Where(x => x.RegisteredType == typeof(IApiEntryPoint)).ToList(); var generator = new MsDocDocumentGenerator(Path.Combine(msDocFolder, "help.xml"), msDocFolder, container); foreach (var apiEntryPoint in entries.GroupBy(x => x.ApiClassType)) { var point = apiEntryPoint; generator.GenerateDocForEntryPoint( apiEntryPoints.SingleOrDefault(x => x.MappedToType == point.Key), apiEntryPoint.AsEnumerable()); } return(generator.Points); }
public static void SetupObjectB(this ApiSetup <ObjectB> b) { }
public static void SetupObjectA(this ApiSetup <ObjectA> a) { }
internal static void SetupObjectA <T>(this ApiSetup <T> obj) where T : ISomeInterfaceA { Console.WriteLine("A object setup"); }
public static void SetupObjectB <B>(this ApiSetup <B> apiSetup) where B : ObjectB { }
public static void SetupObjectA <A>(this ApiSetup <A> apiSetup) where A : ObjectA { }