Ejemplo n.º 1
0
        private async Task InsertPage(DbInsertContext context, IMessage pageQuery, TestPageRedirection redirection)
        {
            var page = new TestPage()
            {
                TestName      = context.TestName,
                IndexInTest   = context.IndexInTest + 1,
                UserName      = context.UserName,
                ScenarioNames = context.ScenarioNames,
                PageName      = pageQuery.GetType().GetFriendlyName(),
                PageUrl       = routeToUrl.ToParameterizedUrlShort(pageQuery)
            };

            await repository.InsertAsync(page);

            context.PageName       = page.PageName;
            context.Page           = page;
            context.Redirection    = redirection;
            context.PageMemberName = null;
            context.MessageName    = null;
        }
Ejemplo n.º 2
0
        public async Task Insert(DbInsertContext context, LogSubmitRedirect l)
        {
            var redirection = new TestPageRedirection()
            {
                TestName      = context.TestName,
                IndexInTest   = context.IndexInTest,
                UserName      = context.UserName,
                ScenarioNames = context.ScenarioNames,
                FromPageName  = context.PageName,
                ToPageName    = l.PageQuery.GetType().GetFriendlyName(),
                IsForm        = true,
                IsLink        = false,
                MemberName    = context.PageMemberName
            };

            await repository.InsertAsync(redirection);

            context.IndexInTest++;

            await InsertPage(context, l.PageQuery, redirection);
        }