Beispiel #1
0
        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));
        }
Beispiel #2
0
        public static void Add(EntityApiContext context)
        {
            var key = context.Key;

            contexts.AddOrUpdate(key, context);
            controllerNameMap.AddOrUpdate(context.Key.ToLowerInvariant(), context.ControllerName);
        }