예제 #1
0
        private TemplateFactoryResult CompilationError(RazorCodeDocument document, CompilationResult result)
        {
            var csdocs = document.GetCSharpDocument();

            return(TemplateFactoryResult.Error(new StringValues(new string[]
            {
                document.Source.FilePath + ".error",
                string.Join(
                    Environment.NewLine,
                    result.Messages),
                csdocs.GeneratedCode
            }).ToString()));
        }
예제 #2
0
        private TemplateFactoryResult GenerateError(RazorCodeDocument document)
        {
            var csdocs = document.GetCSharpDocument();

            return(TemplateFactoryResult.Error(new StringValues(new string[]
            {
                document.Source.FilePath + ".error",
                string.Join(
                    Environment.NewLine,
                    csdocs.Diagnostics.Select(d => d.GetMessage())),
                csdocs.GeneratedCode
            }).ToString()));
        }