Apply VS' FormatDocument and RemoveAndSort to all *.cs files

- #EngineeringDay

Did not change any files under test/Microsoft.AspNet.Razor.Test/TestFiles
- avoiding need to redo hashes
This commit is contained in:
Doug Bunting 2014-11-20 14:43:16 -08:00
parent 0f724a51df
commit 26034fb5b2
42 changed files with 204 additions and 215 deletions

View File

@ -28,11 +28,11 @@ namespace Microsoft.AspNet.Razor.Runtime.TagHelpers
/// <param name="output">A stateful HTML element used to generate an HTML tag.</param>
/// <returns>A <see cref="Task"/> that on completion updates the <paramref name="output"/>.</returns>
/// <remarks>By default this calls into <see cref="Process"/>.</remarks>.
#pragma warning disable 1998
#pragma warning disable 1998
public virtual async Task ProcessAsync(TagHelperContext context, TagHelperOutput output)
{
Process(context, output);
}
#pragma warning restore 1998
#pragma warning restore 1998
}
}

View File

@ -1,7 +1,6 @@
// 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.Diagnostics.CodeAnalysis;
namespace Microsoft.AspNet.Razor.Generator
{

View File

@ -6,7 +6,8 @@ namespace Microsoft.AspNet.Razor.Generator.Compiler.CSharp
public class CSharpBaseTypeVisitor : CodeVisitor<CSharpCodeWriter>
{
public CSharpBaseTypeVisitor(CSharpCodeWriter writer, CodeBuilderContext context)
: base(writer, context) { }
: base(writer, context)
{ }
public string CurrentBaseType { get; set; }

View File

@ -8,7 +8,8 @@ namespace Microsoft.AspNet.Razor.Generator.Compiler.CSharp
public class CSharpClassAttributeVisitor : CodeVisitor<CSharpCodeWriter>
{
public CSharpClassAttributeVisitor(CSharpCodeWriter writer, CodeBuilderContext context)
: base(writer, context) { }
: base(writer, context)
{ }
protected override void Visit(SessionStateChunk chunk)
{

View File

@ -6,7 +6,6 @@ using System.Globalization;
using System.Linq;
using Microsoft.AspNet.Razor.Parser.SyntaxTree;
using Microsoft.AspNet.Razor.Text;
using Microsoft.AspNet.Razor.TagHelpers;
namespace Microsoft.AspNet.Razor.Generator.Compiler.CSharp
{

View File

@ -53,7 +53,7 @@ namespace Microsoft.AspNet.Razor.Generator.Compiler
{
Visit((StatementChunk)chunk);
}
else if(chunk is TagHelperChunk)
else if (chunk is TagHelperChunk)
{
Visit((TagHelperChunk)chunk);
}
@ -65,7 +65,7 @@ namespace Microsoft.AspNet.Razor.Generator.Compiler
{
Visit((RemoveTagHelperChunk)chunk);
}
else if(chunk is SetLayoutChunk)
else if (chunk is SetLayoutChunk)
{
Visit((SetLayoutChunk)chunk);
}
@ -81,7 +81,7 @@ namespace Microsoft.AspNet.Razor.Generator.Compiler
{
Visit((UsingChunk)chunk);
}
else if(chunk is HelperChunk)
else if (chunk is HelperChunk)
{
Visit((HelperChunk)chunk);
}
@ -113,7 +113,7 @@ namespace Microsoft.AspNet.Razor.Generator.Compiler
{
Visit((ChunkBlock)chunk);
}
else if(chunk is SessionStateChunk)
else if (chunk is SessionStateChunk)
{
Visit((SessionStateChunk)chunk);
}

View File

@ -6,7 +6,8 @@ namespace Microsoft.AspNet.Razor.Generator.Compiler
public class CodeVisitor<T> : ChunkVisitor<T> where T : CodeWriter
{
public CodeVisitor(T writer, CodeBuilderContext context)
: base(writer, context) { }
: base(writer, context)
{ }
protected override void Visit(LiteralChunk chunk)
{

View File

@ -5,7 +5,6 @@ using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Diagnostics.CodeAnalysis;
using System.Globalization;
using System.Linq;
using Microsoft.AspNet.Razor.Editor;
using Microsoft.AspNet.Razor.Generator;

View File

@ -4,7 +4,6 @@
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Globalization;
using System.Linq;
using Microsoft.AspNet.Razor.Generator;
using Microsoft.AspNet.Razor.Parser.SyntaxTree;

View File

@ -1,7 +1,6 @@
// 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.AspNet.Razor.Parser.SyntaxTree;
namespace Microsoft.AspNet.Razor.Parser
{

View File

@ -116,7 +116,7 @@ namespace Microsoft.AspNet.Razor.Parser
public static bool IsCombining(char value)
{
UnicodeCategory cat= CharUnicodeInfo.GetUnicodeCategory(value);
UnicodeCategory cat = CharUnicodeInfo.GetUnicodeCategory(value);
return cat == UnicodeCategory.SpacingCombiningMark || cat == UnicodeCategory.NonSpacingMark;

View File

@ -3,7 +3,6 @@
using System.Collections.Generic;
using Microsoft.AspNet.Razor.Parser.SyntaxTree;
using Microsoft.AspNet.Razor.Text;
namespace Microsoft.AspNet.Razor.Parser
{

View File

@ -1,9 +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 System.Collections.Generic;
using System.Linq;
using Microsoft.AspNet.Razor.Generator;
using Microsoft.AspNet.Razor.Parser.SyntaxTree;
using Microsoft.AspNet.Razor.TagHelpers;

View File

@ -3,7 +3,6 @@
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Globalization;
using System.Linq;
using Microsoft.AspNet.Razor.Parser.SyntaxTree;

View File

@ -5,7 +5,6 @@ using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Diagnostics.CodeAnalysis;
using System.Globalization;
using System.Linq;
using Microsoft.AspNet.Razor.Editor;
using Microsoft.AspNet.Razor.Generator;

View File

@ -2,7 +2,6 @@
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System;
using Microsoft.Internal.Web.Utils;
namespace Microsoft.AspNet.Razor
{

View File

@ -9,7 +9,6 @@ using System.IO;
using Microsoft.AspNet.Razor.Editor;
using Microsoft.AspNet.Razor.Parser.SyntaxTree;
using Microsoft.AspNet.Razor.Text;
using Microsoft.Internal.Web.Utils;
namespace Microsoft.AspNet.Razor
{

View File

@ -4,14 +4,12 @@
using System;
using System.Diagnostics;
using System.Diagnostics.CodeAnalysis;
using System.Globalization;
using System.IO;
using System.Security.Cryptography;
using System.Text;
using System.Threading;
using Microsoft.AspNet.Razor.Generator;
using Microsoft.AspNet.Razor.Generator.Compiler;
using Microsoft.AspNet.Razor.Generator.Compiler.CSharp;
using Microsoft.AspNet.Razor.Parser;
using Microsoft.AspNet.Razor.Text;

View File

@ -4,7 +4,6 @@
using System;
using System.Collections.Generic;
using System.Linq;
using Microsoft.Internal.Web.Utils;
namespace Microsoft.AspNet.Razor.TagHelpers
{

View File

@ -1,7 +1,6 @@
// 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 System.Collections.Generic;
namespace Microsoft.AspNet.Razor.TagHelpers

View File

@ -6,7 +6,6 @@ using System.Diagnostics;
using System.Globalization;
using System.Text;
using Microsoft.AspNet.Razor.Parser.SyntaxTree;
using Microsoft.Internal.Web.Utils;
namespace Microsoft.AspNet.Razor.Text
{

View File

@ -4,7 +4,6 @@
using System;
using System.Diagnostics;
using System.Diagnostics.CodeAnalysis;
using System.Globalization;
using Microsoft.AspNet.Razor.Text;
using Microsoft.AspNet.Razor.Tokenizer.Symbols;

View File

@ -6,7 +6,6 @@ using System.Threading;
using System.Web.WebPages.TestUtils;
using Microsoft.AspNet.Razor.Editor;
using Microsoft.AspNet.Razor.Parser;
using Microsoft.AspNet.Razor.Parser.SyntaxTree;
using Microsoft.AspNet.Razor.Test.Framework;
using Microsoft.AspNet.Razor.Test.Utils;
using Microsoft.AspNet.Razor.Text;

View File

@ -1,7 +1,6 @@
// 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.AspNet.Razor.Parser.SyntaxTree;
namespace Microsoft.AspNet.Razor.Test.Framework

View File

@ -2,7 +2,6 @@
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System.Collections.Generic;
using System.Linq;
using Microsoft.AspNet.Razor.Generator;
using Microsoft.AspNet.Razor.Parser.SyntaxTree;
using Microsoft.AspNet.Razor.Parser.TagHelpers;

View File

@ -128,31 +128,38 @@ namespace Microsoft.AspNet.Razor.Test.Framework
expectedErrors ?? new RazorError[0]);
}
protected virtual void ParseDocumentTest(string document) {
protected virtual void ParseDocumentTest(string document)
{
ParseDocumentTest(document, null, false);
}
protected virtual void ParseDocumentTest(string document, Block expectedRoot) {
protected virtual void ParseDocumentTest(string document, Block expectedRoot)
{
ParseDocumentTest(document, expectedRoot, false, null);
}
protected virtual void ParseDocumentTest(string document, Block expectedRoot, params RazorError[] expectedErrors) {
protected virtual void ParseDocumentTest(string document, Block expectedRoot, params RazorError[] expectedErrors)
{
ParseDocumentTest(document, expectedRoot, false, expectedErrors);
}
protected virtual void ParseDocumentTest(string document, bool designTimeParser) {
protected virtual void ParseDocumentTest(string document, bool designTimeParser)
{
ParseDocumentTest(document, null, designTimeParser);
}
protected virtual void ParseDocumentTest(string document, Block expectedRoot, bool designTimeParser) {
protected virtual void ParseDocumentTest(string document, Block expectedRoot, bool designTimeParser)
{
ParseDocumentTest(document, expectedRoot, designTimeParser, null);
}
protected virtual void ParseDocumentTest(string document, Block expectedRoot, bool designTimeParser, params RazorError[] expectedErrors) {
protected virtual void ParseDocumentTest(string document, Block expectedRoot, bool designTimeParser, params RazorError[] expectedErrors)
{
RunParseTest(document, parser => parser.ParseDocument, expectedRoot, expectedErrors, designTimeParser, parserSelector: c => c.MarkupParser);
}
protected virtual ParserResults ParseDocument(string document) {
protected virtual ParserResults ParseDocument(string document)
{
return ParseDocument(document, designTimeParser: false, errorSink: null);
}
@ -172,11 +179,13 @@ namespace Microsoft.AspNet.Razor.Test.Framework
errorSink: errorSink);
}
protected virtual ParserResults ParseBlock(string document) {
protected virtual ParserResults ParseBlock(string document)
{
return ParseBlock(document, designTimeParser: false);
}
protected virtual ParserResults ParseBlock(string document, bool designTimeParser) {
protected virtual ParserResults ParseBlock(string document, bool designTimeParser)
{
return RunParse(document, parser => parser.ParseBlock, designTimeParser);
}

View File

@ -2,7 +2,9 @@
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System.Collections.Generic;
#if ASPNETCORE50
using System.Reflection;
#endif
using Microsoft.AspNet.Razor.Generator.Compiler;
using Microsoft.AspNet.Razor.TagHelpers;
using Xunit;

View File

@ -1,12 +1,12 @@
// 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.Linq;
using Microsoft.AspNet.Razor.Generator.Compiler;
using Microsoft.AspNet.Razor.Parser;
using Microsoft.AspNet.Razor.Parser.SyntaxTree;
using Microsoft.AspNet.Razor.Test.Framework;
using System.Linq;
using Xunit;
using Microsoft.AspNet.Razor.Parser;
namespace Microsoft.AspNet.Razor
{

View File

@ -1,7 +1,6 @@
// 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 Xunit;
namespace Microsoft.AspNet.Razor.Test.Generator

View File

@ -2,9 +2,9 @@
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System;
using System.Collections.Generic;
using Microsoft.AspNet.Razor.Text;
using Xunit;
using System.Collections.Generic;
namespace Microsoft.AspNet.Razor.Generator.Compiler
{

View File

@ -6,7 +6,6 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web.WebPages.TestUtils;
using Microsoft.AspNet.Razor.Generator;
using Microsoft.AspNet.Razor.Generator.Compiler;
using Microsoft.AspNet.Razor.Parser.SyntaxTree;
@ -138,7 +137,7 @@ namespace Microsoft.AspNet.Razor.Test.Generator
var engine = new RazorTemplateEngine(host);
if(templateEngineConfig != null)
if (templateEngineConfig != null)
{
engine = templateEngineConfig(engine);
}

View File

@ -2,7 +2,9 @@
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System;
#if ASPNETCORE50
using System.Reflection;
#endif
using Microsoft.AspNet.Razor.Generator;
using Microsoft.AspNet.Razor.Generator.Compiler;
using Microsoft.AspNet.Razor.Generator.Compiler.CSharp;

View File

@ -1,7 +1,6 @@
// 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.AspNet.Razor.Generator;
using Microsoft.AspNet.Razor.Parser;
using Microsoft.AspNet.Razor.Parser.SyntaxTree;
using Microsoft.AspNet.Razor.Test.Framework;

View File

@ -1,7 +1,6 @@
// 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 System.Linq;
using Microsoft.AspNet.Razor.Editor;
using Microsoft.AspNet.Razor.Generator;

View File

@ -3,7 +3,6 @@
using System;
using Microsoft.AspNet.Razor.Parser;
using Microsoft.AspNet.Razor.Parser.SyntaxTree;
using Microsoft.AspNet.Razor.Test.Framework;
using Xunit;

View File

@ -13,7 +13,6 @@ using Microsoft.AspNet.Razor.Generator.Compiler.CSharp;
using Microsoft.AspNet.Razor.Parser;
using Microsoft.AspNet.Razor.Text;
using Moq;
using Moq.Protected;
using Xunit;
namespace Microsoft.AspNet.Razor.Test