Exemple #1
0
        internal View CreatePartialView(string method, SeparatedSyntaxList <ArgumentSyntax> arguments)
        {
            var args = new PartialViewEventArgs(method, arguments);

            OnPartialView(this, args);

            return(args.View);
        }
Exemple #2
0
        private void Visitor_OnPartialView(object target, PartialViewEventArgs e)
        {
            var arguments       = e.Arguments;
            var partialViewPath = ((LiteralExpressionSyntax)arguments[0].Expression).Token.Text.RemoveQuotes();
            var relativePath    = partialViewPath;

            if (!viewProject.ContainsView(relativePath))
            {
                e.View = viewProject.AddView(relativePath);
            }
            else
            {
                e.View = viewProject.Views[relativePath];
            }
        }