Internal cleanup in Razor

This commit is contained in:
Ryan Nowak 2016-01-24 21:50:33 -08:00
parent a276169693
commit de3b33caf1
30 changed files with 38 additions and 43 deletions

View File

@ -6,7 +6,7 @@ using Microsoft.Dnx.Compilation.CSharp;
using Microsoft.Extensions.CompilationAbstractions; using Microsoft.Extensions.CompilationAbstractions;
using Microsoft.Extensions.PlatformAbstractions; using Microsoft.Extensions.PlatformAbstractions;
namespace Microsoft.AspNetCore.Mvc.Razor.Compilation namespace Microsoft.AspNetCore.Mvc.Razor.Internal
{ {
/// <summary> /// <summary>
/// Extension methods for <see cref="ICompilerOptionsProvider"/>. /// Extension methods for <see cref="ICompilerOptionsProvider"/>.

View File

@ -7,10 +7,11 @@ using System.Collections.Generic;
using System.Diagnostics; using System.Diagnostics;
using System.Text; using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc.Razor.Compilation;
using Microsoft.Extensions.Caching.Memory; using Microsoft.Extensions.Caching.Memory;
using Microsoft.Extensions.FileProviders; using Microsoft.Extensions.FileProviders;
namespace Microsoft.AspNetCore.Mvc.Razor.Compilation namespace Microsoft.AspNetCore.Mvc.Razor.Internal
{ {
/// <summary> /// <summary>
/// Caches the result of runtime compilation of Razor files for the duration of the application lifetime. /// Caches the result of runtime compilation of Razor files for the duration of the application lifetime.

View File

@ -3,9 +3,10 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using Microsoft.AspNetCore.Mvc.Razor.Compilation;
using Microsoft.Extensions.Primitives; using Microsoft.Extensions.Primitives;
namespace Microsoft.AspNetCore.Mvc.Razor.Compilation namespace Microsoft.AspNetCore.Mvc.Razor.Internal
{ {
/// <summary> /// <summary>
/// Result of <see cref="ICompilerCache"/>. /// Result of <see cref="ICompilerCache"/>.

View File

@ -3,7 +3,7 @@
using Microsoft.Extensions.Options; using Microsoft.Extensions.Options;
namespace Microsoft.AspNetCore.Mvc.Razor.Compilation namespace Microsoft.AspNetCore.Mvc.Razor.Internal
{ {
/// <summary> /// <summary>
/// Default implementation for <see cref="ICompilerCacheProvider"/>. /// Default implementation for <see cref="ICompilerCacheProvider"/>.

View File

@ -3,8 +3,9 @@
using System; using System;
using Microsoft.AspNetCore.Mvc.Razor.Compilation; using Microsoft.AspNetCore.Mvc.Razor.Compilation;
using Microsoft.AspNetCore.Mvc.Razor.Internal;
namespace Microsoft.AspNetCore.Mvc.Razor namespace Microsoft.AspNetCore.Mvc.Razor.Internal
{ {
/// <summary> /// <summary>
/// Represents a <see cref="IRazorPageFactoryProvider"/> that creates <see cref="RazorPage"/> instances /// Represents a <see cref="IRazorPageFactoryProvider"/> that creates <see cref="RazorPage"/> instances

View File

@ -4,7 +4,7 @@
using Microsoft.Extensions.FileProviders; using Microsoft.Extensions.FileProviders;
using Microsoft.Extensions.Options; using Microsoft.Extensions.Options;
namespace Microsoft.AspNetCore.Mvc.Razor namespace Microsoft.AspNetCore.Mvc.Razor.Internal
{ {
/// <summary> /// <summary>
/// Default implementation of <see cref="IRazorViewEngineFileProviderAccessor"/>. /// Default implementation of <see cref="IRazorViewEngineFileProviderAccessor"/>.

View File

@ -12,7 +12,7 @@ using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Options; using Microsoft.Extensions.Options;
using Microsoft.Extensions.PlatformAbstractions; using Microsoft.Extensions.PlatformAbstractions;
namespace Microsoft.AspNetCore.Mvc.Razor.Compilation namespace Microsoft.AspNetCore.Mvc.Razor.Internal
{ {
/// <summary> /// <summary>
/// A type that uses Roslyn to compile C# content and <see cref="ILibraryExporter"/> to find out references. /// A type that uses Roslyn to compile C# content and <see cref="ILibraryExporter"/> to find out references.

View File

@ -11,7 +11,7 @@ using Microsoft.AspNetCore.Razor.TagHelpers;
using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Internal; using Microsoft.Extensions.Internal;
namespace Microsoft.AspNetCore.Mvc.Razor namespace Microsoft.AspNetCore.Mvc.Razor.Internal
{ {
/// <inheritdoc /> /// <inheritdoc />
public class DefaultTagHelperActivator : ITagHelperActivator public class DefaultTagHelperActivator : ITagHelperActivator

View File

@ -9,7 +9,7 @@ using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Options; using Microsoft.Extensions.Options;
using Microsoft.Extensions.PlatformAbstractions; using Microsoft.Extensions.PlatformAbstractions;
namespace Microsoft.AspNetCore.Mvc.Razor.Compilation namespace Microsoft.AspNetCore.Mvc.Razor.Internal
{ {
/// <summary> /// <summary>
/// A type that uses Roslyn to compile C# content and <see cref="DependencyContext"/> to locate references. /// A type that uses Roslyn to compile C# content and <see cref="DependencyContext"/> to locate references.

View File

@ -8,7 +8,7 @@ using Microsoft.CodeAnalysis;
using Microsoft.Extensions.Options; using Microsoft.Extensions.Options;
using Microsoft.Extensions.DependencyModel; using Microsoft.Extensions.DependencyModel;
namespace Microsoft.AspNetCore.Mvc namespace Microsoft.AspNetCore.Mvc.Razor.Internal
{ {
/// <summary> /// <summary>
/// Sets up compilation and parse option default options for <see cref="RazorViewEngineOptions"/> using <see cref="DependencyContext"/> /// Sets up compilation and parse option default options for <see cref="RazorViewEngineOptions"/> using <see cref="DependencyContext"/>

View File

@ -8,7 +8,7 @@ using Microsoft.CodeAnalysis;
using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp;
using Microsoft.CodeAnalysis.CSharp.Syntax; using Microsoft.CodeAnalysis.CSharp.Syntax;
namespace Microsoft.AspNetCore.Mvc.Razor.Compilation namespace Microsoft.AspNetCore.Mvc.Razor.Internal
{ {
/// <summary> /// <summary>
/// An expression rewriter which can hoist a simple expression lambda into a private field. /// An expression rewriter which can hoist a simple expression lambda into a private field.

View File

@ -2,8 +2,9 @@
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System; using System;
using Microsoft.AspNetCore.Mvc.Razor.Compilation;
namespace Microsoft.AspNetCore.Mvc.Razor.Compilation namespace Microsoft.AspNetCore.Mvc.Razor.Internal
{ {
/// <summary> /// <summary>
/// Caches the result of runtime compilation of Razor files for the duration of the app lifetime. /// Caches the result of runtime compilation of Razor files for the duration of the app lifetime.

View File

@ -1,7 +1,7 @@
// Copyright (c) .NET Foundation. All rights reserved. // Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
namespace Microsoft.AspNetCore.Mvc.Razor.Compilation namespace Microsoft.AspNetCore.Mvc.Razor.Internal
{ {
/// <summary> /// <summary>
/// Provides access to a cached <see cref="ICompilerCache"/> instance. /// Provides access to a cached <see cref="ICompilerCache"/> instance.

View File

@ -3,7 +3,7 @@
using Microsoft.Extensions.FileProviders; using Microsoft.Extensions.FileProviders;
namespace Microsoft.AspNetCore.Mvc.Razor namespace Microsoft.AspNetCore.Mvc.Razor.Internal
{ {
/// <summary> /// <summary>
/// Accessor to the <see cref="IFileProvider"/> used by <see cref="RazorViewEngine"/>. /// Accessor to the <see cref="IFileProvider"/> used by <see cref="RazorViewEngine"/>.

View File

@ -7,13 +7,14 @@ using System.Diagnostics;
using System.IO; using System.IO;
using System.Linq; using System.Linq;
using Microsoft.AspNetCore.Diagnostics; using Microsoft.AspNetCore.Diagnostics;
using Microsoft.AspNetCore.Mvc.Razor.Compilation;
using Microsoft.AspNetCore.Mvc.Razor.Internal; using Microsoft.AspNetCore.Mvc.Razor.Internal;
using Microsoft.AspNetCore.Razor; using Microsoft.AspNetCore.Razor;
using Microsoft.AspNetCore.Razor.CodeGenerators; using Microsoft.AspNetCore.Razor.CodeGenerators;
using Microsoft.Extensions.FileProviders; using Microsoft.Extensions.FileProviders;
using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging;
namespace Microsoft.AspNetCore.Mvc.Razor.Compilation namespace Microsoft.AspNetCore.Mvc.Razor.Internal
{ {
/// <summary> /// <summary>
/// Default implementation of <see cref="IRazorCompilationService"/>. /// Default implementation of <see cref="IRazorCompilationService"/>.

View File

@ -14,7 +14,7 @@ using System.Runtime.Loader;
#endif #endif
using System.Runtime.Versioning; using System.Runtime.Versioning;
using Microsoft.AspNetCore.Diagnostics; using Microsoft.AspNetCore.Diagnostics;
using Microsoft.AspNetCore.Mvc.Razor.Internal; using Microsoft.AspNetCore.Mvc.Razor.Compilation;
using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis;
using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp;
using Microsoft.CodeAnalysis.Emit; using Microsoft.CodeAnalysis.Emit;
@ -24,7 +24,7 @@ using Microsoft.Extensions.PlatformAbstractions;
using Microsoft.Extensions.Options; using Microsoft.Extensions.Options;
using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging;
namespace Microsoft.AspNetCore.Mvc.Razor.Compilation namespace Microsoft.AspNetCore.Mvc.Razor.Internal
{ {
/// <summary> /// <summary>
/// A type that uses Roslyn to compile C# content. /// A type that uses Roslyn to compile C# content.

View File

@ -8,7 +8,7 @@ using Microsoft.CodeAnalysis.CSharp;
using Microsoft.CodeAnalysis.Text; using Microsoft.CodeAnalysis.Text;
using Microsoft.Dnx.Compilation.CSharp; using Microsoft.Dnx.Compilation.CSharp;
namespace Microsoft.AspNetCore.Mvc.Razor.Compilation namespace Microsoft.AspNetCore.Mvc.Razor.Internal
{ {
public static class SyntaxTreeGenerator public static class SyntaxTreeGenerator
{ {

View File

@ -3,7 +3,7 @@
using System; using System;
namespace Microsoft.AspNetCore.Mvc.Razor namespace Microsoft.AspNetCore.Mvc.Razor.Internal
{ {
/// <summary> /// <summary>
/// An item in <see cref="ViewLocationCacheResult"/>. /// An item in <see cref="ViewLocationCacheResult"/>.

View File

@ -5,7 +5,7 @@ using System;
using System.Collections.Generic; using System.Collections.Generic;
using Microsoft.Extensions.Internal; using Microsoft.Extensions.Internal;
namespace Microsoft.AspNetCore.Mvc.Razor namespace Microsoft.AspNetCore.Mvc.Razor.Internal
{ {
/// <summary> /// <summary>
/// Key for entries in <see cref="RazorViewEngine.ViewLookupCache"/>. /// Key for entries in <see cref="RazorViewEngine.ViewLookupCache"/>.

View File

@ -4,7 +4,7 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
namespace Microsoft.AspNetCore.Mvc.Razor namespace Microsoft.AspNetCore.Mvc.Razor.Internal
{ {
/// <summary> /// <summary>
/// Result of view location cache lookup. /// Result of view location cache lookup.

View File

@ -1,13 +0,0 @@
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System;
using Xunit;
namespace Microsoft.AspNetCore.Mvc.Razor
{
public class DefaultPrecompiledViewsProviderTest
{
}
}

View File

@ -6,10 +6,11 @@ using System.Collections.Generic;
using System.Threading; using System.Threading;
using System.Threading.Tasks; using System.Threading.Tasks;
using Microsoft.AspNetCore.Diagnostics; using Microsoft.AspNetCore.Diagnostics;
using Microsoft.AspNetCore.Mvc.Razor.Compilation;
using Moq; using Moq;
using Xunit; using Xunit;
namespace Microsoft.AspNetCore.Mvc.Razor.Compilation namespace Microsoft.AspNetCore.Mvc.Razor.Internal
{ {
public class CompilerCacheTest public class CompilerCacheTest
{ {

View File

@ -8,7 +8,7 @@ using Microsoft.Extensions.Primitives;
using Moq; using Moq;
using Xunit; using Xunit;
namespace Microsoft.AspNetCore.Mvc.Razor.Test namespace Microsoft.AspNetCore.Mvc.Razor.Internal
{ {
public class DefaultRazorPageFactoryProviderTest public class DefaultRazorPageFactoryProviderTest
{ {

View File

@ -1,14 +1,12 @@
// Copyright (c) .NET Foundation. All rights reserved. // Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using Microsoft.AspNetCore.Mvc.Internal;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.FileProviders; using Microsoft.Extensions.FileProviders;
using Microsoft.Extensions.Options; using Microsoft.Extensions.Options;
using Moq; using Moq;
using Xunit; using Xunit;
namespace Microsoft.AspNetCore.Mvc.Razor namespace Microsoft.AspNetCore.Mvc.Razor.Internal
{ {
public class DefaultRazorViewEngineFileProviderAccessorTest public class DefaultRazorViewEngineFileProviderAccessorTest
{ {

View File

@ -2,6 +2,7 @@
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System; using System;
using Microsoft.AspNetCore.Mvc.Razor.Compilation;
using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis;
using Microsoft.CodeAnalysis.Text; using Microsoft.CodeAnalysis.Text;
using Microsoft.Extensions.CompilationAbstractions; using Microsoft.Extensions.CompilationAbstractions;
@ -12,7 +13,7 @@ using Microsoft.Extensions.PlatformAbstractions;
using Moq; using Moq;
using Xunit; using Xunit;
namespace Microsoft.AspNetCore.Mvc.Razor.Compilation namespace Microsoft.AspNetCore.Mvc.Razor.Internal
{ {
public class DefaultRoslynCompilationServiceTest public class DefaultRoslynCompilationServiceTest
{ {

View File

@ -17,7 +17,7 @@ using Microsoft.Extensions.DependencyInjection;
using Moq; using Moq;
using Xunit; using Xunit;
namespace Microsoft.AspNetCore.Mvc.Razor namespace Microsoft.AspNetCore.Mvc.Razor.Internal
{ {
public class DefaultTagHelperActivatorTest public class DefaultTagHelperActivatorTest
{ {

View File

@ -12,7 +12,7 @@ using Microsoft.Extensions.CompilationAbstractions;
using Microsoft.Extensions.PlatformAbstractions; using Microsoft.Extensions.PlatformAbstractions;
using Xunit; using Xunit;
namespace Microsoft.AspNetCore.Mvc.Razor.Compilation namespace Microsoft.AspNetCore.Mvc.Razor.Internal
{ {
public class ExpressionRewriterTest public class ExpressionRewriterTest
{ {

View File

@ -3,6 +3,7 @@
using System.IO; using System.IO;
using System.Linq; using System.Linq;
using Microsoft.AspNetCore.Mvc.Razor.Compilation;
using Microsoft.AspNetCore.Razor; using Microsoft.AspNetCore.Razor;
using Microsoft.AspNetCore.Razor.Chunks; using Microsoft.AspNetCore.Razor.Chunks;
using Microsoft.AspNetCore.Razor.CodeGenerators; using Microsoft.AspNetCore.Razor.CodeGenerators;
@ -14,7 +15,7 @@ using Microsoft.Extensions.Options;
using Moq; using Moq;
using Xunit; using Xunit;
namespace Microsoft.AspNetCore.Mvc.Razor.Compilation namespace Microsoft.AspNetCore.Mvc.Razor.Internal
{ {
public class RazorCompilationServiceTest public class RazorCompilationServiceTest
{ {

View File

@ -12,6 +12,7 @@ using Microsoft.AspNetCore.Mvc.Abstractions;
using Microsoft.AspNetCore.Mvc.Infrastructure; using Microsoft.AspNetCore.Mvc.Infrastructure;
using Microsoft.AspNetCore.Mvc.Internal; using Microsoft.AspNetCore.Mvc.Internal;
using Microsoft.AspNetCore.Mvc.ModelBinding; using Microsoft.AspNetCore.Mvc.ModelBinding;
using Microsoft.AspNetCore.Mvc.Razor.Internal;
using Microsoft.AspNetCore.Mvc.Rendering; using Microsoft.AspNetCore.Mvc.Rendering;
using Microsoft.AspNetCore.Mvc.ViewEngines; using Microsoft.AspNetCore.Mvc.ViewEngines;
using Microsoft.AspNetCore.Mvc.ViewFeatures; using Microsoft.AspNetCore.Mvc.ViewFeatures;

View File

@ -5,6 +5,7 @@ using System.IO;
using System.Text; using System.Text;
using Microsoft.AspNetCore.Mvc.Razor; using Microsoft.AspNetCore.Mvc.Razor;
using Microsoft.AspNetCore.Mvc.Razor.Compilation; using Microsoft.AspNetCore.Mvc.Razor.Compilation;
using Microsoft.AspNetCore.Mvc.Razor.Internal;
using Microsoft.AspNetCore.Razor.CodeGenerators; using Microsoft.AspNetCore.Razor.CodeGenerators;
using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging;