private void EmitOverride(OverridePointNode node)
        {
            if (!overrideSections.ContainsKey(node.OverrideName))
            {
                if (node.IsRequired)
                {
                    throw new VeilCompilerException("Overrideable section '{0}' is required but not specified".FormatInvariant(node.OverrideName));
                }
                if (node.DefaultContent != null)
                {
                    EmitNode(node.DefaultContent);
                }
                return;
            }

            var o = overrideSections[node.OverrideName];

            EmitNode(o);
        }
Exemple #2
0
        private Expression HandleOverride(OverridePointNode node)
        {
            if (!this.overrideSections.ContainsKey(node.OverrideName))
            {
                if (node.IsRequired)
                {
                    throw new VeilCompilerException("Overrideable section '{0}' is required but not specified".FormatInvariant(node.OverrideName));
                }
                if (node.DefaultContent != null)
                {
                    return(HandleNode(node.DefaultContent));
                }
                return(Expression.Empty());
            }

            var o = this.overrideSections[node.OverrideName];

            return(HandleNode(o));
        }