From 11114057869bcaed5f26fa4f73e808848b00aa77 Mon Sep 17 00:00:00 2001 From: Doug Bunting Date: Tue, 28 Apr 2015 10:45:51 -0700 Subject: [PATCH] Remove extra `[NotNull]` definition and second AssemblyInfo.cs file - add necessary build-time dependency - add missing `using Microsoft.Framework.Internal;` statements - remove `[NotNull]` from tests - avoid duplicate definitions of `[NotNull]` from referenced projects - remove incorrect NotNullArgument.cs and second AssemblyInfo.cs files entirely - merge content into AssemblyInfo.cs file in expected location nit: clean up some trailing whitespace --- .../AssemblyInfo.cs | 6 ------ .../Properties/AssemblyInfo.cs | 4 +++- .../CodeBuilder/CSharp/CSharpCodeBuilder.cs | 1 + .../CodeBuilder/CSharp/CSharpCodeWriter.cs | 1 + .../CSharp/CSharpLineMappingWriter.cs | 1 + .../CSharp/CSharpTagHelperCodeRenderer.cs | 1 + .../Visitors/CSharpDesignTimeHelpersVisitor.cs | 1 + .../CSharpTagHelperFieldDeclarationVisitor.cs | 1 + ...CSharpTagHelperRunnerInitializationVisitor.cs | 2 ++ .../CSharp/Visitors/CSharpTypeMemberVisitor.cs | 2 +- .../Generator/GeneratedClassContext.cs | 1 + src/Microsoft.AspNet.Razor/GeneratorResults.cs | 1 + src/Microsoft.AspNet.Razor/NotNullArgument.cs | 12 ------------ .../Parser/ParserContext.cs | 1 + src/Microsoft.AspNet.Razor/Parser/RazorParser.cs | 5 +++-- .../TagHelpers/TagHelperDirectiveSpanVisitor.cs | 12 +++++++----- src/Microsoft.AspNet.Razor/ParserResults.cs | 1 + src/Microsoft.AspNet.Razor/RazorEngineHost.cs | 1 + .../RazorTemplateEngine.cs | 1 + src/Microsoft.AspNet.Razor/SourceLocation.cs | 1 + .../TagHelperAttributeValueCodeRenderer.cs | 1 + .../TagHelpers/TagHelperDescriptor.cs | 1 + .../TagHelperDescriptorResolutionContext.cs | 1 + .../TagHelpers/TagHelperDirectiveDescriptor.cs | 2 ++ src/Microsoft.AspNet.Razor/project.json | 3 +++ .../CaseSensitiveTagHelperAttributeComparer.cs | 6 ++---- .../TagHelperAttributeValueCodeRendererTest.cs | 16 +++++++++------- 27 files changed, 48 insertions(+), 38 deletions(-) delete mode 100644 src/Microsoft.AspNet.Razor.Runtime/AssemblyInfo.cs delete mode 100644 src/Microsoft.AspNet.Razor/NotNullArgument.cs diff --git a/src/Microsoft.AspNet.Razor.Runtime/AssemblyInfo.cs b/src/Microsoft.AspNet.Razor.Runtime/AssemblyInfo.cs deleted file mode 100644 index d36bab93fd..0000000000 --- a/src/Microsoft.AspNet.Razor.Runtime/AssemblyInfo.cs +++ /dev/null @@ -1,6 +0,0 @@ -// 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.Runtime.CompilerServices; - -[assembly: InternalsVisibleTo("Microsoft.AspNet.Razor.Runtime.Test")] \ No newline at end of file diff --git a/src/Microsoft.AspNet.Razor.Runtime/Properties/AssemblyInfo.cs b/src/Microsoft.AspNet.Razor.Runtime/Properties/AssemblyInfo.cs index f5c6f4a83a..4c04cea7e1 100644 --- a/src/Microsoft.AspNet.Razor.Runtime/Properties/AssemblyInfo.cs +++ b/src/Microsoft.AspNet.Razor.Runtime/Properties/AssemblyInfo.cs @@ -2,5 +2,7 @@ // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System.Reflection; +using System.Runtime.CompilerServices; -[assembly: AssemblyMetadata("Serviceable", "True")] \ No newline at end of file +[assembly: AssemblyMetadata("Serviceable", "True")] +[assembly: InternalsVisibleTo("Microsoft.AspNet.Razor.Runtime.Test")] \ No newline at end of file diff --git a/src/Microsoft.AspNet.Razor/Generator/Compiler/CodeBuilder/CSharp/CSharpCodeBuilder.cs b/src/Microsoft.AspNet.Razor/Generator/Compiler/CodeBuilder/CSharp/CSharpCodeBuilder.cs index 8b895795da..4b520620eb 100644 --- a/src/Microsoft.AspNet.Razor/Generator/Compiler/CodeBuilder/CSharp/CSharpCodeBuilder.cs +++ b/src/Microsoft.AspNet.Razor/Generator/Compiler/CodeBuilder/CSharp/CSharpCodeBuilder.cs @@ -4,6 +4,7 @@ using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; +using Microsoft.Framework.Internal; namespace Microsoft.AspNet.Razor.Generator.Compiler.CSharp { diff --git a/src/Microsoft.AspNet.Razor/Generator/Compiler/CodeBuilder/CSharp/CSharpCodeWriter.cs b/src/Microsoft.AspNet.Razor/Generator/Compiler/CodeBuilder/CSharp/CSharpCodeWriter.cs index 83d66a9435..4ea555b743 100644 --- a/src/Microsoft.AspNet.Razor/Generator/Compiler/CodeBuilder/CSharp/CSharpCodeWriter.cs +++ b/src/Microsoft.AspNet.Razor/Generator/Compiler/CodeBuilder/CSharp/CSharpCodeWriter.cs @@ -7,6 +7,7 @@ using System.Globalization; using System.Linq; using Microsoft.AspNet.Razor.Parser.SyntaxTree; using Microsoft.AspNet.Razor.Text; +using Microsoft.Framework.Internal; namespace Microsoft.AspNet.Razor.Generator.Compiler.CSharp { diff --git a/src/Microsoft.AspNet.Razor/Generator/Compiler/CodeBuilder/CSharp/CSharpLineMappingWriter.cs b/src/Microsoft.AspNet.Razor/Generator/Compiler/CodeBuilder/CSharp/CSharpLineMappingWriter.cs index 3bef138e07..42dfc54718 100644 --- a/src/Microsoft.AspNet.Razor/Generator/Compiler/CodeBuilder/CSharp/CSharpLineMappingWriter.cs +++ b/src/Microsoft.AspNet.Razor/Generator/Compiler/CodeBuilder/CSharp/CSharpLineMappingWriter.cs @@ -2,6 +2,7 @@ // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System; +using Microsoft.Framework.Internal; namespace Microsoft.AspNet.Razor.Generator.Compiler.CSharp { diff --git a/src/Microsoft.AspNet.Razor/Generator/Compiler/CodeBuilder/CSharp/CSharpTagHelperCodeRenderer.cs b/src/Microsoft.AspNet.Razor/Generator/Compiler/CodeBuilder/CSharp/CSharpTagHelperCodeRenderer.cs index c5cb01f307..e4afcaed3a 100644 --- a/src/Microsoft.AspNet.Razor/Generator/Compiler/CodeBuilder/CSharp/CSharpTagHelperCodeRenderer.cs +++ b/src/Microsoft.AspNet.Razor/Generator/Compiler/CodeBuilder/CSharp/CSharpTagHelperCodeRenderer.cs @@ -6,6 +6,7 @@ using System.Collections.Generic; using System.Globalization; using System.Linq; using Microsoft.AspNet.Razor.TagHelpers; +using Microsoft.Framework.Internal; namespace Microsoft.AspNet.Razor.Generator.Compiler.CSharp { diff --git a/src/Microsoft.AspNet.Razor/Generator/Compiler/CodeBuilder/CSharp/Visitors/CSharpDesignTimeHelpersVisitor.cs b/src/Microsoft.AspNet.Razor/Generator/Compiler/CodeBuilder/CSharp/Visitors/CSharpDesignTimeHelpersVisitor.cs index f9038ff277..3b23f6c7b8 100644 --- a/src/Microsoft.AspNet.Razor/Generator/Compiler/CodeBuilder/CSharp/Visitors/CSharpDesignTimeHelpersVisitor.cs +++ b/src/Microsoft.AspNet.Razor/Generator/Compiler/CodeBuilder/CSharp/Visitors/CSharpDesignTimeHelpersVisitor.cs @@ -3,6 +3,7 @@ using System.Diagnostics; using System.Globalization; +using Microsoft.Framework.Internal; namespace Microsoft.AspNet.Razor.Generator.Compiler.CSharp { diff --git a/src/Microsoft.AspNet.Razor/Generator/Compiler/CodeBuilder/CSharp/Visitors/CSharpTagHelperFieldDeclarationVisitor.cs b/src/Microsoft.AspNet.Razor/Generator/Compiler/CodeBuilder/CSharp/Visitors/CSharpTagHelperFieldDeclarationVisitor.cs index a42abed9d3..e03e7d05e9 100644 --- a/src/Microsoft.AspNet.Razor/Generator/Compiler/CodeBuilder/CSharp/Visitors/CSharpTagHelperFieldDeclarationVisitor.cs +++ b/src/Microsoft.AspNet.Razor/Generator/Compiler/CodeBuilder/CSharp/Visitors/CSharpTagHelperFieldDeclarationVisitor.cs @@ -3,6 +3,7 @@ using System; using System.Collections.Generic; +using Microsoft.Framework.Internal; namespace Microsoft.AspNet.Razor.Generator.Compiler.CSharp { diff --git a/src/Microsoft.AspNet.Razor/Generator/Compiler/CodeBuilder/CSharp/Visitors/CSharpTagHelperRunnerInitializationVisitor.cs b/src/Microsoft.AspNet.Razor/Generator/Compiler/CodeBuilder/CSharp/Visitors/CSharpTagHelperRunnerInitializationVisitor.cs index 1d4772567e..0902dd9c9d 100644 --- a/src/Microsoft.AspNet.Razor/Generator/Compiler/CodeBuilder/CSharp/Visitors/CSharpTagHelperRunnerInitializationVisitor.cs +++ b/src/Microsoft.AspNet.Razor/Generator/Compiler/CodeBuilder/CSharp/Visitors/CSharpTagHelperRunnerInitializationVisitor.cs @@ -1,6 +1,8 @@ // 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 Microsoft.Framework.Internal; + namespace Microsoft.AspNet.Razor.Generator.Compiler.CSharp { /// diff --git a/src/Microsoft.AspNet.Razor/Generator/Compiler/CodeBuilder/CSharp/Visitors/CSharpTypeMemberVisitor.cs b/src/Microsoft.AspNet.Razor/Generator/Compiler/CodeBuilder/CSharp/Visitors/CSharpTypeMemberVisitor.cs index 5d44479528..2df05af07c 100644 --- a/src/Microsoft.AspNet.Razor/Generator/Compiler/CodeBuilder/CSharp/Visitors/CSharpTypeMemberVisitor.cs +++ b/src/Microsoft.AspNet.Razor/Generator/Compiler/CodeBuilder/CSharp/Visitors/CSharpTypeMemberVisitor.cs @@ -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. -using System; +using Microsoft.Framework.Internal; namespace Microsoft.AspNet.Razor.Generator.Compiler.CSharp { diff --git a/src/Microsoft.AspNet.Razor/Generator/GeneratedClassContext.cs b/src/Microsoft.AspNet.Razor/Generator/GeneratedClassContext.cs index 0715b2463d..3cd1f05d40 100644 --- a/src/Microsoft.AspNet.Razor/Generator/GeneratedClassContext.cs +++ b/src/Microsoft.AspNet.Razor/Generator/GeneratedClassContext.cs @@ -3,6 +3,7 @@ using System; using System.Diagnostics.CodeAnalysis; +using Microsoft.Framework.Internal; namespace Microsoft.AspNet.Razor.Generator { diff --git a/src/Microsoft.AspNet.Razor/GeneratorResults.cs b/src/Microsoft.AspNet.Razor/GeneratorResults.cs index cac630b694..afba2f06ce 100644 --- a/src/Microsoft.AspNet.Razor/GeneratorResults.cs +++ b/src/Microsoft.AspNet.Razor/GeneratorResults.cs @@ -5,6 +5,7 @@ using System.Collections.Generic; using Microsoft.AspNet.Razor.Generator.Compiler; using Microsoft.AspNet.Razor.Parser.SyntaxTree; using Microsoft.AspNet.Razor.TagHelpers; +using Microsoft.Framework.Internal; namespace Microsoft.AspNet.Razor { diff --git a/src/Microsoft.AspNet.Razor/NotNullArgument.cs b/src/Microsoft.AspNet.Razor/NotNullArgument.cs deleted file mode 100644 index 43016aeb51..0000000000 --- a/src/Microsoft.AspNet.Razor/NotNullArgument.cs +++ /dev/null @@ -1,12 +0,0 @@ -// 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; - -namespace Microsoft.AspNet.Razor -{ - [AttributeUsage(AttributeTargets.Parameter, AllowMultiple = false)] - internal sealed class NotNullAttribute : Attribute - { - } -} \ No newline at end of file diff --git a/src/Microsoft.AspNet.Razor/Parser/ParserContext.cs b/src/Microsoft.AspNet.Razor/Parser/ParserContext.cs index 05328f5ec3..54f6d1a183 100644 --- a/src/Microsoft.AspNet.Razor/Parser/ParserContext.cs +++ b/src/Microsoft.AspNet.Razor/Parser/ParserContext.cs @@ -12,6 +12,7 @@ using Microsoft.AspNet.Razor.Parser.SyntaxTree; using Microsoft.AspNet.Razor.TagHelpers; using Microsoft.AspNet.Razor.Text; using Microsoft.AspNet.Razor.Utils; +using Microsoft.Framework.Internal; namespace Microsoft.AspNet.Razor.Parser { diff --git a/src/Microsoft.AspNet.Razor/Parser/RazorParser.cs b/src/Microsoft.AspNet.Razor/Parser/RazorParser.cs index dcebabff83..f3b2de042d 100644 --- a/src/Microsoft.AspNet.Razor/Parser/RazorParser.cs +++ b/src/Microsoft.AspNet.Razor/Parser/RazorParser.cs @@ -13,6 +13,7 @@ using Microsoft.AspNet.Razor.Parser.TagHelpers; using Microsoft.AspNet.Razor.Parser.TagHelpers.Internal; using Microsoft.AspNet.Razor.TagHelpers; using Microsoft.AspNet.Razor.Text; +using Microsoft.Framework.Internal; namespace Microsoft.AspNet.Razor.Parser { @@ -205,14 +206,14 @@ namespace Microsoft.AspNet.Razor.Parser /// specified . /// /// The to scan for tag helper registrations in. - /// Used to manage s encountered during the Razor parsing + /// Used to manage s encountered during the Razor parsing /// phase. /// s that are applicable to the /// protected virtual IEnumerable GetTagHelperDescriptors([NotNull] Block documentRoot, [NotNull] ErrorSink errorSink) { - var addOrRemoveTagHelperSpanVisitor = + var addOrRemoveTagHelperSpanVisitor = new TagHelperDirectiveSpanVisitor(TagHelperDescriptorResolver, errorSink); return addOrRemoveTagHelperSpanVisitor.GetDescriptors(documentRoot); } diff --git a/src/Microsoft.AspNet.Razor/Parser/TagHelpers/TagHelperDirectiveSpanVisitor.cs b/src/Microsoft.AspNet.Razor/Parser/TagHelpers/TagHelperDirectiveSpanVisitor.cs index f33ae6791a..2f7e8a8a39 100644 --- a/src/Microsoft.AspNet.Razor/Parser/TagHelpers/TagHelperDirectiveSpanVisitor.cs +++ b/src/Microsoft.AspNet.Razor/Parser/TagHelpers/TagHelperDirectiveSpanVisitor.cs @@ -5,6 +5,7 @@ using System.Collections.Generic; using Microsoft.AspNet.Razor.Generator; using Microsoft.AspNet.Razor.Parser.SyntaxTree; using Microsoft.AspNet.Razor.TagHelpers; +using Microsoft.Framework.Internal; namespace Microsoft.AspNet.Razor.Parser.TagHelpers { @@ -25,8 +26,9 @@ namespace Microsoft.AspNet.Razor.Parser.TagHelpers { } - public TagHelperDirectiveSpanVisitor([NotNull] ITagHelperDescriptorResolver descriptorResolver, - [NotNull] ErrorSink errorSink) + public TagHelperDirectiveSpanVisitor( + [NotNull] ITagHelperDescriptorResolver descriptorResolver, + [NotNull] ErrorSink errorSink) { _descriptorResolver = descriptorResolver; _errorSink = errorSink; @@ -61,14 +63,14 @@ namespace Microsoft.AspNet.Razor.Parser.TagHelpers { var codeGenerator = (AddOrRemoveTagHelperCodeGenerator)span.CodeGenerator; - var directive = + var directive = codeGenerator.RemoveTagHelperDescriptors ? TagHelperDirectiveType.RemoveTagHelper : TagHelperDirectiveType.AddTagHelper; var directiveDescriptor = new TagHelperDirectiveDescriptor( - codeGenerator.LookupText, - span.Start, + codeGenerator.LookupText, + span.Start, directive); _directiveDescriptors.Add(directiveDescriptor); diff --git a/src/Microsoft.AspNet.Razor/ParserResults.cs b/src/Microsoft.AspNet.Razor/ParserResults.cs index cf39d8a060..f5326c402e 100644 --- a/src/Microsoft.AspNet.Razor/ParserResults.cs +++ b/src/Microsoft.AspNet.Razor/ParserResults.cs @@ -5,6 +5,7 @@ using System.Collections.Generic; using System.Linq; using Microsoft.AspNet.Razor.Parser.SyntaxTree; using Microsoft.AspNet.Razor.TagHelpers; +using Microsoft.Framework.Internal; namespace Microsoft.AspNet.Razor { diff --git a/src/Microsoft.AspNet.Razor/RazorEngineHost.cs b/src/Microsoft.AspNet.Razor/RazorEngineHost.cs index f73336cecc..fc318d1209 100644 --- a/src/Microsoft.AspNet.Razor/RazorEngineHost.cs +++ b/src/Microsoft.AspNet.Razor/RazorEngineHost.cs @@ -8,6 +8,7 @@ using Microsoft.AspNet.Razor.Generator; using Microsoft.AspNet.Razor.Generator.Compiler; using Microsoft.AspNet.Razor.Parser; using Microsoft.AspNet.Razor.TagHelpers; +using Microsoft.Framework.Internal; namespace Microsoft.AspNet.Razor { diff --git a/src/Microsoft.AspNet.Razor/RazorTemplateEngine.cs b/src/Microsoft.AspNet.Razor/RazorTemplateEngine.cs index d181bd8f4d..28c910924e 100644 --- a/src/Microsoft.AspNet.Razor/RazorTemplateEngine.cs +++ b/src/Microsoft.AspNet.Razor/RazorTemplateEngine.cs @@ -12,6 +12,7 @@ using Microsoft.AspNet.Razor.Generator; using Microsoft.AspNet.Razor.Generator.Compiler; using Microsoft.AspNet.Razor.Parser; using Microsoft.AspNet.Razor.Text; +using Microsoft.Framework.Internal; namespace Microsoft.AspNet.Razor { diff --git a/src/Microsoft.AspNet.Razor/SourceLocation.cs b/src/Microsoft.AspNet.Razor/SourceLocation.cs index c8cf3ccb66..305091c69c 100644 --- a/src/Microsoft.AspNet.Razor/SourceLocation.cs +++ b/src/Microsoft.AspNet.Razor/SourceLocation.cs @@ -4,6 +4,7 @@ using System; using System.Globalization; using Microsoft.AspNet.Razor.Text; +using Microsoft.Framework.Internal; using Microsoft.Internal.Web.Utils; namespace Microsoft.AspNet.Razor diff --git a/src/Microsoft.AspNet.Razor/TagHelpers/TagHelperAttributeValueCodeRenderer.cs b/src/Microsoft.AspNet.Razor/TagHelpers/TagHelperAttributeValueCodeRenderer.cs index 332583ce3a..911a682fe6 100644 --- a/src/Microsoft.AspNet.Razor/TagHelpers/TagHelperAttributeValueCodeRenderer.cs +++ b/src/Microsoft.AspNet.Razor/TagHelpers/TagHelperAttributeValueCodeRenderer.cs @@ -4,6 +4,7 @@ using System; using Microsoft.AspNet.Razor.Generator; using Microsoft.AspNet.Razor.Generator.Compiler.CSharp; +using Microsoft.Framework.Internal; namespace Microsoft.AspNet.Razor.TagHelpers { diff --git a/src/Microsoft.AspNet.Razor/TagHelpers/TagHelperDescriptor.cs b/src/Microsoft.AspNet.Razor/TagHelpers/TagHelperDescriptor.cs index bd568eeef2..0f5b658dba 100644 --- a/src/Microsoft.AspNet.Razor/TagHelpers/TagHelperDescriptor.cs +++ b/src/Microsoft.AspNet.Razor/TagHelpers/TagHelperDescriptor.cs @@ -3,6 +3,7 @@ using System.Collections.Generic; using System.Linq; +using Microsoft.Framework.Internal; namespace Microsoft.AspNet.Razor.TagHelpers { diff --git a/src/Microsoft.AspNet.Razor/TagHelpers/TagHelperDescriptorResolutionContext.cs b/src/Microsoft.AspNet.Razor/TagHelpers/TagHelperDescriptorResolutionContext.cs index 275156d1a4..c767ddf807 100644 --- a/src/Microsoft.AspNet.Razor/TagHelpers/TagHelperDescriptorResolutionContext.cs +++ b/src/Microsoft.AspNet.Razor/TagHelpers/TagHelperDescriptorResolutionContext.cs @@ -2,6 +2,7 @@ // 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.Internal; namespace Microsoft.AspNet.Razor.TagHelpers { diff --git a/src/Microsoft.AspNet.Razor/TagHelpers/TagHelperDirectiveDescriptor.cs b/src/Microsoft.AspNet.Razor/TagHelpers/TagHelperDirectiveDescriptor.cs index e70d2d8d2e..cfb507bacf 100644 --- a/src/Microsoft.AspNet.Razor/TagHelpers/TagHelperDirectiveDescriptor.cs +++ b/src/Microsoft.AspNet.Razor/TagHelpers/TagHelperDirectiveDescriptor.cs @@ -1,6 +1,8 @@ // 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 Microsoft.Framework.Internal; + namespace Microsoft.AspNet.Razor.TagHelpers { /// diff --git a/src/Microsoft.AspNet.Razor/project.json b/src/Microsoft.AspNet.Razor/project.json index b342d435a1..0c66b413e8 100644 --- a/src/Microsoft.AspNet.Razor/project.json +++ b/src/Microsoft.AspNet.Razor/project.json @@ -1,6 +1,9 @@ { "description": "Razor is a markup syntax for adding server-side logic to web pages. This package contains the Razor parser and code generation infrastructure.", "version": "4.0.0-*", + "dependencies": { + "Microsoft.Framework.NotNullAttribute.Internal": { "type": "build", "version": "1.0.0-*" } + }, "frameworks": { "net45": { }, "dnx451": { }, diff --git a/test/Microsoft.AspNet.Razor.Runtime.Test/TagHelpers/CaseSensitiveTagHelperAttributeComparer.cs b/test/Microsoft.AspNet.Razor.Runtime.Test/TagHelpers/CaseSensitiveTagHelperAttributeComparer.cs index b28aebf668..8c0382a409 100644 --- a/test/Microsoft.AspNet.Razor.Runtime.Test/TagHelpers/CaseSensitiveTagHelperAttributeComparer.cs +++ b/test/Microsoft.AspNet.Razor.Runtime.Test/TagHelpers/CaseSensitiveTagHelperAttributeComparer.cs @@ -16,9 +16,7 @@ namespace Microsoft.AspNet.Razor.Runtime.TagHelpers { } - public bool Equals( - [NotNull] IReadOnlyTagHelperAttribute attributeX, - [NotNull] IReadOnlyTagHelperAttribute attributeY) + public bool Equals(IReadOnlyTagHelperAttribute attributeX, IReadOnlyTagHelperAttribute attributeY) { return attributeX == attributeY || @@ -27,7 +25,7 @@ namespace Microsoft.AspNet.Razor.Runtime.TagHelpers Equals(attributeX.Value, attributeY.Value); } - public int GetHashCode([NotNull] IReadOnlyTagHelperAttribute attribute) + public int GetHashCode(IReadOnlyTagHelperAttribute attribute) { return HashCodeCombiner .Start() diff --git a/test/Microsoft.AspNet.Razor.Test/Generator/TagHelperAttributeValueCodeRendererTest.cs b/test/Microsoft.AspNet.Razor.Test/Generator/TagHelperAttributeValueCodeRendererTest.cs index d6309bbae0..7c89d77037 100644 --- a/test/Microsoft.AspNet.Razor.Test/Generator/TagHelperAttributeValueCodeRendererTest.cs +++ b/test/Microsoft.AspNet.Razor.Test/Generator/TagHelperAttributeValueCodeRendererTest.cs @@ -70,8 +70,9 @@ namespace Microsoft.AspNet.Razor.Test.Generator { } - protected override CSharpCodeVisitor CreateCSharpCodeVisitor([NotNull] CSharpCodeWriter writer, - [NotNull] CodeBuilderContext context) + protected override CSharpCodeVisitor CreateCSharpCodeVisitor( + CSharpCodeWriter writer, + CodeBuilderContext context) { var bodyVisitor = base.CreateCSharpCodeVisitor(writer, context); @@ -83,11 +84,12 @@ namespace Microsoft.AspNet.Razor.Test.Generator private class CustomTagHelperAttributeCodeRenderer : TagHelperAttributeValueCodeRenderer { - public override void RenderAttributeValue([NotNull] TagHelperAttributeDescriptor attributeInfo, - [NotNull] CSharpCodeWriter writer, - [NotNull] CodeBuilderContext context, - [NotNull] Action renderAttributeValue, - bool complexValue) + public override void RenderAttributeValue( + TagHelperAttributeDescriptor attributeInfo, + CSharpCodeWriter writer, + CodeBuilderContext context, + Action renderAttributeValue, + bool complexValue) { writer.Write("**From custom attribute code renderer**: ");