private static IActionResult HandleConfigurationEvent(dynamic configurationData)
        {
            var phase    = configurationData.phase;
            var pageId   = configurationData.pageId;
            var settings = configurationData.config;

            switch (phase.ToString())
            {
            case "INITIALIZE":
                var initializer = new ConfigurationInitializeSetting
                {
                    name        = "Test name",
                    description = "Test description",
                    firstPageId = "1",
                    id          = "app"
                };
                return(new OkObjectResult(new { configurationData = new { initialize = initializer } }));

            case "PAGE":
                return(new OkObjectResult(new { configurationData = new { page = new Page1() } }));

            default:
                return(new BadRequestObjectResult($"Unsupported config phase: {phase}"));
            }
            throw new NotImplementedException();
        }
示例#2
0
        public async Task <IActionResult> ConfigurationInitialize(dynamic data)
        {
            var initializer = new ConfigurationInitializeSetting
            {
                name        = "Test name",
                description = "Test description",
                firstPageId = "1",
                id          = "app"
            };

            return(new OkObjectResult(new { configurationData = new { initialize = initializer } }));
        }