Move some stuff to .Extensions

Moved design time directives and tag helper attribute preallocation to
.Extensions.

Just mechanical namespace changes here.
This commit is contained in:
Ryan Nowak 2017-06-21 20:26:31 -07:00
parent 7a234ca513
commit e3b3e20738
17 changed files with 32 additions and 24 deletions

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.Linq;
using Microsoft.AspNetCore.Razor.Language.Extensions;
using Microsoft.AspNetCore.Razor.Language.Intermediate;
namespace Microsoft.AspNetCore.Razor.Language.CodeGeneration

View File

@ -3,8 +3,9 @@
using System;
using Microsoft.AspNetCore.Razor.Language.CodeGeneration;
using Microsoft.AspNetCore.Razor.Language.Intermediate;
namespace Microsoft.AspNetCore.Razor.Language.Intermediate
namespace Microsoft.AspNetCore.Razor.Language.Extensions
{
internal sealed class AddPreallocatedTagHelperHtmlAttributeIntermediateNode : ExtensionIntermediateNode
{

View File

@ -3,8 +3,9 @@
using System;
using Microsoft.AspNetCore.Razor.Language.CodeGeneration;
using Microsoft.AspNetCore.Razor.Language.Intermediate;
namespace Microsoft.AspNetCore.Razor.Language.Intermediate
namespace Microsoft.AspNetCore.Razor.Language.Extensions
{
internal sealed class DeclarePreallocatedTagHelperAttributeIntermediateNode : ExtensionIntermediateNode
{

View File

@ -3,8 +3,9 @@
using System;
using Microsoft.AspNetCore.Razor.Language.CodeGeneration;
using Microsoft.AspNetCore.Razor.Language.Intermediate;
namespace Microsoft.AspNetCore.Razor.Language.Intermediate
namespace Microsoft.AspNetCore.Razor.Language.Extensions
{
internal sealed class DeclarePreallocatedTagHelperHtmlAttributeIntermediateNode : ExtensionIntermediateNode
{

View File

@ -3,8 +3,9 @@
using System;
using Microsoft.AspNetCore.Razor.Language.CodeGeneration;
using Microsoft.AspNetCore.Razor.Language.Intermediate;
namespace Microsoft.AspNetCore.Razor.Language.Intermediate
namespace Microsoft.AspNetCore.Razor.Language.Extensions
{
internal sealed class DesignTimeDirectiveIntermediateNode : ExtensionIntermediateNode
{

View File

@ -3,7 +3,7 @@
using Microsoft.AspNetCore.Razor.Language.Intermediate;
namespace Microsoft.AspNetCore.Razor.Language
namespace Microsoft.AspNetCore.Razor.Language.Extensions
{
internal class DesignTimeDirectivePass : IntermediateNodePassBase, IRazorDirectiveClassifierPass
{

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.AspNetCore.Razor.Language.CodeGeneration;
using Microsoft.AspNetCore.Razor.Language.Intermediate;
namespace Microsoft.AspNetCore.Razor.Language.CodeGeneration
namespace Microsoft.AspNetCore.Razor.Language.Extensions
{
internal class DesignTimeDirectiveTargetExtension : IDesignTimeDirectiveTargetExtension
{

View File

@ -1,9 +1,10 @@
// 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 Microsoft.AspNetCore.Razor.Language.CodeGeneration;
using Microsoft.AspNetCore.Razor.Language.Intermediate;
namespace Microsoft.AspNetCore.Razor.Language.CodeGeneration
namespace Microsoft.AspNetCore.Razor.Language.Extensions
{
internal interface IDesignTimeDirectiveTargetExtension : ICodeTargetExtension
{

View File

@ -1,9 +1,10 @@
// 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 Microsoft.AspNetCore.Razor.Language.Intermediate;
using Microsoft.AspNetCore.Razor.Language.CodeGeneration;
using Microsoft.AspNetCore.Razor.Language.Extensions;
namespace Microsoft.AspNetCore.Razor.Language.CodeGeneration
namespace Microsoft.AspNetCore.Razor.Language.Extensions
{
internal interface IPreallocatedAttributeTargetExtension : ICodeTargetExtension
{

View File

@ -2,10 +2,9 @@
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System;
using Microsoft.AspNetCore.Razor.Language.Intermediate;
using Microsoft.AspNetCore.Razor.Language.Legacy;
using Microsoft.AspNetCore.Razor.Language.CodeGeneration;
namespace Microsoft.AspNetCore.Razor.Language.CodeGeneration
namespace Microsoft.AspNetCore.Razor.Language.Extensions
{
internal class PreallocatedAttributeTargetExtension : IPreallocatedAttributeTargetExtension
{

View File

@ -6,9 +6,9 @@ using System.Linq;
using System.Text;
using Microsoft.AspNetCore.Razor.Language.Intermediate;
namespace Microsoft.AspNetCore.Razor.Language
namespace Microsoft.AspNetCore.Razor.Language.Extensions
{
internal class RazorPreallocatedTagHelperAttributeOptimizationPass : IntermediateNodePassBase, IRazorOptimizationPass
internal class PreallocatedTagHelperAttributeOptimizationPass : IntermediateNodePassBase, IRazorOptimizationPass
{
public override int Order => DefaultFeatureOrder;

View File

@ -3,8 +3,9 @@
using System;
using Microsoft.AspNetCore.Razor.Language.CodeGeneration;
using Microsoft.AspNetCore.Razor.Language.Intermediate;
namespace Microsoft.AspNetCore.Razor.Language.Intermediate
namespace Microsoft.AspNetCore.Razor.Language.Extensions
{
internal sealed class SetPreallocatedTagHelperPropertyIntermediateNode : ExtensionIntermediateNode
{

View File

@ -5,6 +5,7 @@ using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Razor.Language.CodeGeneration;
using Microsoft.AspNetCore.Razor.Language.Extensions;
namespace Microsoft.AspNetCore.Razor.Language
{
@ -103,7 +104,7 @@ namespace Microsoft.AspNetCore.Razor.Language
internal static void AddRuntimeDefaults(IRazorEngineBuilder builder)
{
builder.Features.Add(new RazorPreallocatedTagHelperAttributeOptimizationPass());
builder.Features.Add(new PreallocatedTagHelperAttributeOptimizationPass());
}
internal static void AddDesignTimeDefaults(IRazorEngineBuilder builder)

View File

@ -2,10 +2,10 @@
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using Microsoft.AspNetCore.Razor.Language.Intermediate;
using Microsoft.AspNetCore.Razor.Language.Legacy;
using Microsoft.AspNetCore.Razor.Language.CodeGeneration;
using Xunit;
namespace Microsoft.AspNetCore.Razor.Language.CodeGeneration
namespace Microsoft.AspNetCore.Razor.Language.Extensions
{
public class DesignTimeDirectiveTargetExtensionTest
{

View File

@ -1,11 +1,10 @@
// 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 Microsoft.AspNetCore.Razor.Language.Intermediate;
using Microsoft.AspNetCore.Razor.Language.Legacy;
using Microsoft.AspNetCore.Razor.Language.CodeGeneration;
using Xunit;
namespace Microsoft.AspNetCore.Razor.Language.CodeGeneration
namespace Microsoft.AspNetCore.Razor.Language.Extensions
{
public class PreallocatedAttributeTargetExtensionTest
{

View File

@ -3,7 +3,7 @@
using System.Collections.Generic;
using System.Linq;
using Microsoft.AspNetCore.Razor.Language.CodeGeneration;
using Microsoft.AspNetCore.Razor.Language.Extensions;
using Moq;
using Xunit;
@ -152,7 +152,7 @@ namespace Microsoft.AspNetCore.Razor.Language
feature => Assert.IsType<DefaultDocumentClassifierPass>(feature),
feature => Assert.IsType<DirectiveRemovalOptimizationPass>(feature),
feature => Assert.IsType<DefaultDocumentClassifierPassFeature>(feature),
feature => Assert.IsType<RazorPreallocatedTagHelperAttributeOptimizationPass>(feature));
feature => Assert.IsType<PreallocatedTagHelperAttributeOptimizationPass>(feature));
}
private static void AssertDefaultRuntimePhases(IReadOnlyList<IRazorEnginePhase> phases)

View File

@ -4,6 +4,7 @@
using System;
using System.Collections.Generic;
using System.Text;
using Microsoft.AspNetCore.Razor.Language.Extensions;
using Microsoft.AspNetCore.Razor.Language.Legacy;
using Xunit;
using Xunit.Sdk;