From b36bbac60aba4105aa57e7c1b8b7f1e29c79e42a Mon Sep 17 00:00:00 2001 From: Ryan Nowak Date: Wed, 21 Jun 2017 08:13:11 -0700 Subject: [PATCH] Clean up .Legacy Also sealed two types that didn't get the treatment. --- .../{Legacy => }/HtmlAttributeValueStyle.cs | 4 +++- .../Legacy/BlockKindInternal.cs | 2 +- .../Legacy/LocationTagged.cs | 2 +- .../CompilationTagHelperFeature.cs | 2 +- .../DefaultMetadataReferenceFeature.cs | 2 +- 5 files changed, 7 insertions(+), 5 deletions(-) rename src/Microsoft.AspNetCore.Razor.Language/{Legacy => }/HtmlAttributeValueStyle.cs (61%) diff --git a/src/Microsoft.AspNetCore.Razor.Language/Legacy/HtmlAttributeValueStyle.cs b/src/Microsoft.AspNetCore.Razor.Language/HtmlAttributeValueStyle.cs similarity index 61% rename from src/Microsoft.AspNetCore.Razor.Language/Legacy/HtmlAttributeValueStyle.cs rename to src/Microsoft.AspNetCore.Razor.Language/HtmlAttributeValueStyle.cs index ed415f024c..468aec72a1 100644 --- a/src/Microsoft.AspNetCore.Razor.Language/Legacy/HtmlAttributeValueStyle.cs +++ b/src/Microsoft.AspNetCore.Razor.Language/HtmlAttributeValueStyle.cs @@ -1,8 +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. -namespace Microsoft.AspNetCore.Razor.Language.Legacy +namespace Microsoft.AspNetCore.Razor.Language { + // This is the design time equivalent of Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle. + // They should be kept in sync. public enum HtmlAttributeValueStyle { DoubleQuotes, diff --git a/src/Microsoft.AspNetCore.Razor.Language/Legacy/BlockKindInternal.cs b/src/Microsoft.AspNetCore.Razor.Language/Legacy/BlockKindInternal.cs index d5b384a956..7533909396 100644 --- a/src/Microsoft.AspNetCore.Razor.Language/Legacy/BlockKindInternal.cs +++ b/src/Microsoft.AspNetCore.Razor.Language/Legacy/BlockKindInternal.cs @@ -3,7 +3,7 @@ namespace Microsoft.AspNetCore.Razor.Language.Legacy { - public enum BlockKindInternal + internal enum BlockKindInternal { // Code Statement, diff --git a/src/Microsoft.AspNetCore.Razor.Language/Legacy/LocationTagged.cs b/src/Microsoft.AspNetCore.Razor.Language/Legacy/LocationTagged.cs index 8a7a56bdb4..ad90f96f60 100644 --- a/src/Microsoft.AspNetCore.Razor.Language/Legacy/LocationTagged.cs +++ b/src/Microsoft.AspNetCore.Razor.Language/Legacy/LocationTagged.cs @@ -9,7 +9,7 @@ using Microsoft.Extensions.Internal; namespace Microsoft.AspNetCore.Razor.Language.Legacy { [DebuggerDisplay("({Location})\"{Value}\"")] - public class LocationTagged : IFormattable + internal class LocationTagged : IFormattable { public LocationTagged(TValue value, int absoluteIndex, int lineIndex, int characterIndex) : this (value, new SourceLocation(absoluteIndex, lineIndex, characterIndex)) diff --git a/src/Microsoft.CodeAnalysis.Razor/CompilationTagHelperFeature.cs b/src/Microsoft.CodeAnalysis.Razor/CompilationTagHelperFeature.cs index bf32fd1a92..6aa81ff506 100644 --- a/src/Microsoft.CodeAnalysis.Razor/CompilationTagHelperFeature.cs +++ b/src/Microsoft.CodeAnalysis.Razor/CompilationTagHelperFeature.cs @@ -8,7 +8,7 @@ using Microsoft.CodeAnalysis.CSharp; namespace Microsoft.CodeAnalysis.Razor { - public class CompilationTagHelperFeature : RazorEngineFeatureBase, ITagHelperFeature + public sealed class CompilationTagHelperFeature : RazorEngineFeatureBase, ITagHelperFeature { private ITagHelperDescriptorProvider[] _providers; private IMetadataReferenceFeature _referenceFeature; diff --git a/src/Microsoft.CodeAnalysis.Razor/DefaultMetadataReferenceFeature.cs b/src/Microsoft.CodeAnalysis.Razor/DefaultMetadataReferenceFeature.cs index 7f965e43be..a8914d7513 100644 --- a/src/Microsoft.CodeAnalysis.Razor/DefaultMetadataReferenceFeature.cs +++ b/src/Microsoft.CodeAnalysis.Razor/DefaultMetadataReferenceFeature.cs @@ -6,7 +6,7 @@ using Microsoft.AspNetCore.Razor.Language; namespace Microsoft.CodeAnalysis.Razor { - public class DefaultMetadataReferenceFeature : RazorEngineFeatureBase, IMetadataReferenceFeature + public sealed class DefaultMetadataReferenceFeature : RazorEngineFeatureBase, IMetadataReferenceFeature { public IReadOnlyList References { get; set; } }