Cleanup: Moving files from src/Microsoft.AspNet.Mvc.Razor/Razor/PreCompileViews ->

src/Microsoft.AspNet.Mvc.Razor/Precompilation
This commit is contained in:
Pranav K 2015-03-24 15:56:07 -07:00
parent d388aa58c8
commit 9dc8ecac8a
37 changed files with 49 additions and 39 deletions

View File

@ -7,7 +7,7 @@ using System.Linq;
using Microsoft.Framework.Runtime;
using Microsoft.Framework.Internal;
namespace Microsoft.AspNet.Mvc.Razor
namespace Microsoft.AspNet.Mvc.Razor.Compilation
{
/// <summary>
/// An <see cref="Exception"/> thrown when accessing the result of a failed compilation.

View File

@ -5,7 +5,7 @@ using Microsoft.Framework.Internal;
using Microsoft.Framework.Runtime;
using Microsoft.Framework.Runtime.Roslyn;
namespace Microsoft.AspNet.Mvc.Razor
namespace Microsoft.AspNet.Mvc.Razor.Compilation
{
/// <summary>
/// Extension methods for <see cref="ICompilerOptionsProvider"/>.

View File

@ -5,7 +5,7 @@ using System;
using Microsoft.Framework.Runtime;
using Microsoft.Framework.Internal;
namespace Microsoft.AspNet.Mvc.Razor
namespace Microsoft.AspNet.Mvc.Razor.Compilation
{
/// <summary>
/// Represents the result of compilation.

View File

@ -6,12 +6,13 @@ using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using Microsoft.AspNet.FileProviders;
using Microsoft.AspNet.Mvc.Razor.Precompilation;
using Microsoft.Framework.Caching.Memory;
using Microsoft.Framework.Internal;
using Microsoft.Framework.OptionsModel;
using Microsoft.Framework.Runtime;
namespace Microsoft.AspNet.Mvc.Razor
namespace Microsoft.AspNet.Mvc.Razor.Compilation
{
/// <summary>
/// Caches the result of runtime compilation of Razor files for the duration of the app lifetime.

View File

@ -2,9 +2,10 @@
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System;
using Microsoft.AspNet.Mvc.Razor.Precompilation;
using Microsoft.Framework.Internal;
namespace Microsoft.AspNet.Mvc.Razor
namespace Microsoft.AspNet.Mvc.Razor.Compilation
{
/// <summary>
/// An entry in <see cref="ICompilerCache"/> that contain metadata about precompiled and dynamically compiled file.

View File

@ -3,7 +3,7 @@
using Microsoft.Framework.Internal;
namespace Microsoft.AspNet.Mvc.Razor
namespace Microsoft.AspNet.Mvc.Razor.Compilation
{
/// <summary>
/// Result of <see cref="ICompilerCache"/>.
@ -20,7 +20,7 @@ namespace Microsoft.AspNet.Mvc.Razor
/// Initializes a new instance of <see cref="CompilerCacheResult"/> with the specified
/// <see cref="CompilationResult"/>.
/// </summary>
/// <param name="compilationResult">The <see cref="Razor.CompilationResult"/> </param>
/// <param name="compilationResult">The <see cref="Compilation.CompilationResult"/> </param>
public CompilerCacheResult([NotNull] CompilationResult compilationResult)
{
CompilationResult = compilationResult;
@ -34,7 +34,7 @@ namespace Microsoft.AspNet.Mvc.Razor
}
/// <summary>
/// The <see cref="Razor.CompilationResult"/>.
/// The <see cref="Compilation.CompilationResult"/>.
/// </summary>
/// <remarks>This property is null when file lookup failed.</remarks>
public CompilationResult CompilationResult { get; }

View File

@ -1,7 +1,7 @@
// 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.
namespace Microsoft.AspNet.Mvc.Razor
namespace Microsoft.AspNet.Mvc.Razor.Compilation
{
/// <summary>
/// Provides methods for compilation of a Razor page.

View File

@ -4,7 +4,7 @@
using System;
using Microsoft.Framework.Internal;
namespace Microsoft.AspNet.Mvc.Razor
namespace Microsoft.AspNet.Mvc.Razor.Compilation
{
/// <summary>
/// Caches the result of runtime compilation of Razor files for the duration of the app lifetime.

View File

@ -1,7 +1,7 @@
// 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.
namespace Microsoft.AspNet.Mvc.Razor
namespace Microsoft.AspNet.Mvc.Razor.Compilation
{
/// <summary>
/// Specifies the contracts for a service that compiles Razor files.

View File

@ -5,7 +5,7 @@ using System.Collections.Generic;
using Microsoft.Framework.Runtime;
using Microsoft.Framework.Internal;
namespace Microsoft.AspNet.Mvc.Razor
namespace Microsoft.AspNet.Mvc.Razor.Compilation
{
/// <summary>
/// <see cref="ICompilationFailure"/> for Razor parse failures.

View File

@ -5,7 +5,7 @@ using Microsoft.AspNet.Razor.Parser.SyntaxTree;
using Microsoft.Framework.Internal;
using Microsoft.Framework.Runtime;
namespace Microsoft.AspNet.Mvc.Razor
namespace Microsoft.AspNet.Mvc.Razor.Compilation
{
/// <summary>
/// <see cref="ICompilationMessage"/> for a <see cref="RazorError"/> encountered during parsing.

View File

@ -7,7 +7,7 @@ using Microsoft.AspNet.FileProviders;
using Microsoft.AspNet.Razor;
using Microsoft.Framework.Internal;
namespace Microsoft.AspNet.Mvc.Razor
namespace Microsoft.AspNet.Mvc.Razor.Compilation
{
/// <summary>
/// Default implementation of <see cref="IRazorCompilationService"/>.

View File

@ -5,9 +5,10 @@ using System;
using System.Globalization;
using System.IO;
using Microsoft.AspNet.FileProviders;
using Microsoft.AspNet.Mvc.Razor.Internal;
using Microsoft.Framework.Internal;
namespace Microsoft.AspNet.Mvc.Razor
namespace Microsoft.AspNet.Mvc.Razor.Compilation
{
public static class RazorFileHash
{

View File

@ -5,7 +5,7 @@ using System;
using Microsoft.AspNet.FileProviders;
using Microsoft.Framework.Internal;
namespace Microsoft.AspNet.Mvc.Razor
namespace Microsoft.AspNet.Mvc.Razor.Compilation
{
/// <summary>
/// A container type that represents <see cref="IFileInfo"/> along with the application base relative path

View File

@ -19,7 +19,7 @@ using Microsoft.Framework.Runtime;
using Microsoft.Framework.Runtime.Compilation;
using Microsoft.Framework.Runtime.Roslyn;
namespace Microsoft.AspNet.Mvc.Razor
namespace Microsoft.AspNet.Mvc.Razor.Compilation
{
/// <summary>
/// A type that uses Roslyn to compile C# content.

View File

@ -8,7 +8,7 @@ using Microsoft.CodeAnalysis.Text;
using Microsoft.Framework.Internal;
using Microsoft.Framework.Runtime.Roslyn;
namespace Microsoft.AspNet.Mvc.Razor
namespace Microsoft.AspNet.Mvc.Razor.Compilation
{
public static class SyntaxTreeGenerator
{

View File

@ -4,7 +4,7 @@
using System;
using Microsoft.Framework.Internal;
namespace Microsoft.AspNet.Mvc.Razor
namespace Microsoft.AspNet.Mvc.Razor.Compilation
{
/// <summary>
/// Represents the result of compilation that does not come from the <see cref="ICompilerCache" />.

View File

@ -3,7 +3,7 @@
using System.IO;
namespace Microsoft.AspNet.Mvc.Razor
namespace Microsoft.AspNet.Mvc.Razor.Internal
{
internal static class Crc32
{

View File

@ -8,7 +8,7 @@ using Microsoft.CodeAnalysis;
using Microsoft.CodeAnalysis.CSharp.Syntax;
using Microsoft.Framework.Internal;
namespace Microsoft.AspNet.Mvc.Razor
namespace Microsoft.AspNet.Mvc.Razor.Precompilation
{
public static class GeneratorResultExtensions
{

View File

@ -5,7 +5,7 @@ using System.Collections.Generic;
using Microsoft.CodeAnalysis;
using Microsoft.Framework.Internal;
namespace Microsoft.AspNet.Mvc.Razor
namespace Microsoft.AspNet.Mvc.Razor.Precompilation
{
/// <summary>
/// An entry in the cache used by <see cref="RazorPreCompiler"/>.

View File

@ -12,7 +12,7 @@ using Microsoft.Framework.Internal;
using Microsoft.Framework.Runtime;
using Microsoft.Framework.Runtime.Roslyn;
namespace Microsoft.AspNet.Mvc.Razor
namespace Microsoft.AspNet.Mvc.Razor.Precompilation
{
/// <summary>
/// <see cref="TagHelperDescriptorResolver"/> used during Razor precompilation.

View File

@ -6,7 +6,7 @@ using Microsoft.CodeAnalysis;
using Microsoft.CodeAnalysis.Text;
using Microsoft.Framework.Internal;
namespace Microsoft.AspNet.Mvc.Razor
namespace Microsoft.AspNet.Mvc.Razor.Precompilation
{
public static class RazorErrorExtensions
{

View File

@ -3,7 +3,7 @@
using System;
namespace Microsoft.AspNet.Mvc.Razor
namespace Microsoft.AspNet.Mvc.Razor.Precompilation
{
public class RazorFileInfo
{

View File

@ -7,7 +7,7 @@ using System.IO;
using System.Reflection;
using Microsoft.Framework.Runtime;
namespace Microsoft.AspNet.Mvc.Razor
namespace Microsoft.AspNet.Mvc.Razor.Precompilation
{
/// <summary>
/// Specifies metadata about precompiled views.

View File

@ -3,12 +3,13 @@
using System.Globalization;
using System.Text;
using Microsoft.AspNet.Mvc.Razor.Compilation;
using Microsoft.CodeAnalysis;
using Microsoft.Framework.Internal;
using Microsoft.Framework.Runtime;
using Microsoft.Framework.Runtime.Roslyn;
namespace Microsoft.AspNet.Mvc.Razor
namespace Microsoft.AspNet.Mvc.Razor.Precompilation
{
public class RazorFileInfoCollectionGenerator
{

View File

@ -8,6 +8,7 @@ using System.Linq;
using System.Reflection;
using System.Threading.Tasks;
using Microsoft.AspNet.FileProviders;
using Microsoft.AspNet.Mvc.Razor.Compilation;
using Microsoft.AspNet.Mvc.Razor.Directives;
using Microsoft.AspNet.Mvc.Razor.Internal;
using Microsoft.AspNet.Razor.Runtime.TagHelpers;
@ -18,7 +19,7 @@ using Microsoft.Framework.Internal;
using Microsoft.Framework.Runtime;
using Microsoft.Framework.Runtime.Roslyn;
namespace Microsoft.AspNet.Mvc.Razor
namespace Microsoft.AspNet.Mvc.Razor.Precompilation
{
public class RazorPreCompiler
{

View File

@ -2,7 +2,7 @@
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System;
using System.Collections.Concurrent;
using Microsoft.AspNet.Mvc.Razor.Compilation;
using Microsoft.Framework.DependencyInjection;
using Microsoft.Framework.Internal;

View File

@ -12,6 +12,7 @@ using Microsoft.AspNet.Mvc.ModelBinding.Metadata;
using Microsoft.AspNet.Mvc.ModelBinding.Validation;
using Microsoft.AspNet.Mvc.OptionDescriptors;
using Microsoft.AspNet.Mvc.Razor;
using Microsoft.AspNet.Mvc.Razor.Compilation;
using Microsoft.AspNet.Mvc.Razor.Directives;
using Microsoft.AspNet.Mvc.Razor.OptionDescriptors;
using Microsoft.AspNet.Mvc.Rendering;
@ -81,8 +82,8 @@ namespace Microsoft.AspNet.Mvc
// Dataflow - ModelBinding, Validation and Formatting
//
// The DefaultModelMetadataProvider does significant caching and should be a singleton.
services.AddSingleton<ModelBinding.IModelMetadataProvider, DefaultModelMetadataProvider>();
services.AddTransient<ModelBinding.Metadata.ICompositeMetadataDetailsProvider>(serviceProvider =>
services.AddSingleton<IModelMetadataProvider, DefaultModelMetadataProvider>();
services.AddTransient<ICompositeMetadataDetailsProvider>(serviceProvider =>
{
var options = serviceProvider.GetRequiredService<IOptions<MvcOptions>>().Options;
return new DefaultCompositeMetadataDetailsProvider(options.ModelMetadataDetailsProviders);
@ -156,7 +157,7 @@ namespace Microsoft.AspNet.Mvc
// These do caching so they should stay singleton
services.AddSingleton<IViewComponentSelector, DefaultViewComponentSelector>();
services.AddSingleton<IViewComponentActivator, DefaultViewComponentActivator>();
services.AddSingleton<IViewComponentDescriptorCollectionProvider,
services.AddSingleton<IViewComponentDescriptorCollectionProvider,
DefaultViewComponentDescriptorCollectionProvider>();
services.AddTransient<IViewComponentDescriptorProvider, DefaultViewComponentDescriptorProvider>();

View File

@ -3,7 +3,7 @@
using System;
using Microsoft.AspNet.FileProviders;
using Microsoft.AspNet.Mvc.Razor;
using Microsoft.AspNet.Mvc.Razor.Precompilation;
using Microsoft.Framework.Caching.Memory;
using Microsoft.Framework.DependencyInjection;
using Microsoft.Framework.Runtime;

View File

@ -9,6 +9,7 @@ using System.Reflection;
using System.Threading.Tasks;
using Microsoft.AspNet.Builder;
using Microsoft.AspNet.Mvc.Razor;
using Microsoft.AspNet.Mvc.Razor.Precompilation;
using Microsoft.Framework.DependencyInjection;
using Microsoft.Framework.Runtime;
using PrecompilationWebSite;

View File

@ -5,7 +5,7 @@ using Microsoft.Framework.Runtime;
using Moq;
using Xunit;
namespace Microsoft.AspNet.Mvc.Razor.Test
namespace Microsoft.AspNet.Mvc.Razor.Compilation
{
public class CompilationResultTest
{

View File

@ -9,11 +9,13 @@ using System.Linq;
using System.Reflection;
using System.Text;
using Microsoft.AspNet.FileProviders;
using Microsoft.AspNet.Mvc.Razor.Internal;
using Microsoft.AspNet.Mvc.Razor.Precompilation;
using Microsoft.Framework.Runtime;
using Moq;
using Xunit;
namespace Microsoft.AspNet.Mvc.Razor
namespace Microsoft.AspNet.Mvc.Razor.Compilation
{
public class CompilerCacheTest
{

View File

@ -12,7 +12,7 @@ using Microsoft.AspNet.Razor.TagHelpers;
using Moq;
using Xunit;
namespace Microsoft.AspNet.Mvc.Razor.Test
namespace Microsoft.AspNet.Mvc.Razor.Compilation
{
public class RazorCompilationServiceTest
{

View File

@ -11,7 +11,7 @@ using Microsoft.Framework.Runtime.Compilation;
using Moq;
using Xunit;
namespace Microsoft.AspNet.Mvc.Razor
namespace Microsoft.AspNet.Mvc.Razor.Compilation
{
public class RoslynCompilationServiceTest
{

View File

@ -12,7 +12,7 @@ using Microsoft.AspNet.Testing;
using Moq;
using Xunit;
namespace Microsoft.AspNet.Mvc.Razor
namespace Microsoft.AspNet.Mvc.Razor.Compilation
{
public class RazorFileHashTest
{

View File

@ -3,6 +3,7 @@
using Microsoft.AspNet.Mvc;
using Microsoft.AspNet.Mvc.Razor;
using Microsoft.AspNet.Mvc.Razor.Compilation;
using Microsoft.Framework.OptionsModel;
using Microsoft.Framework.Runtime;

View File

@ -2,7 +2,7 @@
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using Microsoft.AspNet.Builder;
using Microsoft.AspNet.Mvc.Razor;
using Microsoft.AspNet.Mvc.Razor.Compilation;
using Microsoft.Framework.DependencyInjection;
namespace RazorCompilerCacheWebSite