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); }
public virtual void VisitViewBag(ViewBagNode viewBagNode) { this.ThrowIfCanceled(); VisitChildren(viewBagNode); }
public override void VisitViewBag(ViewBagNode viewBagNode) { this.ViewBagNodes.Add(viewBagNode); base.VisitViewBag(viewBagNode); }