This repository has been archived by the owner on Dec 14, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Redesign CompilationResult so that it does not throw when CompiledT…
…ype is accessed. * Update to use ICompilationException interface from Microsoft.Framework.Runtime * Update to use RoslynCompilationException Fixes #955
- Loading branch information
Showing
16 changed files
with
355 additions
and
275 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
53 changes: 0 additions & 53 deletions
53
src/Microsoft.AspNet.Mvc.Razor/Compilation/CompilationFailure.cs
This file was deleted.
Oops, something went wrong.
57 changes: 0 additions & 57 deletions
57
src/Microsoft.AspNet.Mvc.Razor/Compilation/CompilationMessage.cs
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
42 changes: 42 additions & 0 deletions
42
src/Microsoft.AspNet.Mvc.Razor/Compilation/RazorCompilationFailure.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. | ||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. | ||
|
||
using System.Collections.Generic; | ||
using Microsoft.Framework.Runtime; | ||
using Microsoft.Framework.Internal; | ||
|
||
namespace Microsoft.AspNet.Mvc.Razor | ||
{ | ||
/// <summary> | ||
/// <see cref="ICompilationFailure"/> for Razor parse failures. | ||
/// </summary> | ||
public class RazorCompilationFailure : ICompilationFailure | ||
{ | ||
/// <summary>Initializes a new instance of <see cref="RazorCompilationFailure"/>.</summary> | ||
/// <param name="sourceFilePath">The path of the Razor source file that was compiled.</param> | ||
/// <param name="sourceFileContent">The contents of the Razor source file.</param> | ||
/// <param name="messages">A sequence of <see cref="ICompilationMessage"/> encountered | ||
/// during compilation.</param> | ||
public RazorCompilationFailure( | ||
[NotNull] string sourceFilePath, | ||
[NotNull] string sourceFileContent, | ||
[NotNull] IEnumerable<RazorCompilationMessage> messages) | ||
{ | ||
SourceFilePath = sourceFilePath; | ||
SourceFileContent = sourceFileContent; | ||
Messages = messages; | ||
} | ||
|
||
/// <inheritdoc /> | ||
public string SourceFilePath { get; } | ||
|
||
/// <inheritdoc /> | ||
public string SourceFileContent { get; } | ||
|
||
/// <inheritdoc /> | ||
public string CompiledContent { get; } = null; | ||
|
||
/// <inheritdoc /> | ||
public IEnumerable<ICompilationMessage> Messages { get; } | ||
} | ||
} |
Oops, something went wrong.