public Role.IRoleToken AddApi <TController>(string apiKey, string flowKey, DIFlowBuilderHandler <HttpRequest, IActionResult> buildFlow) where TController : ControllerBase { var context = new EntityApiContext(apiKey, flowKey, buildFlow, typeof(TController)); EntityApiContextContainer.Add(context); return(new KeyRoleToken(flowKey)); }
public static void Add(EntityApiContext context) { var key = context.Key; contexts.AddOrUpdate(key, context); controllerNameMap.AddOrUpdate(context.Key.ToLowerInvariant(), context.ControllerName); }