From 0f724a51df6717e4d26c0237351e6b0ea0c32a8b Mon Sep 17 00:00:00 2001 From: Doug Bunting Date: Thu, 20 Nov 2014 14:16:32 -0800 Subject: [PATCH] Delete trailing whitespace - #EngineeringDay - Total replaced: 506 Matching files: 118 Did not change any files under test/Microsoft.AspNet.Razor.Test/TestFiles - avoiding need to redo hashes --- .../Resources.resx | 54 +++++++++---------- .../TagHelpers/TagHelperDescriptorFactory.cs | 6 +-- .../TagHelpers/TagHelperDescriptorResolver.cs | 4 +- .../TagHelpers/TagHelperRunner.cs | 4 +- .../TagHelpers/TagHelperTypeResolver.cs | 2 +- .../project.json | 2 +- .../CommonResources.resx | 54 +++++++++---------- .../Editor/ImplicitExpressionEditHandler.cs | 8 +-- .../Generator/CodeBuilderContext.cs | 4 +- .../CodeBuilder/CSharp/CSharpCodeWriter.cs | 6 +-- .../CSharp/CSharpPaddingBuilder.cs | 4 +- .../CSharp/CSharpTagHelperCodeRenderer.cs | 18 +++---- .../CSharpDesignTimeHelpersVisitor.cs | 2 +- .../Visitors/CSharpTypeMemberVisitor.cs | 4 +- .../Compiler/CodeBuilder/ChunkVisitor.cs | 2 +- .../Compiler/CodeBuilder/CodeWriter.cs | 4 +- .../Chunks/TagHelpers/RemoveTagHelperChunk.cs | 2 +- .../Generator/ExpressionRenderingMode.cs | 4 +- .../Generator/GeneratedClassContext.cs | 12 ++--- .../Generator/RazorCodeGenerator.cs | 8 +-- .../Generator/TagHelperCodeGenerator.cs | 4 +- .../AddOrRemoveTagHelperCodeGenerator.cs | 6 +-- .../GeneratorResults.cs | 4 +- .../GlobalSuppressions.cs | 16 +++--- .../Parser/CSharpCodeParser.Directives.cs | 10 ++-- .../Parser/CSharpCodeParser.Expressions.cs | 2 +- .../Parser/CSharpCodeParser.cs | 2 +- .../Parser/HtmlMarkupParser.Block.cs | 28 +++++----- .../Parser/ParserBase.cs | 2 +- .../Parser/ParserErrorSink.cs | 4 +- .../Parser/RazorParser.cs | 4 +- .../Parser/TagHelpers/TagHelperBlock.cs | 4 +- .../TagHelpers/TagHelperBlockBuilder.cs | 6 +-- .../TagHelpers/TagHelperParseTreeRewriter.cs | 8 +-- .../PartialParseResult.cs | 2 +- .../Properties/RazorResources.Designer.cs | 24 ++++----- .../RazorDirectiveAttribute.cs | 2 +- .../RazorEditorParser.cs | 14 ++--- .../RazorResources.resx | 54 +++++++++---------- .../RazorTemplateEngine.cs | 16 +++--- .../ITagHelperDescriptorResolver.cs | 4 +- .../TagHelperAttributeDescriptor.cs | 6 +-- .../TagHelperAttributeValueCodeRenderer.cs | 4 +- .../TagHelpers/TagHelperDescriptor.cs | 10 ++-- .../TagHelpers/TagHelperDescriptorComparer.cs | 10 ++-- .../TagHelpers/TagHelperDescriptorProvider.cs | 6 +-- .../TagHelperDescriptorResolutionContext.cs | 2 +- .../Tokenizer/CSharpTokenizer.cs | 2 +- .../Tokenizer/XmlHelpers.cs | 4 +- .../CompleteTagHelperDescriptorComparer.cs | 2 +- .../TagHelperDescriptorFactoryTest.cs | 24 ++++----- .../TagHelperDescriptorResolverTest.cs | 16 +++--- .../TagHelpers/TagHelperOutputTest.cs | 4 +- .../CSharpRazorCodeLanguageTest.cs | 2 +- .../Editor/RazorEditorParserTest.cs | 2 +- .../Framework/BlockTypes.cs | 2 +- .../Framework/ParserTestBase.cs | 28 +++++----- .../Generator/CSharpRazorCodeGeneratorTest.cs | 46 ++++++++-------- .../CodeTree/CSharpCodeBuilderTests.cs | 2 +- .../CodeTree/CSharpPaddingBuilderTests.cs | 2 +- .../Generator/CodeTree/CodeTreeBuilderTest.cs | 12 ++--- .../Generator/Compiler/CodeWriterTest.cs | 6 +-- .../Generator/TagHelperTestBase.cs | 2 +- .../Parser/CSharp/CSharpBlockTest.cs | 42 +++++++-------- .../Parser/CSharp/CSharpSectionTest.cs | 2 +- .../Parser/Html/HtmlBlockTest.cs | 2 +- .../Parser/Html/HtmlUrlAttributeTest.cs | 2 +- .../PartialParsing/PartialParsingTestBase.cs | 12 ++--- .../TagHelperParseTreeRewriterTest.cs | 6 +-- .../Text/TextChangeTest.cs | 14 ++--- 70 files changed, 347 insertions(+), 347 deletions(-) diff --git a/src/Microsoft.AspNet.Razor.Runtime/Resources.resx b/src/Microsoft.AspNet.Razor.Runtime/Resources.resx index b582ec612e..46d21d10d4 100644 --- a/src/Microsoft.AspNet.Razor.Runtime/Resources.resx +++ b/src/Microsoft.AspNet.Razor.Runtime/Resources.resx @@ -1,17 +1,17 @@ - diff --git a/src/Microsoft.AspNet.Razor.Runtime/TagHelpers/TagHelperDescriptorFactory.cs b/src/Microsoft.AspNet.Razor.Runtime/TagHelpers/TagHelperDescriptorFactory.cs index d424866f03..51e3954325 100644 --- a/src/Microsoft.AspNet.Razor.Runtime/TagHelpers/TagHelperDescriptorFactory.cs +++ b/src/Microsoft.AspNet.Razor.Runtime/TagHelpers/TagHelperDescriptorFactory.cs @@ -73,8 +73,8 @@ namespace Microsoft.AspNet.Razor.Runtime.TagHelpers private static TagHelperAttributeDescriptor ToAttributeDescriptor(PropertyInfo property) { var attributeNameAttribute = property.GetCustomAttribute(inherit: false); - var attributeName = attributeNameAttribute != null ? - attributeNameAttribute.Name : + var attributeName = attributeNameAttribute != null ? + attributeNameAttribute.Name : property.Name; return new TagHelperAttributeDescriptor(attributeName, property.Name, property.PropertyType.FullName); @@ -85,7 +85,7 @@ namespace Microsoft.AspNet.Razor.Runtime.TagHelpers var typeInfo = type.GetTypeInfo(); var contentBehaviorAttribute = typeInfo.GetCustomAttribute(inherit: false); - return contentBehaviorAttribute != null ? + return contentBehaviorAttribute != null ? contentBehaviorAttribute.ContentBehavior : ContentBehavior.None; } diff --git a/src/Microsoft.AspNet.Razor.Runtime/TagHelpers/TagHelperDescriptorResolver.cs b/src/Microsoft.AspNet.Razor.Runtime/TagHelpers/TagHelperDescriptorResolver.cs index ec1ade272a..0793ea7b92 100644 --- a/src/Microsoft.AspNet.Razor.Runtime/TagHelpers/TagHelperDescriptorResolver.cs +++ b/src/Microsoft.AspNet.Razor.Runtime/TagHelpers/TagHelperDescriptorResolver.cs @@ -57,7 +57,7 @@ namespace Microsoft.AspNet.Razor.Runtime.TagHelpers } /// - /// Resolves all s for s from the given + /// Resolves all s for s from the given /// . /// /// @@ -105,7 +105,7 @@ namespace Microsoft.AspNet.Razor.Runtime.TagHelpers nameof(lookupText)); } - // Grab the assembly name from the lookup text strings. Due to our supported lookupText formats it will + // Grab the assembly name from the lookup text strings. Due to our supported lookupText formats it will // always be the last element provided. var assemblyName = lookupStrings.Last().Trim(); string typeName = null; diff --git a/src/Microsoft.AspNet.Razor.Runtime/TagHelpers/TagHelperRunner.cs b/src/Microsoft.AspNet.Razor.Runtime/TagHelpers/TagHelperRunner.cs index fd8ba3c408..5d8fad474e 100644 --- a/src/Microsoft.AspNet.Razor.Runtime/TagHelpers/TagHelperRunner.cs +++ b/src/Microsoft.AspNet.Razor.Runtime/TagHelpers/TagHelperRunner.cs @@ -15,7 +15,7 @@ namespace Microsoft.AspNet.Razor.Runtime.TagHelpers /// Calls the method on s. /// /// Contains information associated with running s. - /// Resulting from processing all of the + /// Resulting from processing all of the /// 's s. public async Task RunAsync([NotNull] TagHelperExecutionContext context) { @@ -27,7 +27,7 @@ namespace Microsoft.AspNet.Razor.Runtime.TagHelpers /// /// Contains information associated with running s. /// Contains the buffered content of the current HTML tag. - /// Resulting from processing all of the + /// Resulting from processing all of the /// 's s. public async Task RunAsync([NotNull] TagHelperExecutionContext context, [NotNull] TextWriter bufferedBody) diff --git a/src/Microsoft.AspNet.Razor.Runtime/TagHelpers/TagHelperTypeResolver.cs b/src/Microsoft.AspNet.Razor.Runtime/TagHelpers/TagHelperTypeResolver.cs index a33313b87a..3a6897a01c 100644 --- a/src/Microsoft.AspNet.Razor.Runtime/TagHelpers/TagHelperTypeResolver.cs +++ b/src/Microsoft.AspNet.Razor.Runtime/TagHelpers/TagHelperTypeResolver.cs @@ -27,7 +27,7 @@ namespace Microsoft.AspNet.Razor.Runtime.TagHelpers /// all valid s. /// /// The name of an to search. - /// An of valid s. + /// An of valid s. public IEnumerable Resolve(string name) { if (string.IsNullOrEmpty(name)) diff --git a/src/Microsoft.AspNet.Razor.Runtime/project.json b/src/Microsoft.AspNet.Razor.Runtime/project.json index 062a809f38..f23e454816 100644 --- a/src/Microsoft.AspNet.Razor.Runtime/project.json +++ b/src/Microsoft.AspNet.Razor.Runtime/project.json @@ -7,7 +7,7 @@ "frameworks": { "net45": { }, "aspnet50": { }, - "aspnetcore50": { + "aspnetcore50": { "dependencies": { "System.Reflection.Extensions": "4.0.0-beta-*" } diff --git a/src/Microsoft.AspNet.Razor/CommonResources.resx b/src/Microsoft.AspNet.Razor/CommonResources.resx index 2490419364..7cc5d5ecd7 100644 --- a/src/Microsoft.AspNet.Razor/CommonResources.resx +++ b/src/Microsoft.AspNet.Razor/CommonResources.resx @@ -1,17 +1,17 @@  - diff --git a/src/Microsoft.AspNet.Razor/Editor/ImplicitExpressionEditHandler.cs b/src/Microsoft.AspNet.Razor/Editor/ImplicitExpressionEditHandler.cs index 91ccb2193e..642797b12b 100644 --- a/src/Microsoft.AspNet.Razor/Editor/ImplicitExpressionEditHandler.cs +++ b/src/Microsoft.AspNet.Razor/Editor/ImplicitExpressionEditHandler.cs @@ -58,9 +58,9 @@ namespace Microsoft.AspNet.Razor.Editor return PartialParseResult.Rejected; } - // In some editors intellisense insertions are handled as "dotless commits". If an intellisense selection is confirmed - // via something like '.' a dotless commit will append a '.' and then insert the remaining intellisense selection prior - // to the appended '.'. This 'if' statement attempts to accept the intermediate steps of a dotless commit via + // In some editors intellisense insertions are handled as "dotless commits". If an intellisense selection is confirmed + // via something like '.' a dotless commit will append a '.' and then insert the remaining intellisense selection prior + // to the appended '.'. This 'if' statement attempts to accept the intermediate steps of a dotless commit via // intellisense. It will accept two cases: // 1. '@foo.' -> '@foobaz.'. // 2. '@foobaz..' -> '@foobaz.bar.'. Includes Sub-cases '@foobaz()..' -> '@foobaz().bar.' etc. @@ -128,7 +128,7 @@ namespace Microsoft.AspNet.Razor.Editor } // Once a dotless commit has been performed you then have something like '@DateTime.'. This scenario is used to detect the - // situation when you try to perform another dotless commit resulting in a textchange with '..'. Completing 'DateTime.Now' + // situation when you try to perform another dotless commit resulting in a textchange with '..'. Completing 'DateTime.Now' // in intellisense with a '.' could result in: '@DateTime.' -> '@DateTime..' -> '@DateTime.Now.' which is accepted. private static bool IsSecondaryDotlessCommitInsertion(Span target, TextChange change) { diff --git a/src/Microsoft.AspNet.Razor/Generator/CodeBuilderContext.cs b/src/Microsoft.AspNet.Razor/Generator/CodeBuilderContext.cs index 9a5337b909..d8c81561c7 100644 --- a/src/Microsoft.AspNet.Razor/Generator/CodeBuilderContext.cs +++ b/src/Microsoft.AspNet.Razor/Generator/CodeBuilderContext.cs @@ -33,7 +33,7 @@ namespace Microsoft.AspNet.Razor.Generator /// The current C# rendering mode. /// /// - /// forces C# generation to write + /// forces C# generation to write /// s to the output page, i.e. WriteLiteral("Hello World"). /// writes values in their /// rawest form, i.g. "Hello World". @@ -46,7 +46,7 @@ namespace Microsoft.AspNet.Razor.Generator /// /// If is null values will be written using a default write method /// i.e. WriteLiteral("Hello World"). - /// If is not null values will be written to the given + /// If is not null values will be written to the given /// , i.e. WriteLiteralTo(myWriter, "Hello World"). /// public string TargetWriterName { get; set; } 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 c6ed4110eb..f0d45ee175 100644 --- a/src/Microsoft.AspNet.Razor/Generator/Compiler/CodeBuilder/CSharp/CSharpCodeWriter.cs +++ b/src/Microsoft.AspNet.Razor/Generator/Compiler/CodeBuilder/CSharp/CSharpCodeWriter.cs @@ -443,9 +443,9 @@ namespace Microsoft.AspNet.Razor.Generator.Compiler.CSharp } if (i > 0 && i % 80 == 0) { - // If current character is a high surrogate and the following - // character is a low surrogate, don't break them. - // Otherwise when we write the string to a file, we might lose + // If current character is a high surrogate and the following + // character is a low surrogate, don't break them. + // Otherwise when we write the string to a file, we might lose // the characters. if (Char.IsHighSurrogate(literal[i]) && (i < literal.Length - 1) diff --git a/src/Microsoft.AspNet.Razor/Generator/Compiler/CodeBuilder/CSharp/CSharpPaddingBuilder.cs b/src/Microsoft.AspNet.Razor/Generator/Compiler/CodeBuilder/CSharp/CSharpPaddingBuilder.cs index db185651db..f1affbd444 100644 --- a/src/Microsoft.AspNet.Razor/Generator/Compiler/CodeBuilder/CSharp/CSharpPaddingBuilder.cs +++ b/src/Microsoft.AspNet.Razor/Generator/Compiler/CodeBuilder/CSharp/CSharpPaddingBuilder.cs @@ -77,7 +77,7 @@ namespace Microsoft.AspNet.Razor.Generator.Compiler.CSharp // In design time: __o = somecode(); // In Run time: Write(somecode()); // - // In both cases the padding would have been 1 space to remote the space the @ symbol takes, which will be smaller than the 6 + // In both cases the padding would have been 1 space to remote the space the @ symbol takes, which will be smaller than the 6 // chars the hidden generated code takes. if (padding < 0) { @@ -110,7 +110,7 @@ namespace Microsoft.AspNet.Razor.Generator.Compiler.CSharp while (firstSpanInLine.Previous != null) { - // When scanning previous spans we need to be break down the spans with spaces. The parser combines + // When scanning previous spans we need to be break down the spans with spaces. The parser combines // whitespace into existing spans so you'll see tabs, newlines etc. within spans. We only care about // the \t in existing spans. var previousContent = firstSpanInLine.Previous.Content ?? String.Empty; 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 5b2d56a0b8..543f257023 100644 --- a/src/Microsoft.AspNet.Razor/Generator/Compiler/CodeBuilder/CSharp/CSharpTagHelperCodeRenderer.cs +++ b/src/Microsoft.AspNet.Razor/Generator/Compiler/CodeBuilder/CSharp/CSharpTagHelperCodeRenderer.cs @@ -33,7 +33,7 @@ namespace Microsoft.AspNet.Razor.Generator.Compiler.CSharp /// /// The used to render chunks found in the body. /// The used to write code. - /// A instance that contains information about + /// A instance that contains information about /// the current code generation process. public CSharpTagHelperCodeRenderer([NotNull] IChunkVisitor bodyVisitor, [NotNull] CSharpCodeWriter writer, @@ -194,13 +194,13 @@ namespace Microsoft.AspNet.Razor.Generator.Compiler.CSharp // Bufferable attributes are attributes that can have Razor code inside of them. var bufferableAttribute = IsStringAttribute(attributeDescriptor); - // Plain text values are non Razor code (@DateTime.Now) values. If an attribute is bufferable it - // may be more than just a plain text value, it may also contain Razor code which is why we attempt + // Plain text values are non Razor code (@DateTime.Now) values. If an attribute is bufferable it + // may be more than just a plain text value, it may also contain Razor code which is why we attempt // to retrieve a plain text value here. string textValue; var isPlainTextValue = TryGetPlainTextValue(attributeValueChunk, out textValue); - // If we haven't recorded a value and we need to buffer an attribute value and the value is not + // If we haven't recorded a value and we need to buffer an attribute value and the value is not // plain text then we need to prepare the value prior to setting it below. if (!attributeValueRecorded && bufferableAttribute && !isPlainTextValue) { @@ -239,7 +239,7 @@ namespace Microsoft.AspNet.Razor.Generator.Compiler.CSharp } else { - // TODO: Make complex types in non-bufferable attributes work in + // TODO: Make complex types in non-bufferable attributes work in // https://github.com/aspnet/Razor/issues/129 if (!isPlainTextValue) { @@ -291,7 +291,7 @@ namespace Microsoft.AspNet.Razor.Generator.Compiler.CSharp var attributeValue = htmlAttribute.Value; var isPlainTextValue = TryGetPlainTextValue(attributeValue, out textValue); - // HTML attributes are always strings. So if this value is not plain text i.e. if the value contains + // HTML attributes are always strings. So if this value is not plain text i.e. if the value contains // C# code, then we need to buffer it. if (!isPlainTextValue) { @@ -305,7 +305,7 @@ namespace Microsoft.AspNet.Razor.Generator.Compiler.CSharp } _writer.WriteStartInstanceMethodInvocation( - ExecutionContextVariableName, + ExecutionContextVariableName, _tagHelperContext.ExecutionContextAddHtmlAttributeMethodName); _writer.WriteStringLiteral(htmlAttribute.Key) .WriteParameterSeparator(); @@ -435,7 +435,7 @@ namespace Microsoft.AspNet.Razor.Generator.Compiler.CSharp private void BuildBufferedWritingScope(IList chunks) { // We're building a writing scope around the provided chunks which captures everything written from the - // page. Therefore, we do not want to write to any other buffer since we're using the pages buffer to + // page. Therefore, we do not want to write to any other buffer since we're using the pages buffer to // ensure we capture all content that's written, directly or indirectly. var oldWriter = _context.TargetWriterName; _context.TargetWriterName = null; @@ -483,7 +483,7 @@ namespace Microsoft.AspNet.Razor.Generator.Compiler.CSharp { if (_designTimeMode) { - // There is no value buffer in design time mode but we still want to write out a value. We write a + // There is no value buffer in design time mode but we still want to write out a value. We write a // value to ensure the tag helper's property type is string. writer.Write("string.Empty"); } 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 1b01f815f2..7081785246 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 @@ -81,7 +81,7 @@ namespace Microsoft.AspNet.Razor.Generator.Compiler.CSharp Writer.WriteStartAssignment(TagHelperDirectiveSyntaxHelper); - // The parsing mechanism for the add/remove TagHelper chunk (CSharpCodeParser.TagHelperDirective()) + // The parsing mechanism for the add/remove TagHelper chunk (CSharpCodeParser.TagHelperDirective()) // removes quotes that surround the lookupText. _csharpCodeVisitor.CreateExpressionCodeMapping( string.Format( 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 dc26beaced..32ceca9cba 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 @@ -9,8 +9,8 @@ namespace Microsoft.AspNet.Razor.Generator.Compiler.CSharp { private CSharpCodeVisitor _csharpCodeVisitor; - public CSharpTypeMemberVisitor([NotNull] CSharpCodeVisitor csharpCodeVisitor, - [NotNull] CSharpCodeWriter writer, + public CSharpTypeMemberVisitor([NotNull] CSharpCodeVisitor csharpCodeVisitor, + [NotNull] CSharpCodeWriter writer, [NotNull] CodeBuilderContext context) : base(writer, context) { diff --git a/src/Microsoft.AspNet.Razor/Generator/Compiler/CodeBuilder/ChunkVisitor.cs b/src/Microsoft.AspNet.Razor/Generator/Compiler/CodeBuilder/ChunkVisitor.cs index 0ebd5279c6..fe8eb06fcd 100644 --- a/src/Microsoft.AspNet.Razor/Generator/Compiler/CodeBuilder/ChunkVisitor.cs +++ b/src/Microsoft.AspNet.Razor/Generator/Compiler/CodeBuilder/ChunkVisitor.cs @@ -76,7 +76,7 @@ namespace Microsoft.AspNet.Razor.Generator.Compiler else if (chunk is TypeMemberChunk) { Visit((TypeMemberChunk)chunk); - } + } else if (chunk is UsingChunk) { Visit((UsingChunk)chunk); diff --git a/src/Microsoft.AspNet.Razor/Generator/Compiler/CodeBuilder/CodeWriter.cs b/src/Microsoft.AspNet.Razor/Generator/Compiler/CodeBuilder/CodeWriter.cs index 66b49a52be..a090cd289e 100644 --- a/src/Microsoft.AspNet.Razor/Generator/Compiler/CodeBuilder/CodeWriter.cs +++ b/src/Microsoft.AspNet.Razor/Generator/Compiler/CodeBuilder/CodeWriter.cs @@ -98,7 +98,7 @@ namespace Microsoft.AspNet.Razor.Generator.Compiler // Check the first character of the current write operation. builder[builder.Length - data.Length] == '\n') { - // This is newline that's spread across two writes. Skip the first character of the + // This is newline that's spread across two writes. Skip the first character of the // current write operation. // // We don't need to increment our newline counter because we already did that when we @@ -107,7 +107,7 @@ namespace Microsoft.AspNet.Razor.Generator.Compiler trailingPartStart = 1; } - // Iterate the string, stopping at each occurrence of a newline character. This lets us count the + // Iterate the string, stopping at each occurrence of a newline character. This lets us count the // newline occurrences and keep the index of the last one. while ((i = data.IndexOfAny(NewLineCharacters, i)) >= 0) { diff --git a/src/Microsoft.AspNet.Razor/Generator/Compiler/CodeTree/Chunks/TagHelpers/RemoveTagHelperChunk.cs b/src/Microsoft.AspNet.Razor/Generator/Compiler/CodeTree/Chunks/TagHelpers/RemoveTagHelperChunk.cs index c17107dcd1..4484bda902 100644 --- a/src/Microsoft.AspNet.Razor/Generator/Compiler/CodeTree/Chunks/TagHelpers/RemoveTagHelperChunk.cs +++ b/src/Microsoft.AspNet.Razor/Generator/Compiler/CodeTree/Chunks/TagHelpers/RemoveTagHelperChunk.cs @@ -4,7 +4,7 @@ namespace Microsoft.AspNet.Razor.Generator.Compiler { /// - /// A used to look up s that should be ignored + /// A used to look up s that should be ignored /// within the Razor page. /// public class RemoveTagHelperChunk : Chunk diff --git a/src/Microsoft.AspNet.Razor/Generator/ExpressionRenderingMode.cs b/src/Microsoft.AspNet.Razor/Generator/ExpressionRenderingMode.cs index 695326db08..6d2b07cea5 100644 --- a/src/Microsoft.AspNet.Razor/Generator/ExpressionRenderingMode.cs +++ b/src/Microsoft.AspNet.Razor/Generator/ExpressionRenderingMode.cs @@ -10,7 +10,7 @@ namespace Microsoft.AspNet.Razor.Generator /// /// /// If @foo is rendered with WriteToOutput, the code generator would output the following code: - /// + /// /// Write(foo); /// WriteToOutput, @@ -21,7 +21,7 @@ namespace Microsoft.AspNet.Razor.Generator /// /// /// If @foo is rendered with InjectCode, the code generator would output the following code: - /// + /// /// foo /// InjectCode diff --git a/src/Microsoft.AspNet.Razor/Generator/GeneratedClassContext.cs b/src/Microsoft.AspNet.Razor/Generator/GeneratedClassContext.cs index 12dd5f060f..02e23f07fb 100644 --- a/src/Microsoft.AspNet.Razor/Generator/GeneratedClassContext.cs +++ b/src/Microsoft.AspNet.Razor/Generator/GeneratedClassContext.cs @@ -15,7 +15,7 @@ namespace Microsoft.AspNet.Razor.Generator public static readonly string DefaultWriteAttributeMethodName = "WriteAttribute"; public static readonly string DefaultWriteAttributeToMethodName = "WriteAttributeTo"; - public static readonly GeneratedClassContext Default = + public static readonly GeneratedClassContext Default = new GeneratedClassContext(DefaultExecuteMethodName, DefaultWriteMethodName, DefaultWriteLiteralMethodName, @@ -30,19 +30,19 @@ namespace Microsoft.AspNet.Razor.Generator if (string.IsNullOrEmpty(executeMethodName)) { throw new ArgumentException( - CommonResources.Argument_Cannot_Be_Null_Or_Empty, + CommonResources.Argument_Cannot_Be_Null_Or_Empty, nameof(executeMethodName)); } if (string.IsNullOrEmpty(writeMethodName)) { throw new ArgumentException( - CommonResources.Argument_Cannot_Be_Null_Or_Empty, + CommonResources.Argument_Cannot_Be_Null_Or_Empty, nameof(writeMethodName)); } if (string.IsNullOrEmpty(writeLiteralMethodName)) { throw new ArgumentException( - CommonResources.Argument_Cannot_Be_Null_Or_Empty, + CommonResources.Argument_Cannot_Be_Null_Or_Empty, nameof(writeLiteralMethodName)); } @@ -69,8 +69,8 @@ namespace Microsoft.AspNet.Razor.Generator string writeLiteralToMethodName, string templateTypeName, GeneratedTagHelperContext generatedTagHelperContext) - : this(executeMethodName, - writeMethodName, + : this(executeMethodName, + writeMethodName, writeLiteralMethodName, generatedTagHelperContext) { diff --git a/src/Microsoft.AspNet.Razor/Generator/RazorCodeGenerator.cs b/src/Microsoft.AspNet.Razor/Generator/RazorCodeGenerator.cs index 5ca1920467..b5bb7d0955 100644 --- a/src/Microsoft.AspNet.Razor/Generator/RazorCodeGenerator.cs +++ b/src/Microsoft.AspNet.Razor/Generator/RazorCodeGenerator.cs @@ -71,10 +71,10 @@ namespace Microsoft.AspNet.Razor.Generator { if (_context == null) { - _context = new CodeGeneratorContext(Host, - ClassName, - RootNamespaceName, - SourceFileName, + _context = new CodeGeneratorContext(Host, + ClassName, + RootNamespaceName, + SourceFileName, GenerateLinePragmas); Initialize(_context); } diff --git a/src/Microsoft.AspNet.Razor/Generator/TagHelperCodeGenerator.cs b/src/Microsoft.AspNet.Razor/Generator/TagHelperCodeGenerator.cs index c291972ea6..570af0fa60 100644 --- a/src/Microsoft.AspNet.Razor/Generator/TagHelperCodeGenerator.cs +++ b/src/Microsoft.AspNet.Razor/Generator/TagHelperCodeGenerator.cs @@ -34,7 +34,7 @@ namespace Microsoft.AspNet.Razor.Generator /// /// The responsible for this . /// - /// A instance that contains information about + /// A instance that contains information about /// the current code generation process. public override void GenerateStartBlockCode(Block target, CodeGeneratorContext context) { @@ -88,7 +88,7 @@ namespace Microsoft.AspNet.Razor.Generator /// /// The responsible for this . /// - /// A instance that contains information about + /// A instance that contains information about /// the current code generation process. public override void GenerateEndBlockCode(Block target, CodeGeneratorContext context) { diff --git a/src/Microsoft.AspNet.Razor/Generator/TagHelpers/AddOrRemoveTagHelperCodeGenerator.cs b/src/Microsoft.AspNet.Razor/Generator/TagHelpers/AddOrRemoveTagHelperCodeGenerator.cs index 4e37e1a8a1..69246d89ab 100644 --- a/src/Microsoft.AspNet.Razor/Generator/TagHelpers/AddOrRemoveTagHelperCodeGenerator.cs +++ b/src/Microsoft.AspNet.Razor/Generator/TagHelpers/AddOrRemoveTagHelperCodeGenerator.cs @@ -24,7 +24,7 @@ namespace Microsoft.AspNet.Razor.Generator } /// - /// Gets the text used to look up s that should be added to or + /// Gets the text used to look up s that should be added to or /// removed from the Razor page. /// public string LookupText { get; } @@ -37,13 +37,13 @@ namespace Microsoft.AspNet.Razor.Generator public bool RemoveTagHelperDescriptors { get; } /// - /// Generates s if is + /// Generates s if is /// true, otherwise s are generated. /// /// /// The responsible for this . /// - /// A instance that contains information about + /// A instance that contains information about /// the current code generation process. public override void GenerateCode(Span target, CodeGeneratorContext context) { diff --git a/src/Microsoft.AspNet.Razor/GeneratorResults.cs b/src/Microsoft.AspNet.Razor/GeneratorResults.cs index 3f90c71218..2ea36e30bf 100644 --- a/src/Microsoft.AspNet.Razor/GeneratorResults.cs +++ b/src/Microsoft.AspNet.Razor/GeneratorResults.cs @@ -10,8 +10,8 @@ namespace Microsoft.AspNet.Razor public class GeneratorResults : ParserResults { public GeneratorResults(ParserResults parserResults, CodeBuilderResult codeBuilderResult, CodeTree codeTree) - : this(parserResults.Document, - parserResults.ParserErrors, + : this(parserResults.Document, + parserResults.ParserErrors, codeBuilderResult, codeTree) { diff --git a/src/Microsoft.AspNet.Razor/GlobalSuppressions.cs b/src/Microsoft.AspNet.Razor/GlobalSuppressions.cs index 2e39faf9f4..6f1149c439 100644 --- a/src/Microsoft.AspNet.Razor/GlobalSuppressions.cs +++ b/src/Microsoft.AspNet.Razor/GlobalSuppressions.cs @@ -1,15 +1,15 @@ // 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. -// This file is used by Code Analysis to maintain SuppressMessage -// attributes that are applied to this project. -// Project-level suppressions either have no target or are given -// a specific target and scoped to a namespace, type, member, etc. +// This file is used by Code Analysis to maintain SuppressMessage +// attributes that are applied to this project. +// Project-level suppressions either have no target or are given +// a specific target and scoped to a namespace, type, member, etc. // -// To add a suppression to this file, right-click the message in the -// Error List, point to "Suppress Message(s)", and click -// "In Project Suppression File". -// You do not need to add suppressions to this file manually. +// To add a suppression to this file, right-click the message in the +// Error List, point to "Suppress Message(s)", and click +// "In Project Suppression File". +// You do not need to add suppressions to this file manually. using System.Diagnostics.CodeAnalysis; diff --git a/src/Microsoft.AspNet.Razor/Parser/CSharpCodeParser.Directives.cs b/src/Microsoft.AspNet.Razor/Parser/CSharpCodeParser.Directives.cs index e5ea9684f1..083ce79943 100644 --- a/src/Microsoft.AspNet.Razor/Parser/CSharpCodeParser.Directives.cs +++ b/src/Microsoft.AspNet.Razor/Parser/CSharpCodeParser.Directives.cs @@ -241,7 +241,7 @@ namespace Microsoft.AspNet.Razor.Parser var blockGen = new HelperCodeGenerator(signature, headerComplete); Context.CurrentBlock.CodeGenerator = blockGen; - // The block will generate appropriate code, + // The block will generate appropriate code, Span.CodeGenerator = SpanCodeGenerator.Null; if (!headerComplete) @@ -551,9 +551,9 @@ namespace Microsoft.AspNet.Razor.Parser // Set up code generation // The generated chunk of this code generator is picked up by CSharpDesignTimeHelpersVisitor which // renders the C# to colorize the user provided value. We trim the quotes around the user's value - // so when we render the code we can project the users value into double quotes to not invoke C# - // IntelliSense. - Span.CodeGenerator = + // so when we render the code we can project the users value into double quotes to not invoke C# + // IntelliSense. + Span.CodeGenerator = new AddOrRemoveTagHelperCodeGenerator(removeTagHelperDescriptors, rawValue.Trim('"')); } @@ -562,7 +562,7 @@ namespace Microsoft.AspNet.Razor.Parser if (!startsWithQuote || !rawValue.EndsWith("\"", StringComparison.OrdinalIgnoreCase)) { - Context.OnError(startLocation, + Context.OnError(startLocation, RazorResources.FormatParseError_DirectiveMustBeSurroundedByQuotes(keyword)); } } diff --git a/src/Microsoft.AspNet.Razor/Parser/CSharpCodeParser.Expressions.cs b/src/Microsoft.AspNet.Razor/Parser/CSharpCodeParser.Expressions.cs index b677dd15ad..84456748c3 100644 --- a/src/Microsoft.AspNet.Razor/Parser/CSharpCodeParser.Expressions.cs +++ b/src/Microsoft.AspNet.Razor/Parser/CSharpCodeParser.Expressions.cs @@ -19,7 +19,7 @@ namespace Microsoft.AspNet.Razor.Parser // Accept the "await" and move on AcceptAndMoveNext(); - + // Accept 1 or more spaces between the await and the following code. AcceptWhile(IsSpacingToken(includeNewLines: false, includeComments: true)); diff --git a/src/Microsoft.AspNet.Razor/Parser/CSharpCodeParser.cs b/src/Microsoft.AspNet.Razor/Parser/CSharpCodeParser.cs index 51ca91bb3c..ac1ba1b59a 100644 --- a/src/Microsoft.AspNet.Razor/Parser/CSharpCodeParser.cs +++ b/src/Microsoft.AspNet.Razor/Parser/CSharpCodeParser.cs @@ -322,7 +322,7 @@ namespace Microsoft.AspNet.Razor.Parser ImplicitExpression(AcceptedCharacters.NonWhiteSpace); } - // Async implicit expressions include the "await" keyword and therefore need to allow spaces to + // Async implicit expressions include the "await" keyword and therefore need to allow spaces to // separate the "await" and the following code. private void AsyncImplicitExpression() { diff --git a/src/Microsoft.AspNet.Razor/Parser/HtmlMarkupParser.Block.cs b/src/Microsoft.AspNet.Razor/Parser/HtmlMarkupParser.Block.cs index cd95ce4e1e..dfb409fb38 100644 --- a/src/Microsoft.AspNet.Razor/Parser/HtmlMarkupParser.Block.cs +++ b/src/Microsoft.AspNet.Razor/Parser/HtmlMarkupParser.Block.cs @@ -185,8 +185,8 @@ namespace Microsoft.AspNet.Razor.Parser EndTagBlock(tags, complete); } - private bool AfterTagStart(SourceLocation tagStart, - Stack> tags, + private bool AfterTagStart(SourceLocation tagStart, + Stack> tags, IDisposable tagBlockWrapper) { if (!EndOfFile) @@ -269,8 +269,8 @@ namespace Microsoft.AspNet.Razor.Parser return false; } - private bool EndTag(SourceLocation tagStart, - Stack> tags, + private bool EndTag(SourceLocation tagStart, + Stack> tags, IDisposable tagBlockWrapper) { // Accept "/" and move next @@ -531,15 +531,15 @@ namespace Microsoft.AspNet.Razor.Parser // Dynamic value, start a new block and set the code generator using (Context.StartBlock(BlockType.Markup)) { - Context.CurrentBlock.CodeGenerator = + Context.CurrentBlock.CodeGenerator = new DynamicAttributeBlockCodeGenerator(prefix.GetContent(prefixStart), valueStart); OtherParserBlock(); } } - else if (At(HtmlSymbolType.Text) && - CurrentSymbol.Content.Length > 0 && - CurrentSymbol.Content[0] == '~' && + else if (At(HtmlSymbolType.Text) && + CurrentSymbol.Content.Length > 0 && + CurrentSymbol.Content[0] == '~' && NextIs(HtmlSymbolType.ForwardSlash)) { // Virtual Path value @@ -558,7 +558,7 @@ namespace Microsoft.AspNet.Razor.Parser sym.Type != HtmlSymbolType.WhiteSpace && sym.Type != HtmlSymbolType.NewLine && sym.Type != HtmlSymbolType.Transition && - // This condition checks for the end of the attribute value (it repeats some of the checks above + // This condition checks for the end of the attribute value (it repeats some of the checks above // but for now that's ok) !IsEndOfAttributeValue(quote, sym)); Accept(value); @@ -577,7 +577,7 @@ namespace Microsoft.AspNet.Razor.Parser private bool IsUnquotedEndOfAttributeValue(HtmlSymbol sym) { - // If unquoted, we have a larger set of terminating characters: + // If unquoted, we have a larger set of terminating characters: // http://dev.w3.org/html5/spec/tokenization.html#attribute-value-unquoted-state // Also we need to detect "/" and ">" return sym.Type == HtmlSymbolType.DoubleQuote || @@ -714,8 +714,8 @@ namespace Microsoft.AspNet.Razor.Parser return RestOfTag(tag, tags, tagBlockWrapper); } - private bool RestOfTag(Tuple tag, - Stack> tags, + private bool RestOfTag(Tuple tag, + Stack> tags, IDisposable tagBlockWrapper) { TagContent(); @@ -873,11 +873,11 @@ namespace Microsoft.AspNet.Razor.Parser } } - private void CompleteTagBlockWithSpan(IDisposable tagBlockWrapper, + private void CompleteTagBlockWithSpan(IDisposable tagBlockWrapper, AcceptedCharacters acceptedCharacters, SpanKind spanKind) { - Debug.Assert(tagBlockWrapper != null, + Debug.Assert(tagBlockWrapper != null, "Tag block wrapper should not be null when attempting to complete a block"); Span.EditHandler.AcceptedCharacters = acceptedCharacters; diff --git a/src/Microsoft.AspNet.Razor/Parser/ParserBase.cs b/src/Microsoft.AspNet.Razor/Parser/ParserBase.cs index db0fa67372..51e1e7ce5d 100644 --- a/src/Microsoft.AspNet.Razor/Parser/ParserBase.cs +++ b/src/Microsoft.AspNet.Razor/Parser/ParserBase.cs @@ -34,7 +34,7 @@ namespace Microsoft.AspNet.Razor.Parser public abstract void ParseBlock(); - // Markup Parsers need the ParseDocument and ParseSection methods since the markup parser is the first parser to hit the document + // Markup Parsers need the ParseDocument and ParseSection methods since the markup parser is the first parser to hit the document // and the logic may be different than the ParseBlock method. public virtual void ParseDocument() { diff --git a/src/Microsoft.AspNet.Razor/Parser/ParserErrorSink.cs b/src/Microsoft.AspNet.Razor/Parser/ParserErrorSink.cs index 8e326d1e36..22ab6f5a0d 100644 --- a/src/Microsoft.AspNet.Razor/Parser/ParserErrorSink.cs +++ b/src/Microsoft.AspNet.Razor/Parser/ParserErrorSink.cs @@ -36,7 +36,7 @@ namespace Microsoft.AspNet.Razor.Parser /// /// Tracks the given . /// - /// The to track. + /// The to track. public void OnError(RazorError error) { _errors.Add(error); @@ -46,7 +46,7 @@ namespace Microsoft.AspNet.Razor.Parser /// Creates and tracks a new . /// /// of the error. - /// A message describing the error. + /// A message describing the error. public void OnError(SourceLocation location, string message) { _errors.Add(new RazorError(message, location)); diff --git a/src/Microsoft.AspNet.Razor/Parser/RazorParser.cs b/src/Microsoft.AspNet.Razor/Parser/RazorParser.cs index 920350020c..aa86c3832f 100644 --- a/src/Microsoft.AspNet.Razor/Parser/RazorParser.cs +++ b/src/Microsoft.AspNet.Razor/Parser/RazorParser.cs @@ -200,7 +200,7 @@ namespace Microsoft.AspNet.Razor.Parser } /// - /// Returns a sequence of s for tag helpers that are registered in the + /// Returns a sequence of s for tag helpers that are registered in the /// specified . /// /// The to scan for tag helper registrations in. @@ -215,7 +215,7 @@ namespace Microsoft.AspNet.Razor.Parser { return new ISyntaxTreeRewriter[] { - // TODO: Modify the below WhiteSpaceRewriter & ConditionalAttributeCollapser to handle + // TODO: Modify the below WhiteSpaceRewriter & ConditionalAttributeCollapser to handle // TagHelperBlock's: https://github.com/aspnet/Razor/issues/117 // Move whitespace from start of expression block to markup diff --git a/src/Microsoft.AspNet.Razor/Parser/TagHelpers/TagHelperBlock.cs b/src/Microsoft.AspNet.Razor/Parser/TagHelpers/TagHelperBlock.cs index 7067b24cf9..52808f23ef 100644 --- a/src/Microsoft.AspNet.Razor/Parser/TagHelpers/TagHelperBlock.cs +++ b/src/Microsoft.AspNet.Razor/Parser/TagHelpers/TagHelperBlock.cs @@ -67,13 +67,13 @@ namespace Microsoft.AspNet.Razor.Parser.TagHelpers } /// - /// Determines whether two s are equal by comparing the , + /// Determines whether two s are equal by comparing the , /// , , and /// . /// /// The to check equality against. /// - /// true if the current is equivalent to the given + /// true if the current is equivalent to the given /// , false otherwise. /// public bool Equals(TagHelperBlock other) diff --git a/src/Microsoft.AspNet.Razor/Parser/TagHelpers/TagHelperBlockBuilder.cs b/src/Microsoft.AspNet.Razor/Parser/TagHelpers/TagHelperBlockBuilder.cs index 8308c01d22..6c5b51f76e 100644 --- a/src/Microsoft.AspNet.Razor/Parser/TagHelpers/TagHelperBlockBuilder.cs +++ b/src/Microsoft.AspNet.Razor/Parser/TagHelpers/TagHelperBlockBuilder.cs @@ -18,7 +18,7 @@ namespace Microsoft.AspNet.Razor.Parser.TagHelpers public class TagHelperBlockBuilder : BlockBuilder { /// - /// Instantiates a new instance based on given the + /// Instantiates a new instance based on given the /// . /// /// The original to copy data from. @@ -170,7 +170,7 @@ namespace Microsoft.AspNet.Razor.Parser.TagHelpers { // We've found an '=' symbol, this means that the coming symbols will either be a quote // or value (in the case that the value is unquoted). - // Spaces after/before the equal symbol are not yet supported: + // Spaces after/before the equal symbol are not yet supported: // https://github.com/aspnet/Razor/issues/123 // TODO: Handle malformed tags, if there's an '=' then there MUST be a value. @@ -290,7 +290,7 @@ namespace Microsoft.AspNet.Razor.Parser.TagHelpers else if (isDynamic && childSpan.CodeGenerator == SpanCodeGenerator.Null) { // Usually the dynamic code generator handles rendering the null code generators underneath - // it. This doesn't make sense in terms of tag helpers though, we need to change null code + // it. This doesn't make sense in terms of tag helpers though, we need to change null code // generators to markup code generators. newCodeGenerator = new MarkupCodeGenerator(); diff --git a/src/Microsoft.AspNet.Razor/Parser/TagHelpers/TagHelperParseTreeRewriter.cs b/src/Microsoft.AspNet.Razor/Parser/TagHelpers/TagHelperParseTreeRewriter.cs index 995ad9aa80..03ac6ea42e 100644 --- a/src/Microsoft.AspNet.Razor/Parser/TagHelpers/TagHelperParseTreeRewriter.cs +++ b/src/Microsoft.AspNet.Razor/Parser/TagHelpers/TagHelperParseTreeRewriter.cs @@ -77,7 +77,7 @@ namespace Microsoft.AspNet.Razor.Parser.TagHelpers.Internal // Found a new tag helper block TrackTagHelperBlock(new TagHelperBlockBuilder(tagName, descriptors, childBlock)); - // If it's a self closing block then we don't have to worry about nested children + // If it's a self closing block then we don't have to worry about nested children // within the tag... complete it. if (IsSelfClosing(childBlock)) { @@ -117,7 +117,7 @@ namespace Microsoft.AspNet.Razor.Parser.TagHelpers.Internal // At this point the child is a Span or Block with Type BlockType.Tag that doesn't happen to be a // tag helper. - // Add the child to current block. + // Add the child to current block. _currentBlock.Children.Add(child); } @@ -130,12 +130,12 @@ namespace Microsoft.AspNet.Razor.Parser.TagHelpers.Internal // the document, that's the only way we can have a non-zero _blockStack.Count. if (_blockStack.Count != 0) { - // We reverse the children so we can search from the back to the front for the TagHelper that is + // We reverse the children so we can search from the back to the front for the TagHelper that is // malformed. var candidateChildren = _currentBlock.Children.Reverse(); var malformedTagHelper = candidateChildren.OfType().FirstOrDefault(); - // If the malformed tag helper is null that means something other than a TagHelper caused the + // If the malformed tag helper is null that means something other than a TagHelper caused the // unbalancing of the syntax tree (should never happen). Debug.Assert(malformedTagHelper != null); diff --git a/src/Microsoft.AspNet.Razor/PartialParseResult.cs b/src/Microsoft.AspNet.Razor/PartialParseResult.cs index 7ef39bc477..b5f5ad0d4a 100644 --- a/src/Microsoft.AspNet.Razor/PartialParseResult.cs +++ b/src/Microsoft.AspNet.Razor/PartialParseResult.cs @@ -18,7 +18,7 @@ namespace Microsoft.AspNet.Razor /// The result of attempting an incremental parse /// /// - /// Either the Accepted or Rejected flag is ALWAYS set. + /// Either the Accepted or Rejected flag is ALWAYS set. /// Additionally, Provisional may be set with Accepted and SpanContextChanged may be set with Rejected. /// Provisional may NOT be set with Rejected and SpanContextChanged may NOT be set with Accepted. /// diff --git a/src/Microsoft.AspNet.Razor/Properties/RazorResources.Designer.cs b/src/Microsoft.AspNet.Razor/Properties/RazorResources.Designer.cs index 0bab77f769..911da71cc8 100644 --- a/src/Microsoft.AspNet.Razor/Properties/RazorResources.Designer.cs +++ b/src/Microsoft.AspNet.Razor/Properties/RazorResources.Designer.cs @@ -92,7 +92,7 @@ namespace Microsoft.AspNet.Razor /// /// The "@" character must be followed by a ":", "(", or a C# identifier. If you intended to switch to markup, use an HTML start tag, for example: - /// + /// /// @if(isLoggedIn) { /// <p>Hello, @user!</p> /// } @@ -104,7 +104,7 @@ namespace Microsoft.AspNet.Razor /// /// The "@" character must be followed by a ":", "(", or a C# identifier. If you intended to switch to markup, use an HTML start tag, for example: - /// + /// /// @if(isLoggedIn) { /// <p>Hello, @user!</p> /// } @@ -228,7 +228,7 @@ namespace Microsoft.AspNet.Razor /// /// Sections cannot be empty. The "@section" keyword must be followed by a block of markup surrounded by "{}". For example: - /// + /// /// @section Sidebar { /// <!-- Markup and text goes here --> /// } @@ -240,7 +240,7 @@ namespace Microsoft.AspNet.Razor /// /// Sections cannot be empty. The "@section" keyword must be followed by a block of markup surrounded by "{}". For example: - /// + /// /// @section Sidebar { /// <!-- Markup and text goes here --> /// } @@ -252,7 +252,7 @@ namespace Microsoft.AspNet.Razor /// /// Namespace imports and type aliases cannot be placed within code blocks. They must immediately follow an "@" character in markup. It is recommended that you put them at the top of the page, as in the following example: - /// + /// /// @using System.Drawing; /// @{ /// // OK here to use types from System.Drawing in the page. @@ -265,7 +265,7 @@ namespace Microsoft.AspNet.Razor /// /// Namespace imports and type aliases cannot be placed within code blocks. They must immediately follow an "@" character in markup. It is recommended that you put them at the top of the page, as in the following example: - /// + /// /// @using System.Drawing; /// @{ /// // OK here to use types from System.Drawing in the page. @@ -278,12 +278,12 @@ namespace Microsoft.AspNet.Razor /// /// Expected a "{0}" but found a "{1}". Block statements must be enclosed in "{{" and "}}". You cannot use single-statement control-flow statements in CSHTML pages. For example, the following is not allowed: - /// + /// /// @if(isLoggedIn) /// <p>Hello, @user</p> - /// + /// /// Instead, wrap the contents of the block in "{{}}": - /// + /// /// @if(isLoggedIn) {{ /// <p>Hello, @user</p> /// }} @@ -295,12 +295,12 @@ namespace Microsoft.AspNet.Razor /// /// Expected a "{0}" but found a "{1}". Block statements must be enclosed in "{{" and "}}". You cannot use single-statement control-flow statements in CSHTML pages. For example, the following is not allowed: - /// + /// /// @if(isLoggedIn) /// <p>Hello, @user</p> - /// + /// /// Instead, wrap the contents of the block in "{{}}": - /// + /// /// @if(isLoggedIn) {{ /// <p>Hello, @user</p> /// }} diff --git a/src/Microsoft.AspNet.Razor/RazorDirectiveAttribute.cs b/src/Microsoft.AspNet.Razor/RazorDirectiveAttribute.cs index ee81ec8a36..aea80e1da9 100644 --- a/src/Microsoft.AspNet.Razor/RazorDirectiveAttribute.cs +++ b/src/Microsoft.AspNet.Razor/RazorDirectiveAttribute.cs @@ -7,7 +7,7 @@ using Microsoft.Internal.Web.Utils; namespace Microsoft.AspNet.Razor { /// - /// Specifies a Razor directive that is rendered as an attribute on the generated class. + /// Specifies a Razor directive that is rendered as an attribute on the generated class. /// [AttributeUsage(AttributeTargets.Class, AllowMultiple = true, Inherited = true)] public sealed class RazorDirectiveAttribute : Attribute diff --git a/src/Microsoft.AspNet.Razor/RazorEditorParser.cs b/src/Microsoft.AspNet.Razor/RazorEditorParser.cs index 522fc93813..589712012d 100644 --- a/src/Microsoft.AspNet.Razor/RazorEditorParser.cs +++ b/src/Microsoft.AspNet.Razor/RazorEditorParser.cs @@ -20,7 +20,7 @@ namespace Microsoft.AspNet.Razor /// This parser is designed to allow editors to avoid having to worry about incremental parsing. /// The CheckForStructureChanges method can be called with every change made by a user in an editor and /// the parser will provide a result indicating if it was able to incrementally reparse the document. - /// + /// /// The general workflow for editors with this parser is: /// 0. User edits document /// 1. Editor builds TextChange structure describing the edit and providing a reference to the _updated_ text buffer @@ -30,25 +30,25 @@ namespace Microsoft.AspNet.Razor /// b. If it can not, the Parser starts a background parse task and return PartialParseResult.Rejected /// NOTE: Additional flags can be applied to the PartialParseResult, see that enum for more details. However, /// the Accepted or Rejected flags will ALWAYS be present - /// + /// /// A change can only be incrementally parsed if a single, unique, Span (see Microsoft.AspNet.Razor.Parser.SyntaxTree) in the syntax tree can /// be identified as owning the entire change. For example, if a change overlaps with multiple spans, the change cannot be /// parsed incrementally and a full reparse is necessary. A Span "owns" a change if the change occurs either a) entirely /// within it's boundaries or b) it is a pure insertion (see TextChange) at the end of a Span whose CanGrow flag (see Span) is /// true. - /// + /// /// Even if a single unique Span owner can be identified, it's possible the edit will cause the Span to split or merge with other /// Spans, in which case, a full reparse is necessary to identify the extent of the changes to the tree. - /// + /// /// When the RazorEditorParser returns Accepted, it updates CurrentParseTree immediately. However, the editor is expected to /// update it's own data structures independently. It can use CurrentParseTree to do this, as soon as the editor returns from /// CheckForStructureChanges, but it should (ideally) have logic for doing so without needing the new tree. - /// + /// /// When Rejected is returned by CheckForStructureChanges, a background parse task has _already_ been started. When that task /// finishes, the DocumentStructureChanged event will be fired containing the new generated code, parse tree and a reference to - /// the original TextChange that caused the reparse, to allow the editor to resolve the new tree against any changes made since + /// the original TextChange that caused the reparse, to allow the editor to resolve the new tree against any changes made since /// calling CheckForStructureChanges. - /// + /// /// If a call to CheckForStructureChanges occurs while a reparse is already in-progress, the reparse is cancelled IMMEDIATELY /// and Rejected is returned without attempting to reparse. This means that if a conusmer calls CheckForStructureChanges, which /// returns Rejected, then calls it again before DocumentParseComplete is fired, it will only recieve one DocumentParseComplete diff --git a/src/Microsoft.AspNet.Razor/RazorResources.resx b/src/Microsoft.AspNet.Razor/RazorResources.resx index cdca65f247..3e25ad9efd 100644 --- a/src/Microsoft.AspNet.Razor/RazorResources.resx +++ b/src/Microsoft.AspNet.Razor/RazorResources.resx @@ -1,17 +1,17 @@ - diff --git a/src/Microsoft.AspNet.Razor/RazorTemplateEngine.cs b/src/Microsoft.AspNet.Razor/RazorTemplateEngine.cs index 949b698b91..45b7f3296d 100644 --- a/src/Microsoft.AspNet.Razor/RazorTemplateEngine.cs +++ b/src/Microsoft.AspNet.Razor/RazorTemplateEngine.cs @@ -56,10 +56,10 @@ namespace Microsoft.AspNet.Razor /// /// IMPORTANT: This does NOT need to be called before GeneratedCode! GenerateCode will automatically /// parse the document first. - /// + /// /// The cancel token provided can be used to cancel the parse. However, please note - /// that the parse occurs _synchronously_, on the callers thread. This parameter is - /// provided so that if the caller is in a background thread with a CancellationToken, + /// that the parse occurs _synchronously_, on the callers thread. This parameter is + /// provided so that if the caller is in a background thread with a CancellationToken, /// it can pass it along to the parser. /// /// The input text to parse @@ -71,7 +71,7 @@ namespace Microsoft.AspNet.Razor return ParseTemplateCore(input.ToDocument(), sourceFileName: null, cancelToken: cancelToken); } - // See ParseTemplate(ITextBuffer, CancellationToken?), + // See ParseTemplate(ITextBuffer, CancellationToken?), // this overload simply wraps a TextReader in a TextBuffer (see ITextBuffer and BufferingTextReader) public ParserResults ParseTemplate(TextReader input, string sourceFileName) { @@ -114,14 +114,14 @@ namespace Microsoft.AspNet.Razor /// /// /// The cancel token provided can be used to cancel the parse. However, please note - /// that the parse occurs _synchronously_, on the callers thread. This parameter is - /// provided so that if the caller is in a background thread with a CancellationToken, + /// that the parse occurs _synchronously_, on the callers thread. This parameter is + /// provided so that if the caller is in a background thread with a CancellationToken, /// it can pass it along to the parser. - /// + /// /// The className, rootNamespace and sourceFileName parameters are optional and override the default /// specified by the Host. For example, the WebPageRazorHost in System.Web.WebPages.Razor configures the /// Class Name, Root Namespace and Source File Name based on the virtual path of the page being compiled. - /// However, the built-in RazorEngineHost class uses constant defaults, so the caller will likely want to + /// However, the built-in RazorEngineHost class uses constant defaults, so the caller will likely want to /// change them using these parameters /// /// The input text to parse diff --git a/src/Microsoft.AspNet.Razor/TagHelpers/ITagHelperDescriptorResolver.cs b/src/Microsoft.AspNet.Razor/TagHelpers/ITagHelperDescriptorResolver.cs index be9fb00209..53e0417d32 100644 --- a/src/Microsoft.AspNet.Razor/TagHelpers/ITagHelperDescriptorResolver.cs +++ b/src/Microsoft.AspNet.Razor/TagHelpers/ITagHelperDescriptorResolver.cs @@ -14,9 +14,9 @@ namespace Microsoft.AspNet.Razor.TagHelpers /// Resolves s based on the given . /// /// - /// used to resolve descriptors for the Razor page. + /// used to resolve descriptors for the Razor page. /// - /// An of s based + /// An of s based /// on the given . IEnumerable Resolve(TagHelperDescriptorResolutionContext resolutionContext); } diff --git a/src/Microsoft.AspNet.Razor/TagHelpers/TagHelperAttributeDescriptor.cs b/src/Microsoft.AspNet.Razor/TagHelpers/TagHelperAttributeDescriptor.cs index bb2197fc0e..409f740762 100644 --- a/src/Microsoft.AspNet.Razor/TagHelpers/TagHelperAttributeDescriptor.cs +++ b/src/Microsoft.AspNet.Razor/TagHelpers/TagHelperAttributeDescriptor.cs @@ -20,10 +20,10 @@ namespace Microsoft.AspNet.Razor.TagHelpers /// Instantiates a new instance of the class. /// /// The HTML attribute name. - /// The name of the CLR property name that corresponds to the HTML + /// The name of the CLR property name that corresponds to the HTML /// attribute. /// - /// The full name of the named (see ) property's + /// The full name of the named (see ) property's /// . /// public TagHelperAttributeDescriptor(string name, @@ -46,7 +46,7 @@ namespace Microsoft.AspNet.Razor.TagHelpers public string PropertyName { get; private set; } /// - /// The full name of the named (see ) property's + /// The full name of the named (see ) property's /// . /// public string TypeName { get; private set; } diff --git a/src/Microsoft.AspNet.Razor/TagHelpers/TagHelperAttributeValueCodeRenderer.cs b/src/Microsoft.AspNet.Razor/TagHelpers/TagHelperAttributeValueCodeRenderer.cs index 8088892ee2..25e7f69f46 100644 --- a/src/Microsoft.AspNet.Razor/TagHelpers/TagHelperAttributeValueCodeRenderer.cs +++ b/src/Microsoft.AspNet.Razor/TagHelpers/TagHelperAttributeValueCodeRenderer.cs @@ -13,12 +13,12 @@ namespace Microsoft.AspNet.Razor.TagHelpers public class TagHelperAttributeValueCodeRenderer { /// - /// Called during Razor's code generation process to generate code that instantiates the value of the tag + /// Called during Razor's code generation process to generate code that instantiates the value of the tag /// helper's property. Last value written should not be or end with a semicolon. /// /// The to generate code for. /// The that's used to write code. - /// A instance that contains information about + /// A instance that contains information about /// the current code generation process. /// that renders the raw value of the HTML attribute. public virtual void RenderAttributeValue([NotNull] TagHelperAttributeDescriptor attributeDescriptor, diff --git a/src/Microsoft.AspNet.Razor/TagHelpers/TagHelperDescriptor.cs b/src/Microsoft.AspNet.Razor/TagHelpers/TagHelperDescriptor.cs index 29d7f2093c..499a0efe39 100644 --- a/src/Microsoft.AspNet.Razor/TagHelpers/TagHelperDescriptor.cs +++ b/src/Microsoft.AspNet.Razor/TagHelpers/TagHelperDescriptor.cs @@ -24,16 +24,16 @@ namespace Microsoft.AspNet.Razor.TagHelpers [NotNull] string typeName, [NotNull] string assemblyName, ContentBehavior contentBehavior) - : this(tagName, - typeName, - assemblyName, - contentBehavior, + : this(tagName, + typeName, + assemblyName, + contentBehavior, Enumerable.Empty()) { } /// - /// Instantiates a new instance of the class with the given + /// Instantiates a new instance of the class with the given /// . /// /// The tag name that the tag helper targets. '*' indicates a catch-all diff --git a/src/Microsoft.AspNet.Razor/TagHelpers/TagHelperDescriptorComparer.cs b/src/Microsoft.AspNet.Razor/TagHelpers/TagHelperDescriptorComparer.cs index b45bcdb97d..17e25079b8 100644 --- a/src/Microsoft.AspNet.Razor/TagHelpers/TagHelperDescriptorComparer.cs +++ b/src/Microsoft.AspNet.Razor/TagHelpers/TagHelperDescriptorComparer.cs @@ -21,15 +21,15 @@ namespace Microsoft.AspNet.Razor.TagHelpers /// /// Determines if the two given tag helpers are equal. /// - /// A to compare with the given + /// A to compare with the given /// . - /// A to compare with the given + /// A to compare with the given /// . /// true if and are equal, /// false otherwise. /// - /// Determines equality based on , - /// , and + /// Determines equality based on , + /// , and /// . /// public bool Equals(TagHelperDescriptor descriptorX, TagHelperDescriptor descriptorY) @@ -44,7 +44,7 @@ namespace Microsoft.AspNet.Razor.TagHelpers /// Returns an value that uniquely identifies the given . /// /// The to create a hash code for. - /// An that uniquely identifies the given . + /// An that uniquely identifies the given . public int GetHashCode(TagHelperDescriptor descriptor) { return HashCodeCombiner.Start() diff --git a/src/Microsoft.AspNet.Razor/TagHelpers/TagHelperDescriptorProvider.cs b/src/Microsoft.AspNet.Razor/TagHelpers/TagHelperDescriptorProvider.cs index 9ba5e0e949..a497920ff2 100644 --- a/src/Microsoft.AspNet.Razor/TagHelpers/TagHelperDescriptorProvider.cs +++ b/src/Microsoft.AspNet.Razor/TagHelpers/TagHelperDescriptorProvider.cs @@ -35,10 +35,10 @@ namespace Microsoft.AspNet.Razor.TagHelpers /// /// Gets all tag helpers that match the given . /// - /// The name of the HTML tag to match. Providing a '*' tag name + /// The name of the HTML tag to match. Providing a '*' tag name /// retrieves catch-all s (descriptors that target every tag). /// s that apply to the given . - /// Will return an empty if no s are + /// Will return an empty if no s are /// found. public IEnumerable GetTagHelpers(string tagName) { @@ -63,7 +63,7 @@ namespace Microsoft.AspNet.Razor.TagHelpers { return matchingDescriptors.Concat(descriptors); } - + // We couldn't any descriptors associated with the requested tag name, return all // of the "catch-all" tag descriptors (there may not be any). return descriptors; diff --git a/src/Microsoft.AspNet.Razor/TagHelpers/TagHelperDescriptorResolutionContext.cs b/src/Microsoft.AspNet.Razor/TagHelpers/TagHelperDescriptorResolutionContext.cs index 9a127edf55..35f490f21a 100644 --- a/src/Microsoft.AspNet.Razor/TagHelpers/TagHelperDescriptorResolutionContext.cs +++ b/src/Microsoft.AspNet.Razor/TagHelpers/TagHelperDescriptorResolutionContext.cs @@ -24,7 +24,7 @@ namespace Microsoft.AspNet.Razor.TagHelpers /// /// s used to resolve s. - /// + /// public IList DirectiveDescriptors { get; private set; } } } \ No newline at end of file diff --git a/src/Microsoft.AspNet.Razor/Tokenizer/CSharpTokenizer.cs b/src/Microsoft.AspNet.Razor/Tokenizer/CSharpTokenizer.cs index dcc312795f..fcc5680c12 100644 --- a/src/Microsoft.AspNet.Razor/Tokenizer/CSharpTokenizer.cs +++ b/src/Microsoft.AspNet.Razor/Tokenizer/CSharpTokenizer.cs @@ -275,7 +275,7 @@ namespace Microsoft.AspNet.Razor.Tokenizer if (CurrentCharacter == '\\') { TakeCurrent(); // Take the '\' - + // If the next char is the same quote that started this if (CurrentCharacter == quote || CurrentCharacter == '\\') { diff --git a/src/Microsoft.AspNet.Razor/Tokenizer/XmlHelpers.cs b/src/Microsoft.AspNet.Razor/Tokenizer/XmlHelpers.cs index b746228122..b199b762f5 100644 --- a/src/Microsoft.AspNet.Razor/Tokenizer/XmlHelpers.cs +++ b/src/Microsoft.AspNet.Razor/Tokenizer/XmlHelpers.cs @@ -8,8 +8,8 @@ namespace Microsoft.AspNet.Razor.Tokenizer { public static bool IsXmlNameStartChar(char chr) { - // [4] NameStartChar ::= ":" | [A-Z] | "_" | [a-z] | [#xC0-#xD6] | [#xD8-#xF6] | [#xF8-#x2FF] | [#x370-#x37D] | - // [#x37F-#x1FFF] | [#x200C-#x200D] | [#x2070-#x218F] | [#x2C00-#x2FEF] | [#x3001-#xD7FF] | + // [4] NameStartChar ::= ":" | [A-Z] | "_" | [a-z] | [#xC0-#xD6] | [#xD8-#xF6] | [#xF8-#x2FF] | [#x370-#x37D] | + // [#x37F-#x1FFF] | [#x200C-#x200D] | [#x2070-#x218F] | [#x2C00-#x2FEF] | [#x3001-#xD7FF] | // [#xF900-#xFDCF] | [#xFDF0-#xFFFD] | [#x10000-#xEFFFF] // http://www.w3.org/TR/REC-xml/#NT-Name diff --git a/test/Microsoft.AspNet.Razor.Runtime.Test/TagHelpers/CompleteTagHelperDescriptorComparer.cs b/test/Microsoft.AspNet.Razor.Runtime.Test/TagHelpers/CompleteTagHelperDescriptorComparer.cs index d3a6086aab..5a00ff6e65 100644 --- a/test/Microsoft.AspNet.Razor.Runtime.Test/TagHelpers/CompleteTagHelperDescriptorComparer.cs +++ b/test/Microsoft.AspNet.Razor.Runtime.Test/TagHelpers/CompleteTagHelperDescriptorComparer.cs @@ -44,7 +44,7 @@ namespace Microsoft.AspNet.Razor.Runtime.TagHelpers public bool Equals(TagHelperAttributeDescriptor descriptorX, TagHelperAttributeDescriptor descriptorY) { return descriptorX.Name == descriptorY.Name && - descriptorX.PropertyName == descriptorY.PropertyName && + descriptorX.PropertyName == descriptorY.PropertyName && descriptorX.TypeName == descriptorY.TypeName; } diff --git a/test/Microsoft.AspNet.Razor.Runtime.Test/TagHelpers/TagHelperDescriptorFactoryTest.cs b/test/Microsoft.AspNet.Razor.Runtime.Test/TagHelpers/TagHelperDescriptorFactoryTest.cs index 81630770e0..072d68b323 100644 --- a/test/Microsoft.AspNet.Razor.Runtime.Test/TagHelpers/TagHelperDescriptorFactoryTest.cs +++ b/test/Microsoft.AspNet.Razor.Runtime.Test/TagHelpers/TagHelperDescriptorFactoryTest.cs @@ -99,7 +99,7 @@ namespace Microsoft.AspNet.Razor.Runtime.TagHelpers { // Arrange var objectAssemblyName = typeof(object).GetTypeInfo().Assembly.GetName().Name; - var expectedDescriptor = + var expectedDescriptor = new TagHelperDescriptor("Object", "System.Object", objectAssemblyName, ContentBehavior.None); // Act @@ -205,7 +205,7 @@ namespace Microsoft.AspNet.Razor.Runtime.TagHelpers [Fact] public void CreateDescriptor_ResolvesCustomContentBehavior() { - // Arrange + // Arrange var expectedDescriptor = new TagHelperDescriptor( "CustomContentBehavior", typeof(CustomContentBehaviorTagHelper).FullName, @@ -223,7 +223,7 @@ namespace Microsoft.AspNet.Razor.Runtime.TagHelpers [Fact] public void CreateDescriptor_DoesNotResolveInheritedCustomContentBehavior() { - // Arrange + // Arrange var expectedDescriptor = new TagHelperDescriptor( "InheritedCustomContentBehavior", typeof(InheritedCustomContentBehaviorTagHelper).FullName, @@ -340,18 +340,18 @@ namespace Microsoft.AspNet.Razor.Runtime.TagHelpers // Arrange var expectedDescriptors = new[] { new TagHelperDescriptor( - "span", - typeof(MultipleAttributeTagHelper).FullName, - AssemblyName, - ContentBehavior.None), - new TagHelperDescriptor( - "p", - typeof(MultipleAttributeTagHelper).FullName, + "span", + typeof(MultipleAttributeTagHelper).FullName, AssemblyName, ContentBehavior.None), new TagHelperDescriptor( - "div", - typeof(MultipleAttributeTagHelper).FullName, + "p", + typeof(MultipleAttributeTagHelper).FullName, + AssemblyName, + ContentBehavior.None), + new TagHelperDescriptor( + "div", + typeof(MultipleAttributeTagHelper).FullName, AssemblyName, ContentBehavior.None) }; diff --git a/test/Microsoft.AspNet.Razor.Runtime.Test/TagHelpers/TagHelperDescriptorResolverTest.cs b/test/Microsoft.AspNet.Razor.Runtime.Test/TagHelpers/TagHelperDescriptorResolverTest.cs index 77672900cb..c49893ece3 100644 --- a/test/Microsoft.AspNet.Razor.Runtime.Test/TagHelpers/TagHelperDescriptorResolverTest.cs +++ b/test/Microsoft.AspNet.Razor.Runtime.Test/TagHelpers/TagHelperDescriptorResolverTest.cs @@ -69,10 +69,10 @@ namespace Microsoft.AspNet.Razor.Runtime.TagHelpers // We're treating 'string' as a TagHelper so we can test TagHelpers in multiple assemblies without // building a separate assembly with a single TagHelper. - var stringTagHelperDescriptor = - new TagHelperDescriptor("string", - "System.String", - assemblyB, + var stringTagHelperDescriptor = + new TagHelperDescriptor("string", + "System.String", + assemblyB, ContentBehavior.None); return new TheoryData>, // descriptorAssemblyLookups @@ -138,7 +138,7 @@ namespace Microsoft.AspNet.Razor.Runtime.TagHelpers new [] { new TagHelperDirectiveDescriptor( - Valid_PlainTagHelperType.FullName + ", " + assemblyA, + Valid_PlainTagHelperType.FullName + ", " + assemblyA, TagHelperDirectiveType.AddTagHelper), new TagHelperDirectiveDescriptor(assemblyA, TagHelperDirectiveType.AddTagHelper) }, @@ -153,7 +153,7 @@ namespace Microsoft.AspNet.Razor.Runtime.TagHelpers { new TagHelperDirectiveDescriptor(assemblyA, TagHelperDirectiveType.AddTagHelper), new TagHelperDirectiveDescriptor( - Valid_PlainTagHelperType.FullName + ", " + assemblyA, + Valid_PlainTagHelperType.FullName + ", " + assemblyA, TagHelperDirectiveType.RemoveTagHelper) }, new [] { Valid_InheritedTagHelperDescriptor } @@ -167,7 +167,7 @@ namespace Microsoft.AspNet.Razor.Runtime.TagHelpers { new TagHelperDirectiveDescriptor(assemblyA, TagHelperDirectiveType.AddTagHelper), new TagHelperDirectiveDescriptor( - Valid_PlainTagHelperType.FullName + ", " + assemblyA, + Valid_PlainTagHelperType.FullName + ", " + assemblyA, TagHelperDirectiveType.RemoveTagHelper), new TagHelperDirectiveDescriptor(assemblyA, TagHelperDirectiveType.AddTagHelper) }, @@ -471,7 +471,7 @@ namespace Microsoft.AspNet.Razor.Runtime.TagHelpers return Resolve( new TagHelperDescriptorResolutionContext( lookupTexts.Select( - lookupText => + lookupText => new TagHelperDirectiveDescriptor(lookupText, TagHelperDirectiveType.AddTagHelper)))); } } diff --git a/test/Microsoft.AspNet.Razor.Runtime.Test/TagHelpers/TagHelperOutputTest.cs b/test/Microsoft.AspNet.Razor.Runtime.Test/TagHelpers/TagHelperOutputTest.cs index cc05acb40c..34a34a3659 100644 --- a/test/Microsoft.AspNet.Razor.Runtime.Test/TagHelpers/TagHelperOutputTest.cs +++ b/test/Microsoft.AspNet.Razor.Runtime.Test/TagHelpers/TagHelperOutputTest.cs @@ -79,7 +79,7 @@ namespace Microsoft.AspNet.Razor.Runtime.TagHelpers public void GenerateStartTag_ReturnsSelfClosingStartTag_Attributes() { // Arrange - var tagHelperOutput = new TagHelperOutput("p", + var tagHelperOutput = new TagHelperOutput("p", attributes: new Dictionary { { "class", "btn" }, @@ -114,7 +114,7 @@ namespace Microsoft.AspNet.Razor.Runtime.TagHelpers public void GenerateStartTag_ReturnsNothingIfWhitespaceTagName() { // Arrange - var tagHelperOutput = new TagHelperOutput(" ", + var tagHelperOutput = new TagHelperOutput(" ", attributes: new Dictionary { { "class", "btn" }, diff --git a/test/Microsoft.AspNet.Razor.Test/CSharpRazorCodeLanguageTest.cs b/test/Microsoft.AspNet.Razor.Test/CSharpRazorCodeLanguageTest.cs index a444f99084..44a734d091 100644 --- a/test/Microsoft.AspNet.Razor.Test/CSharpRazorCodeLanguageTest.cs +++ b/test/Microsoft.AspNet.Razor.Test/CSharpRazorCodeLanguageTest.cs @@ -48,7 +48,7 @@ namespace Microsoft.AspNet.Razor.Test { // Arrange var language = new CSharpRazorCodeLanguage(); - var host = new RazorEngineHost(language); + var host = new RazorEngineHost(language); var codeBuilderContext = new CodeBuilderContext( host, "myclass", diff --git a/test/Microsoft.AspNet.Razor.Test/Editor/RazorEditorParserTest.cs b/test/Microsoft.AspNet.Razor.Test/Editor/RazorEditorParserTest.cs index d46ca7aee5..0fa4291a2a 100644 --- a/test/Microsoft.AspNet.Razor.Test/Editor/RazorEditorParserTest.cs +++ b/test/Microsoft.AspNet.Razor.Test/Editor/RazorEditorParserTest.cs @@ -132,7 +132,7 @@ namespace Microsoft.AspNet.Razor.Test.Editor parser.CheckForStructureChanges(new TextChange(0, 0, new StringTextBuffer(String.Empty), input.Length, input)); // Assert - MiscUtils.DoWithTimeoutIfNotDebugging(parseComplete.Wait); + MiscUtils.DoWithTimeoutIfNotDebugging(parseComplete.Wait); Assert.Equal( SimpleCSHTMLDocumentGenerated.ReadAllText(), diff --git a/test/Microsoft.AspNet.Razor.Test/Framework/BlockTypes.cs b/test/Microsoft.AspNet.Razor.Test/Framework/BlockTypes.cs index 3ff64637dd..b6c80d0500 100644 --- a/test/Microsoft.AspNet.Razor.Test/Framework/BlockTypes.cs +++ b/test/Microsoft.AspNet.Razor.Test/Framework/BlockTypes.cs @@ -183,7 +183,7 @@ namespace Microsoft.AspNet.Razor.Test.Framework { } - public MarkupTagHelperBlock(string tagName, + public MarkupTagHelperBlock(string tagName, IDictionary attributes) : this(tagName, attributes, new SyntaxTreeNode[0]) { diff --git a/test/Microsoft.AspNet.Razor.Test/Framework/ParserTestBase.cs b/test/Microsoft.AspNet.Razor.Test/Framework/ParserTestBase.cs index 62e66f1e24..75dfb3eaca 100644 --- a/test/Microsoft.AspNet.Razor.Test/Framework/ParserTestBase.cs +++ b/test/Microsoft.AspNet.Razor.Test/Framework/ParserTestBase.cs @@ -35,15 +35,15 @@ namespace Microsoft.AspNet.Razor.Test.Framework protected abstract ParserBase SelectActiveParser(ParserBase codeParser, ParserBase markupParser); - public virtual ParserContext CreateParserContext(ITextDocument input, - ParserBase codeParser, + public virtual ParserContext CreateParserContext(ITextDocument input, + ParserBase codeParser, ParserBase markupParser, ParserErrorSink errorSink) { - return new ParserContext(input, - codeParser, - markupParser, - SelectActiveParser(codeParser, markupParser), + return new ParserContext(input, + codeParser, + markupParser, + SelectActiveParser(codeParser, markupParser), errorSink); } @@ -161,13 +161,13 @@ namespace Microsoft.AspNet.Razor.Test.Framework return ParseDocument(document, designTimeParser: false, errorSink: errorSink); } - protected virtual ParserResults ParseDocument(string document, - bool designTimeParser, + protected virtual ParserResults ParseDocument(string document, + bool designTimeParser, ParserErrorSink errorSink) { - return RunParse(document, - parser => parser.ParseDocument, - designTimeParser, + return RunParse(document, + parser => parser.ParseDocument, + designTimeParser, parserSelector: c => c.MarkupParser, errorSink: errorSink); } @@ -180,9 +180,9 @@ namespace Microsoft.AspNet.Razor.Test.Framework return RunParse(document, parser => parser.ParseBlock, designTimeParser); } - protected virtual ParserResults RunParse(string document, - Func parserActionSelector, - bool designTimeParser, + protected virtual ParserResults RunParse(string document, + Func parserActionSelector, + bool designTimeParser, Func parserSelector = null, ParserErrorSink errorSink = null) { diff --git a/test/Microsoft.AspNet.Razor.Test/Generator/CSharpRazorCodeGeneratorTest.cs b/test/Microsoft.AspNet.Razor.Test/Generator/CSharpRazorCodeGeneratorTest.cs index 41684cddc8..6a9d854d1f 100644 --- a/test/Microsoft.AspNet.Razor.Test/Generator/CSharpRazorCodeGeneratorTest.cs +++ b/test/Microsoft.AspNet.Razor.Test/Generator/CSharpRazorCodeGeneratorTest.cs @@ -492,40 +492,40 @@ namespace Microsoft.AspNet.Razor.Test.Generator }); } - protected static LineMapping BuildLineMapping(int documentAbsoluteIndex, - int documentLineIndex, - int generatedAbsoluteIndex, - int generatedLineIndex, - int characterOffsetIndex, + protected static LineMapping BuildLineMapping(int documentAbsoluteIndex, + int documentLineIndex, + int generatedAbsoluteIndex, + int generatedLineIndex, + int characterOffsetIndex, int contentLength) { - return BuildLineMapping(documentAbsoluteIndex, - documentLineIndex, - characterOffsetIndex, - generatedAbsoluteIndex, - generatedLineIndex, - characterOffsetIndex, + return BuildLineMapping(documentAbsoluteIndex, + documentLineIndex, + characterOffsetIndex, + generatedAbsoluteIndex, + generatedLineIndex, + characterOffsetIndex, contentLength); } - protected static LineMapping BuildLineMapping(int documentAbsoluteIndex, - int documentLineIndex, - int documentCharacterOffsetIndex, - int generatedAbsoluteIndex, - int generatedLineIndex, - int generatedCharacterOffsetIndex, + protected static LineMapping BuildLineMapping(int documentAbsoluteIndex, + int documentLineIndex, + int documentCharacterOffsetIndex, + int generatedAbsoluteIndex, + int generatedLineIndex, + int generatedCharacterOffsetIndex, int contentLength) { return new LineMapping( documentLocation: new MappingLocation( - new SourceLocation(documentAbsoluteIndex, - documentLineIndex, - documentCharacterOffsetIndex), + new SourceLocation(documentAbsoluteIndex, + documentLineIndex, + documentCharacterOffsetIndex), contentLength), generatedLocation: new MappingLocation( - new SourceLocation(generatedAbsoluteIndex, - generatedLineIndex, - generatedCharacterOffsetIndex), + new SourceLocation(generatedAbsoluteIndex, + generatedLineIndex, + generatedCharacterOffsetIndex), contentLength) ); } diff --git a/test/Microsoft.AspNet.Razor.Test/Generator/CodeTree/CSharpCodeBuilderTests.cs b/test/Microsoft.AspNet.Razor.Test/Generator/CodeTree/CSharpCodeBuilderTests.cs index 9286b4db7e..e5a04834c9 100644 --- a/test/Microsoft.AspNet.Razor.Test/Generator/CodeTree/CSharpCodeBuilderTests.cs +++ b/test/Microsoft.AspNet.Razor.Test/Generator/CodeTree/CSharpCodeBuilderTests.cs @@ -32,7 +32,7 @@ namespace Microsoft.AspNet.Razor.Test.Generator.CodeTree var result = codeBuilder.Build(); BaselineWriter.WriteBaseline( - @"test\Microsoft.AspNet.Razor.Test\TestFiles\CodeGenerator\CS\Output\CSharpCodeBuilder.cs", + @"test\Microsoft.AspNet.Razor.Test\TestFiles\CodeGenerator\CS\Output\CSharpCodeBuilder.cs", result.Code); var expectedOutput = TestFile.Create("TestFiles/CodeGenerator/CS/Output/CSharpCodeBuilder.cs").ReadAllText(); diff --git a/test/Microsoft.AspNet.Razor.Test/Generator/CodeTree/CSharpPaddingBuilderTests.cs b/test/Microsoft.AspNet.Razor.Test/Generator/CodeTree/CSharpPaddingBuilderTests.cs index 44286d6f9c..99c379a5a7 100644 --- a/test/Microsoft.AspNet.Razor.Test/Generator/CodeTree/CSharpPaddingBuilderTests.cs +++ b/test/Microsoft.AspNet.Razor.Test/Generator/CodeTree/CSharpPaddingBuilderTests.cs @@ -221,7 +221,7 @@ namespace Microsoft.AspNet.Razor.Test.Generator { Assert.True(spanIndex > 0); - var parser = new RazorParser(new CSharpCodeParser(), + var parser = new RazorParser(new CSharpCodeParser(), new HtmlMarkupParser(), tagHelperDescriptorResolver: null); diff --git a/test/Microsoft.AspNet.Razor.Test/Generator/CodeTree/CodeTreeBuilderTest.cs b/test/Microsoft.AspNet.Razor.Test/Generator/CodeTree/CodeTreeBuilderTest.cs index 905ae015b0..920da0c1b7 100644 --- a/test/Microsoft.AspNet.Razor.Test/Generator/CodeTree/CodeTreeBuilderTest.cs +++ b/test/Microsoft.AspNet.Razor.Test/Generator/CodeTree/CodeTreeBuilderTest.cs @@ -21,7 +21,7 @@ namespace Microsoft.AspNet.Razor var block = new ExpressionBlock(); var addTagHelperDirective = spanFactory.MetaCode(SyntaxConstants.CSharp.AddTagHelperKeyword + " "); - // Act + // Act builder.StartChunkBlock(block); builder.AddAddTagHelperChunk("some text", addTagHelperDirective); builder.EndChunkBlock(); @@ -45,7 +45,7 @@ namespace Microsoft.AspNet.Razor var block = new ExpressionBlock(); var removeTagHelperDirective = spanFactory.MetaCode(SyntaxConstants.CSharp.RemoveTagHelperKeyword + " "); - // Act + // Act builder.StartChunkBlock(block); builder.AddRemoveTagHelperChunk("some text", removeTagHelperDirective); builder.EndChunkBlock(); @@ -67,8 +67,8 @@ namespace Microsoft.AspNet.Razor var spanFactory = SpanFactory.CreateCsHtml(); var previousSpan = spanFactory.EmptyHtml().Builder.Build(); var builder = new CodeTreeBuilder(); - - // Act + + // Act builder.AddLiteralChunk("some text", previousSpan); // Assert @@ -87,7 +87,7 @@ namespace Microsoft.AspNet.Razor var newSpan = spanFactory.Markup("

