private static BoundedContextManager CreateBoundedContextManager(IServiceCollection services, MiriworkConfiguration miriworkConfiguration, Type[] boundedContextTypes) { var boundedContextManager = new BoundedContextManager(miriworkConfiguration); boundedContextManager.Init(boundedContextTypes); services.AddSingleton <IMiriBoundedContextsAccessor>(boundedContextManager); return(boundedContextManager); }