コード例 #1
0
        public override void VisitViewBag(ViewBagNode viewBagNode)
        {
            var    name  = viewBagNode.PropertyName;
            var    right = viewBagNode.Right;
            object value = null;

            if (right is LiteralExpressionSyntax)
            {
                var literalExpression = (LiteralExpressionSyntax)right;
                value = literalExpression.GetValue();
            }
            else
            {
                DebugUtils.Break();
            }

            this.ViewBag.Add(name, value);

            base.VisitViewBag(viewBagNode);
        }
コード例 #2
0
        public virtual void VisitViewBag(ViewBagNode viewBagNode)
        {
            this.ThrowIfCanceled();

            VisitChildren(viewBagNode);
        }
コード例 #3
0
        public override void VisitViewBag(ViewBagNode viewBagNode)
        {
            this.ViewBagNodes.Add(viewBagNode);

            base.VisitViewBag(viewBagNode);
        }