").Builder.Build(); var builder = new CodeTreeBuilder(); - // Act + // Act builder.AddLiteralChunk("", previousSpan); builder.AddLiteralChunk("

", newSpan); @@ -110,7 +110,7 @@ namespace Microsoft.AspNet.Razor var literalSpan = spanFactory.Markup("

").Builder.Build(); var builder = new CodeTreeBuilder(); - // Act + // Act builder.AddStatementChunk("int a = 10;", codeSpan); builder.AddLiteralChunk("

", literalSpan); diff --git a/test/Microsoft.AspNet.Razor.Test/Generator/Compiler/CodeWriterTest.cs b/test/Microsoft.AspNet.Razor.Test/Generator/Compiler/CodeWriterTest.cs index 276e0172b4..55fd838233 100644 --- a/test/Microsoft.AspNet.Razor.Test/Generator/Compiler/CodeWriterTest.cs +++ b/test/Microsoft.AspNet.Razor.Test/Generator/Compiler/CodeWriterTest.cs @@ -91,7 +91,7 @@ namespace Microsoft.AspNet.Razor.Generator.Compiler var expected = new SourceLocation( absoluteIndex: 6 + newLine.Length + WriterNewLineLength, - lineIndex: 2, + lineIndex: 2, characterIndex: 0); Assert.Equal(expected, location); @@ -111,8 +111,8 @@ namespace Microsoft.AspNet.Razor.Generator.Compiler var location = writer.GetCurrentSourceLocation(); var expected = new SourceLocation( - absoluteIndex: 9 + newLine.Length + newLine.Length, - lineIndex: 2, + absoluteIndex: 9 + newLine.Length + newLine.Length, + lineIndex: 2, characterIndex: 2); Assert.Equal(expected, location); diff --git a/test/Microsoft.AspNet.Razor.Test/Generator/TagHelperTestBase.cs b/test/Microsoft.AspNet.Razor.Test/Generator/TagHelperTestBase.cs index 7b9f57626c..37cc1214f3 100644 --- a/test/Microsoft.AspNet.Razor.Test/Generator/TagHelperTestBase.cs +++ b/test/Microsoft.AspNet.Razor.Test/Generator/TagHelperTestBase.cs @@ -48,7 +48,7 @@ namespace Microsoft.AspNet.Razor.Test.Generator { if (directiveDescriptor.DirectiveType == TagHelperDirectiveType.RemoveTagHelper) { - // We don't yet support "typeName, assemblyName" for @removetaghelper in this test class. Will + // We don't yet support "typeName, assemblyName" for @removetaghelper in this test class. Will // add that ability and add the corresponding end-to-end test verification in: // https://github.com/aspnet/Razor/issues/222 descriptors = null; diff --git a/test/Microsoft.AspNet.Razor.Test/Parser/CSharp/CSharpBlockTest.cs b/test/Microsoft.AspNet.Razor.Test/Parser/CSharp/CSharpBlockTest.cs index 9631f7e09a..25f7d3ef67 100644 --- a/test/Microsoft.AspNet.Razor.Test/Parser/CSharp/CSharpBlockTest.cs +++ b/test/Microsoft.AspNet.Razor.Test/Parser/CSharp/CSharpBlockTest.cs @@ -148,7 +148,7 @@ namespace Microsoft.AspNet.Razor.Test.Parser.CSharp [Fact] public void ParseBlockSupportsLineCommentBetweenIfAndElseClause() { - SingleSpanBlockTest(@"if(foo) { bar(); } + SingleSpanBlockTest(@"if(foo) { bar(); } // Foo // Bar else { baz(); }", BlockType.Statement, SpanKind.Code, acceptedCharacters: AcceptedCharacters.None); @@ -176,10 +176,10 @@ else if(bar) { baz(); }", BlockType.Statement, SpanKind.Code); public void ParseBlockParsesElseIfBranchesOfIfStatement() { const string ifStatement = @"if(int i = 0; i < 10; new Foo { Bar = ""baz"" }) { - Debug.WriteLine(@""foo } bar""); + Debug.WriteLine(@""foo } bar""); }"; - const string elseIfBranch = @" else if(int i = 0; i < 10; new Foo { Bar = ""baz"" }) { - Debug.WriteLine(@""bar } baz""); + const string elseIfBranch = @" else if(int i = 0; i < 10; new Foo { Bar = ""baz"" }) { + Debug.WriteLine(@""bar } baz""); }"; const string document = ifStatement + elseIfBranch; @@ -190,10 +190,10 @@ else if(bar) { baz(); }", BlockType.Statement, SpanKind.Code); public void ParseBlockParsesMultipleElseIfBranchesOfIfStatement() { const string ifStatement = @"if(int i = 0; i < 10; new Foo { Bar = ""baz"" }) { - Debug.WriteLine(@""foo } bar""); + Debug.WriteLine(@""foo } bar""); }"; - const string elseIfBranch = @" else if(int i = 0; i < 10; new Foo { Bar = ""baz"" }) { - Debug.WriteLine(@""bar } baz""); + const string elseIfBranch = @" else if(int i = 0; i < 10; new Foo { Bar = ""baz"" }) { + Debug.WriteLine(@""bar } baz""); }"; const string document = ifStatement + elseIfBranch + elseIfBranch + elseIfBranch + elseIfBranch; SingleSpanBlockTest(document, BlockType.Statement, SpanKind.Code); @@ -203,10 +203,10 @@ else if(bar) { baz(); }", BlockType.Statement, SpanKind.Code); public void ParseBlockParsesMultipleElseIfBranchesOfIfStatementFollowedByOneElseBranch() { const string ifStatement = @"if(int i = 0; i < 10; new Foo { Bar = ""baz"" }) { - Debug.WriteLine(@""foo } bar""); + Debug.WriteLine(@""foo } bar""); }"; - const string elseIfBranch = @" else if(int i = 0; i < 10; new Foo { Bar = ""baz"" }) { - Debug.WriteLine(@""bar } baz""); + const string elseIfBranch = @" else if(int i = 0; i < 10; new Foo { Bar = ""baz"" }) { + Debug.WriteLine(@""bar } baz""); }"; const string elseBranch = @" else { Debug.WriteLine(@""bar } baz""); }"; const string document = ifStatement + elseIfBranch + elseIfBranch + elseBranch; @@ -218,10 +218,10 @@ else if(bar) { baz(); }", BlockType.Statement, SpanKind.Code); public void ParseBlockStopsParsingCodeAfterElseBranch() { const string ifStatement = @"if(int i = 0; i < 10; new Foo { Bar = ""baz"" }) { - Debug.WriteLine(@""foo } bar""); + Debug.WriteLine(@""foo } bar""); }"; - const string elseIfBranch = @" else if(int i = 0; i < 10; new Foo { Bar = ""baz"" }) { - Debug.WriteLine(@""bar } baz""); + const string elseIfBranch = @" else if(int i = 0; i < 10; new Foo { Bar = ""baz"" }) { + Debug.WriteLine(@""bar } baz""); }"; const string elseBranch = @" else { Debug.WriteLine(@""bar } baz""); }"; const string document = ifStatement + elseIfBranch + elseBranch + elseIfBranch; @@ -234,7 +234,7 @@ else if(bar) { baz(); }", BlockType.Statement, SpanKind.Code); public void ParseBlockStopsParsingIfIfStatementNotFollowedByElse() { const string document = @"if(int i = 0; i < 10; new Foo { Bar = ""baz"" }) { - Debug.WriteLine(@""foo } bar""); + Debug.WriteLine(@""foo } bar""); }"; SingleSpanBlockTest(document, BlockType.Statement, SpanKind.Code); @@ -245,7 +245,7 @@ else if(bar) { baz(); }", BlockType.Statement, SpanKind.Code); { // We don't want to be a full C# parser - If the else if is missing it's condition, the C# compiler can handle that, we have all the info we need to keep parsing const string ifBranch = @"if(int i = 0; i < 10; new Foo { Bar = ""baz"" }) { - Debug.WriteLine(@""foo } bar""); + Debug.WriteLine(@""foo } bar""); }"; const string elseIfBranch = @" else if { foo(); }"; const string document = ifBranch + elseIfBranch; @@ -292,7 +292,7 @@ else if(bar) { baz(); }", BlockType.Statement, SpanKind.Code); [Fact] public void ParseBlockSupportsLineCommentBetweenDoAndWhileClause() { - SingleSpanBlockTest(@"do { var foo = bar; } + SingleSpanBlockTest(@"do { var foo = bar; } // Foo // Bar while(true);", BlockType.Statement, SpanKind.Code, acceptedCharacters: AcceptedCharacters.None); @@ -449,7 +449,7 @@ while(true);", BlockType.Statement, SpanKind.Code, acceptedCharacters: AcceptedC [Fact] public void ParseBlockSupportsLineCommentBetweenTryAndFinallyClause() { - SingleSpanBlockTest(@"try { bar(); } + SingleSpanBlockTest(@"try { bar(); } // Foo // Bar finally { baz(); }", BlockType.Statement, SpanKind.Code, acceptedCharacters: AcceptedCharacters.None); @@ -483,8 +483,8 @@ catch(bar) { baz(); }", BlockType.Statement, SpanKind.Code); public void ParseBlockSupportsMarkupWithinTryClause() { RunSimpleWrappedMarkupTest( - prefix: "try {", - markup: "

Foo

", + prefix: "try {", + markup: "

Foo

", suffix: "}", expectedMarkup: new MarkupBlock( Factory.Markup(" "), @@ -504,8 +504,8 @@ catch(bar) { baz(); }", BlockType.Statement, SpanKind.Code); public void ParseBlockSupportsMarkupWithinCatchClause() { RunSimpleWrappedMarkupTest( - prefix: "try { var foo = new { } } catch(Foo Bar Baz) {", - markup: "

Foo

", + prefix: "try { var foo = new { } } catch(Foo Bar Baz) {", + markup: "

Foo

", suffix: "}", expectedMarkup: new MarkupBlock( Factory.Markup(" "), diff --git a/test/Microsoft.AspNet.Razor.Test/Parser/CSharp/CSharpSectionTest.cs b/test/Microsoft.AspNet.Razor.Test/Parser/CSharp/CSharpSectionTest.cs index 59cc2edcc2..f9d24555e4 100644 --- a/test/Microsoft.AspNet.Razor.Test/Parser/CSharp/CSharpSectionTest.cs +++ b/test/Microsoft.AspNet.Razor.Test/Parser/CSharp/CSharpSectionTest.cs @@ -284,7 +284,7 @@ namespace Microsoft.AspNet.Razor.Test.Parser.CSharp Factory.Markup("")), + Factory.Markup("")), Factory.Markup(" ")), Factory.MetaCode("}").Accepts(AcceptedCharacters.None)), Factory.EmptyHtml())); diff --git a/test/Microsoft.AspNet.Razor.Test/Parser/Html/HtmlBlockTest.cs b/test/Microsoft.AspNet.Razor.Test/Parser/Html/HtmlBlockTest.cs index 2ef4e2c06d..b71ea619f7 100644 --- a/test/Microsoft.AspNet.Razor.Test/Parser/Html/HtmlBlockTest.cs +++ b/test/Microsoft.AspNet.Razor.Test/Parser/Html/HtmlBlockTest.cs @@ -331,7 +331,7 @@ namespace Microsoft.AspNet.Razor.Test.Parser.Html new MarkupBlock( new MarkupTagBlock( Factory.Markup("").Accepts(AcceptedCharacters.None)), - Factory.Markup("bar"), + Factory.Markup("bar"), Factory.Markup("").Accepts(AcceptedCharacters.None), Factory.Markup("baz"), new MarkupTagBlock( diff --git a/test/Microsoft.AspNet.Razor.Test/Parser/Html/HtmlUrlAttributeTest.cs b/test/Microsoft.AspNet.Razor.Test/Parser/Html/HtmlUrlAttributeTest.cs index a09f4abd9c..ddd542e165 100644 --- a/test/Microsoft.AspNet.Razor.Test/Parser/Html/HtmlUrlAttributeTest.cs +++ b/test/Microsoft.AspNet.Razor.Test/Parser/Html/HtmlUrlAttributeTest.cs @@ -285,7 +285,7 @@ namespace Microsoft.AspNet.Razor.Test.Parser.Html .Accepts(AcceptedCharacters.NonWhiteSpace))), Factory.Markup("/Boz").With(new LiteralAttributeCodeGenerator(new LocationTagged(String.Empty, 49, 0, 49), new LocationTagged("/Boz", 49, 0, 49)))), Factory.Markup(" />")), - Factory.Markup(" ") + Factory.Markup(" ") ), Factory.MetaCode("}").Accepts(AcceptedCharacters.None)), Factory.EmptyHtml())); diff --git a/test/Microsoft.AspNet.Razor.Test/Parser/PartialParsing/PartialParsingTestBase.cs b/test/Microsoft.AspNet.Razor.Test/Parser/PartialParsing/PartialParsingTestBase.cs index b2af50374b..da4d90ce7c 100644 --- a/test/Microsoft.AspNet.Razor.Test/Parser/PartialParsing/PartialParsingTestBase.cs +++ b/test/Microsoft.AspNet.Razor.Test/Parser/PartialParsing/PartialParsingTestBase.cs @@ -58,12 +58,12 @@ namespace Microsoft.AspNet.Razor.Test.Parser.PartialParsing { return new RazorEngineHost(new TLanguage()) { - GeneratedClassContext = new GeneratedClassContext("Execute", - "Write", - "WriteLiteral", - "WriteTo", - "WriteLiteralTo", - "Template", + GeneratedClassContext = new GeneratedClassContext("Execute", + "Write", + "WriteLiteral", + "WriteTo", + "WriteLiteralTo", + "Template", "DefineSection", new GeneratedTagHelperContext()), DesignTimeMode = true diff --git a/test/Microsoft.AspNet.Razor.Test/TagHelpers/TagHelperParseTreeRewriterTest.cs b/test/Microsoft.AspNet.Razor.Test/TagHelpers/TagHelperParseTreeRewriterTest.cs index 33ef7c5139..f6d4d52662 100644 --- a/test/Microsoft.AspNet.Razor.Test/TagHelpers/TagHelperParseTreeRewriterTest.cs +++ b/test/Microsoft.AspNet.Razor.Test/TagHelpers/TagHelperParseTreeRewriterTest.cs @@ -1181,9 +1181,9 @@ namespace Microsoft.AspNet.Razor.Test.TagHelpers return new TagHelperDescriptorProvider(descriptors); } - public override ParserContext CreateParserContext(ITextDocument input, - ParserBase codeParser, - ParserBase markupParser, + public override ParserContext CreateParserContext(ITextDocument input, + ParserBase codeParser, + ParserBase markupParser, ParserErrorSink errorSink) { return base.CreateParserContext(input, codeParser, markupParser, errorSink); diff --git a/test/Microsoft.AspNet.Razor.Test/Text/TextChangeTest.cs b/test/Microsoft.AspNet.Razor.Test/Text/TextChangeTest.cs index bc89d16e60..fc6ab3839b 100644 --- a/test/Microsoft.AspNet.Razor.Test/Text/TextChangeTest.cs +++ b/test/Microsoft.AspNet.Razor.Test/Text/TextChangeTest.cs @@ -77,7 +77,7 @@ namespace Microsoft.AspNet.Razor.Test.Text [Fact] public void TestIsDelete() { - // Arrange + // Arrange var oldBuffer = new Mock().Object; var newBuffer = new Mock().Object; var change = new TextChange(0, 1, oldBuffer, 0, newBuffer); @@ -89,7 +89,7 @@ namespace Microsoft.AspNet.Razor.Test.Text [Fact] public void TestDeleteCreatesTheRightSizeChange() { - // Arrange + // Arrange var oldBuffer = new Mock().Object; var newBuffer = new Mock().Object; var change = new TextChange(0, 1, oldBuffer, 0, newBuffer); @@ -102,7 +102,7 @@ namespace Microsoft.AspNet.Razor.Test.Text [Fact] public void TestIsInsert() { - // Arrange + // Arrange var oldBuffer = new Mock().Object; var newBuffer = new Mock().Object; var change = new TextChange(0, 0, oldBuffer, 35, newBuffer); @@ -114,7 +114,7 @@ namespace Microsoft.AspNet.Razor.Test.Text [Fact] public void TestInsertCreateTheRightSizeChange() { - // Arrange + // Arrange var oldBuffer = new Mock().Object; var newBuffer = new Mock().Object; var change = new TextChange(0, 0, oldBuffer, 1, newBuffer); @@ -127,7 +127,7 @@ namespace Microsoft.AspNet.Razor.Test.Text [Fact] public void TestIsReplace() { - // Arrange + // Arrange var oldBuffer = new Mock().Object; var newBuffer = new Mock().Object; var change = new TextChange(0, 5, oldBuffer, 10, newBuffer); @@ -139,7 +139,7 @@ namespace Microsoft.AspNet.Razor.Test.Text [Fact] public void ReplaceCreatesTheRightSizeChange() { - // Arrange + // Arrange var oldBuffer = new Mock().Object; var newBuffer = new Mock().Object; var change = new TextChange(0, 5, oldBuffer, 10, newBuffer); @@ -152,7 +152,7 @@ namespace Microsoft.AspNet.Razor.Test.Text [Fact] public void ReplaceCreatesTheRightSizeChange1() { - // Arrange + // Arrange var oldBuffer = new Mock().Object; var newBuffer = new Mock().Object; var change = new TextChange(0, 5, oldBuffer, 1, newBuffer);