Move more classes into Internal namespaces.

- These classes aren't needed as top level public classes.

#779
This commit is contained in:
N. Taylor Mullen 2016-06-10 10:50:34 -07:00
parent ccba161447
commit e20d18636e
67 changed files with 122 additions and 107 deletions

View File

@ -3,12 +3,13 @@
using System;
using System.Collections.Generic;
using Microsoft.AspNetCore.Razor.Editor;
using Microsoft.AspNetCore.Razor.Parser;
using Microsoft.AspNetCore.Razor.Parser.SyntaxTree;
using Microsoft.AspNetCore.Razor.Text;
using Microsoft.AspNetCore.Razor.Tokenizer.Symbols;
using Microsoft.Extensions.Internal;
namespace Microsoft.AspNetCore.Razor.Parser.SyntaxTree
namespace Microsoft.AspNetCore.Razor.Editor
{
public class AutoCompleteEditHandler : SpanEditHandler
{

View File

@ -9,9 +9,9 @@ using System.IO;
using System.Linq;
using System.Threading;
using Microsoft.AspNetCore.Razor.CodeGenerators;
using Microsoft.AspNetCore.Razor.Parser;
using Microsoft.AspNetCore.Razor.Parser.SyntaxTree;
using Microsoft.AspNetCore.Razor.Text;
using Microsoft.AspNetCore.Razor.Utils;
namespace Microsoft.AspNetCore.Razor.Editor
{

View File

@ -8,6 +8,7 @@ using System.Globalization;
using System.IO;
using System.Linq;
using Microsoft.AspNetCore.Razor.Parser;
using Microsoft.AspNetCore.Razor.Parser.Internal;
using Microsoft.AspNetCore.Razor.Parser.SyntaxTree;
using Microsoft.AspNetCore.Razor.Text;
using Microsoft.AspNetCore.Razor.Tokenizer.Symbols;

View File

@ -4,8 +4,10 @@
using System;
using System.Diagnostics;
using Microsoft.AspNetCore.Razor.Chunks.Generators;
using Microsoft.AspNetCore.Razor.Editor;
using Microsoft.AspNetCore.Razor.Parser.SyntaxTree;
using Microsoft.AspNetCore.Razor.Tokenizer.Symbols;
using Microsoft.AspNetCore.Razor.Tokenizer.Symbols.Internal;
namespace Microsoft.AspNetCore.Razor.Parser
{

View File

@ -2,6 +2,7 @@
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using Microsoft.AspNetCore.Razor.Tokenizer.Symbols;
using Microsoft.AspNetCore.Razor.Tokenizer.Symbols.Internal;
namespace Microsoft.AspNetCore.Razor.Parser
{

View File

@ -8,6 +8,7 @@ using System.Linq;
using Microsoft.AspNetCore.Razor.Chunks.Generators;
using Microsoft.AspNetCore.Razor.Parser.SyntaxTree;
using Microsoft.AspNetCore.Razor.Tokenizer.Symbols;
using Microsoft.AspNetCore.Razor.Tokenizer.Symbols.Internal;
namespace Microsoft.AspNetCore.Razor.Parser
{

View File

@ -7,7 +7,7 @@ using System.Diagnostics;
using Microsoft.AspNetCore.Razor.Chunks.Generators;
using Microsoft.AspNetCore.Razor.Editor;
using Microsoft.AspNetCore.Razor.Parser.SyntaxTree;
using Microsoft.AspNetCore.Razor.Tokenizer;
using Microsoft.AspNetCore.Razor.Tokenizer.Internal;
using Microsoft.AspNetCore.Razor.Tokenizer.Symbols;
namespace Microsoft.AspNetCore.Razor.Parser

View File

@ -4,7 +4,7 @@
using System.Collections.Generic;
using System.Diagnostics;
using Microsoft.AspNetCore.Razor.Text;
using Microsoft.AspNetCore.Razor.Tokenizer;
using Microsoft.AspNetCore.Razor.Tokenizer.Internal;
using Microsoft.AspNetCore.Razor.Tokenizer.Symbols;
namespace Microsoft.AspNetCore.Razor.Parser

View File

@ -4,10 +4,11 @@
using System;
using System.Diagnostics;
using System.Linq;
using Microsoft.AspNetCore.Razor.Editor;
using Microsoft.AspNetCore.Razor.Chunks.Generators;
using Microsoft.AspNetCore.Razor.Editor;
using Microsoft.AspNetCore.Razor.Parser.Internal;
using Microsoft.AspNetCore.Razor.Parser.SyntaxTree;
using Microsoft.AspNetCore.Razor.Tokenizer;
using Microsoft.AspNetCore.Razor.Tokenizer.Internal;
namespace Microsoft.AspNetCore.Razor.Parser
{

View File

@ -3,7 +3,7 @@
using System;
namespace Microsoft.AspNetCore.Razor.Utils
namespace Microsoft.AspNetCore.Razor.Parser
{
internal class DisposableAction : IDisposable
{

View File

@ -5,7 +5,7 @@ using System;
using System.Threading;
using Microsoft.AspNetCore.Razor.Parser.SyntaxTree;
namespace Microsoft.AspNetCore.Razor.Parser
namespace Microsoft.AspNetCore.Razor.Parser.Internal
{
public class CallbackVisitor : ParserVisitor
{

View File

@ -1,14 +1,14 @@
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System;
using System.Collections.Generic;
using System.Diagnostics;
using Microsoft.AspNetCore.Razor.Text;
using Microsoft.AspNetCore.Razor.Tokenizer;
using Microsoft.AspNetCore.Razor.Tokenizer.Internal;
using Microsoft.AspNetCore.Razor.Tokenizer.Symbols;
using Microsoft.AspNetCore.Razor.Tokenizer.Symbols.Internal;
namespace Microsoft.AspNetCore.Razor.Parser
namespace Microsoft.AspNetCore.Razor.Parser.Internal
{
public class HtmlLanguageCharacteristics : LanguageCharacteristics<HtmlTokenizer, HtmlSymbol, HtmlSymbolType>
{

View File

@ -10,8 +10,9 @@ using Microsoft.AspNetCore.Razor.Editor;
using Microsoft.AspNetCore.Razor.Parser.SyntaxTree;
using Microsoft.AspNetCore.Razor.Text;
using Microsoft.AspNetCore.Razor.Tokenizer.Symbols;
using Microsoft.AspNetCore.Razor.Tokenizer.Symbols.Internal;
namespace Microsoft.AspNetCore.Razor.Parser
namespace Microsoft.AspNetCore.Razor.Parser.Internal
{
public partial class HtmlMarkupParser
{

View File

@ -7,8 +7,9 @@ using System.Linq;
using Microsoft.AspNetCore.Razor.Chunks.Generators;
using Microsoft.AspNetCore.Razor.Parser.SyntaxTree;
using Microsoft.AspNetCore.Razor.Tokenizer.Symbols;
using Microsoft.AspNetCore.Razor.Tokenizer.Symbols.Internal;
namespace Microsoft.AspNetCore.Razor.Parser
namespace Microsoft.AspNetCore.Razor.Parser.Internal
{
public partial class HtmlMarkupParser
{

View File

@ -5,8 +5,9 @@ using System;
using System.Diagnostics;
using Microsoft.AspNetCore.Razor.Parser.SyntaxTree;
using Microsoft.AspNetCore.Razor.Tokenizer.Symbols;
using Microsoft.AspNetCore.Razor.Tokenizer.Symbols.Internal;
namespace Microsoft.AspNetCore.Razor.Parser
namespace Microsoft.AspNetCore.Razor.Parser.Internal
{
public partial class HtmlMarkupParser
{

View File

@ -5,10 +5,10 @@ using System;
using System.Collections.Generic;
using Microsoft.AspNetCore.Razor.Chunks.Generators;
using Microsoft.AspNetCore.Razor.Parser.SyntaxTree;
using Microsoft.AspNetCore.Razor.Tokenizer;
using Microsoft.AspNetCore.Razor.Tokenizer.Symbols;
using Microsoft.AspNetCore.Razor.Tokenizer.Internal;
using Microsoft.AspNetCore.Razor.Tokenizer.Symbols.Internal;
namespace Microsoft.AspNetCore.Razor.Parser
namespace Microsoft.AspNetCore.Razor.Parser.Internal
{
public partial class HtmlMarkupParser : TokenizerBackedParser<HtmlTokenizer, HtmlSymbol, HtmlSymbolType>
{

View File

@ -4,6 +4,7 @@
using System;
using System.Linq;
using Microsoft.AspNetCore.Razor.Chunks.Generators;
using Microsoft.AspNetCore.Razor.Parser.Internal;
using Microsoft.AspNetCore.Razor.Parser.SyntaxTree;
namespace Microsoft.AspNetCore.Razor.Parser

View File

@ -8,9 +8,9 @@ using System.Globalization;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Razor.Compilation.TagHelpers;
using Microsoft.AspNetCore.Razor.Parser.Internal;
using Microsoft.AspNetCore.Razor.Parser.SyntaxTree;
using Microsoft.AspNetCore.Razor.Text;
using Microsoft.AspNetCore.Razor.Utils;
namespace Microsoft.AspNetCore.Razor.Parser
{

View File

@ -8,6 +8,7 @@ using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Razor.Compilation.TagHelpers;
using Microsoft.AspNetCore.Razor.Parser.Internal;
using Microsoft.AspNetCore.Razor.Parser.SyntaxTree;
using Microsoft.AspNetCore.Razor.Parser.TagHelpers;
using Microsoft.AspNetCore.Razor.Parser.TagHelpers.Internal;

View File

@ -7,9 +7,10 @@ using System.Diagnostics;
using System.Linq;
using Microsoft.AspNetCore.Razor.Chunks.Generators;
using Microsoft.AspNetCore.Razor.Compilation.TagHelpers;
using Microsoft.AspNetCore.Razor.Parser.Internal;
using Microsoft.AspNetCore.Razor.Parser.SyntaxTree;
using Microsoft.AspNetCore.Razor.TagHelpers;
using Microsoft.AspNetCore.Razor.Tokenizer.Symbols;
using Microsoft.AspNetCore.Razor.Tokenizer.Symbols.Internal;
namespace Microsoft.AspNetCore.Razor.Parser.TagHelpers.Internal
{

View File

@ -9,7 +9,7 @@ using System.Text;
using Microsoft.AspNetCore.Razor.Compilation.TagHelpers;
using Microsoft.AspNetCore.Razor.Parser.SyntaxTree;
using Microsoft.AspNetCore.Razor.TagHelpers;
using Microsoft.AspNetCore.Razor.Tokenizer.Symbols;
using Microsoft.AspNetCore.Razor.Tokenizer.Symbols.Internal;
namespace Microsoft.AspNetCore.Razor.Parser.TagHelpers.Internal
{

View File

@ -7,10 +7,10 @@ using System.Diagnostics;
using System.Linq;
using Microsoft.AspNetCore.Razor.Chunks.Generators;
using Microsoft.AspNetCore.Razor.Editor;
using Microsoft.AspNetCore.Razor.Parser.Internal;
using Microsoft.AspNetCore.Razor.Parser.SyntaxTree;
using Microsoft.AspNetCore.Razor.Tokenizer;
using Microsoft.AspNetCore.Razor.Tokenizer.Symbols;
using Microsoft.AspNetCore.Razor.Utils;
namespace Microsoft.AspNetCore.Razor.Parser
{

View File

@ -4,6 +4,7 @@
using System;
using System.Collections.Generic;
using System.Linq;
using Microsoft.AspNetCore.Razor.Parser.Internal;
using Microsoft.AspNetCore.Razor.Parser.SyntaxTree;
namespace Microsoft.AspNetCore.Razor.Parser
@ -24,36 +25,6 @@ namespace Microsoft.AspNetCore.Razor.Parser
return block.Type == BlockType.Expression && Parent != null;
}
//public override void VisitBlock(Block block)
//{
// BlockBuilder parent = null;
// if (_blocks.Count > 0)
// {
// parent = _blocks.Peek();
// }
// BlockBuilder newBlock = new BlockBuilder(block);
// newBlock.Children.Clear();
// _blocks.Push(newBlock);
// if (block.Type == BlockType.Expression && parent != null)
// {
// VisitExpressionBlock(block, parent);
// }
// else
// {
// base.VisitBlock(block);
// }
// if (_blocks.Count > 1)
// {
// parent.Children.Add(_blocks.Pop().Build());
// }
//}
//public override void VisitSpan(Span span)
//{
// Debug.Assert(_blocks.Count > 0);
// _blocks.Peek().Children.Add(span);
//}
protected override SyntaxTreeNode RewriteBlock(BlockBuilder parent, Block block)
{
var newBlock = new BlockBuilder(block);

View File

@ -7,6 +7,7 @@ using Microsoft.AspNetCore.Razor.Chunks.Generators;
using Microsoft.AspNetCore.Razor.CodeGenerators;
using Microsoft.AspNetCore.Razor.Compilation.TagHelpers;
using Microsoft.AspNetCore.Razor.Parser;
using Microsoft.AspNetCore.Razor.Parser.Internal;
namespace Microsoft.AspNetCore.Razor
{

View File

@ -10,10 +10,4 @@ namespace Microsoft.AspNetCore.Razor.Text
int Read();
int Peek();
}
// TextBuffer with Location tracking
public interface ITextDocument : ITextBuffer
{
SourceLocation Location { get; }
}
}

View File

@ -1,11 +1,10 @@
// Copyright (c) .NET Foundation. All rights reserved.
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
namespace Microsoft.AspNetCore.Razor.Text
{
public enum TextChangeType
public interface ITextDocument : ITextBuffer
{
Insert,
Remove
SourceLocation Location { get; }
}
}

View File

@ -4,7 +4,7 @@
using System;
using System.Globalization;
namespace Microsoft.AspNetCore.Razor.Tokenizer
namespace Microsoft.AspNetCore.Razor.Tokenizer.Internal
{
public static class CSharpHelpers
{

View File

@ -8,7 +8,7 @@ using Microsoft.AspNetCore.Razor.Parser;
using Microsoft.AspNetCore.Razor.Text;
using Microsoft.AspNetCore.Razor.Tokenizer.Symbols;
namespace Microsoft.AspNetCore.Razor.Tokenizer
namespace Microsoft.AspNetCore.Razor.Tokenizer.Internal
{
public class CSharpTokenizer : Tokenizer<CSharpSymbol, CSharpSymbolType>
{

View File

@ -1,14 +1,13 @@
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System;
using System.Collections.Generic;
using System.Diagnostics;
using Microsoft.AspNetCore.Razor.Parser;
using Microsoft.AspNetCore.Razor.Text;
using Microsoft.AspNetCore.Razor.Tokenizer.Symbols;
using Microsoft.AspNetCore.Razor.Tokenizer.Symbols.Internal;
namespace Microsoft.AspNetCore.Razor.Tokenizer
namespace Microsoft.AspNetCore.Razor.Tokenizer.Internal
{
// Tokenizer _loosely_ based on http://dev.w3.org/html5/spec/Overview.html#tokenization
public class HtmlTokenizer : Tokenizer<HtmlSymbol, HtmlSymbolType>

View File

@ -5,7 +5,7 @@ using System;
using System.Collections.Generic;
using System.Linq;
namespace Microsoft.AspNetCore.Razor.Tokenizer.Symbols
namespace Microsoft.AspNetCore.Razor.Tokenizer.Symbols.Internal
{
public class HtmlSymbol : SymbolBase<HtmlSymbolType>
{

View File

@ -0,0 +1,25 @@
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
namespace Microsoft.AspNetCore.Razor.Tokenizer.Symbols.Internal
{
public static class HtmlSymbolExtensions
{
/// <summary>
/// Converts the generic <see cref="IEnumerable{ISymbol}"/> to a <see cref="IEnumerable{HtmlSymbol}"/> and
/// finds the first <see cref="HtmlSymbol"/> with type <paramref name="type"/>.
/// </summary>
/// <param name="symbols">The <see cref="IEnumerable{ISymbol}"/> instance this method extends.</param>
/// <param name="type">The <see cref="HtmlSymbolType"/> to search for.</param>
/// <returns>The first <see cref="HtmlSymbol"/> of type <paramref name="type"/>.</returns>
public static HtmlSymbol FirstHtmlSymbolAs(this IEnumerable<ISymbol> symbols, HtmlSymbolType type)
{
return symbols.OfType<HtmlSymbol>().FirstOrDefault(sym => (type & sym.Type) == sym.Type);
}
}
}

View File

@ -3,7 +3,7 @@
using System;
namespace Microsoft.AspNetCore.Razor.Tokenizer.Symbols
namespace Microsoft.AspNetCore.Razor.Tokenizer.Symbols.Internal
{
[Flags]
public enum HtmlSymbolType

View File

@ -37,17 +37,5 @@ namespace Microsoft.AspNetCore.Razor.Tokenizer.Symbols
{
return new LocationTagged<string>(symbol.Content, symbol.Start);
}
/// <summary>
/// Converts the generic <see cref="IEnumerable{ISymbol}"/> to a <see cref="IEnumerable{HtmlSymbol}"/> and
/// finds the first <see cref="HtmlSymbol"/> with type <paramref name="type"/>.
/// </summary>
/// <param name="symbols">The <see cref="IEnumerable{ISymbol}"/> instance this method extends.</param>
/// <param name="type">The <see cref="HtmlSymbolType"/> to search for.</param>
/// <returns>The first <see cref="HtmlSymbol"/> of type <paramref name="type"/>.</returns>
public static HtmlSymbol FirstHtmlSymbolAs(this IEnumerable<ISymbol> symbols, HtmlSymbolType type)
{
return symbols.OfType<HtmlSymbol>().FirstOrDefault(sym => (type & sym.Type) == sym.Type);
}
}
}

View File

@ -112,7 +112,7 @@ namespace Microsoft.AspNetCore.Razor.Tokenizer
CurrentState = next.State;
CurrentSymbol = next.Result;
}
while (CurrentState != null && CurrentSymbol == null);
while (CurrentState != null && CurrentSymbol == null);
if (CurrentState == null)
{

View File

@ -1,11 +1,8 @@
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Razor.TagHelpers;
namespace Microsoft.AspNetCore.Razor.TagHelpers
{

View File

@ -7,6 +7,7 @@ using System.IO;
using System.Linq;
using Microsoft.AspNetCore.Razor.CodeGenerators;
using Microsoft.AspNetCore.Razor.Parser;
using Microsoft.AspNetCore.Razor.Parser.Internal;
using Microsoft.AspNetCore.Razor.Parser.SyntaxTree;
using Xunit;

View File

@ -3,6 +3,7 @@
using System.Collections.Generic;
using Microsoft.AspNetCore.Razor.Parser;
using Microsoft.AspNetCore.Razor.Parser.Internal;
namespace Microsoft.AspNetCore.Razor.Test.Framework
{

View File

@ -3,6 +3,7 @@
using System.Collections.Generic;
using Microsoft.AspNetCore.Razor.Parser;
using Microsoft.AspNetCore.Razor.Parser.Internal;
namespace Microsoft.AspNetCore.Razor.Test.Framework
{

View File

@ -3,7 +3,7 @@
using System;
using System.Text;
using Microsoft.AspNetCore.Razor.Utils;
using Microsoft.AspNetCore.Razor.Parser;
namespace Microsoft.AspNetCore.Razor.Test.Framework
{

View File

@ -10,7 +10,9 @@ using Microsoft.AspNetCore.Razor.Parser;
using Microsoft.AspNetCore.Razor.Parser.SyntaxTree;
using Microsoft.AspNetCore.Razor.Text;
using Microsoft.AspNetCore.Razor.Tokenizer;
using Microsoft.AspNetCore.Razor.Tokenizer.Internal;
using Microsoft.AspNetCore.Razor.Tokenizer.Symbols;
using Microsoft.AspNetCore.Razor.Tokenizer.Symbols.Internal;
namespace Microsoft.AspNetCore.Razor.Test.Framework
{

View File

@ -3,6 +3,7 @@
using System;
using Microsoft.AspNetCore.Razor.Chunks.Generators;
using Microsoft.AspNetCore.Razor.Editor;
using Microsoft.AspNetCore.Razor.Parser;
using Microsoft.AspNetCore.Razor.Parser.SyntaxTree;
using Microsoft.AspNetCore.Razor.Test.Framework;

View File

@ -7,7 +7,7 @@ using Microsoft.AspNetCore.Razor.Parser;
using Microsoft.AspNetCore.Razor.Parser.SyntaxTree;
using Microsoft.AspNetCore.Razor.Test.Framework;
using Microsoft.AspNetCore.Razor.Text;
using Microsoft.AspNetCore.Razor.Tokenizer;
using Microsoft.AspNetCore.Razor.Tokenizer.Internal;
using Microsoft.AspNetCore.Razor.Tokenizer.Symbols;
using Xunit;

View File

@ -2,6 +2,7 @@
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System;
using Microsoft.AspNetCore.Razor.Editor;
using Microsoft.AspNetCore.Razor.Parser;
using Microsoft.AspNetCore.Razor.Parser.SyntaxTree;
using Microsoft.AspNetCore.Razor.Test.Framework;

View File

@ -7,6 +7,7 @@ using Microsoft.AspNetCore.Razor.Parser;
using Microsoft.AspNetCore.Razor.Parser.SyntaxTree;
using Microsoft.AspNetCore.Razor.Test.Framework;
using Microsoft.AspNetCore.Razor.Tokenizer.Symbols;
using Microsoft.AspNetCore.Razor.Tokenizer.Symbols.Internal;
using Xunit;
namespace Microsoft.AspNetCore.Razor.Test.Parser.CSharp

View File

@ -7,7 +7,7 @@ using Microsoft.AspNetCore.Razor.Parser;
using Microsoft.AspNetCore.Razor.Parser.SyntaxTree;
using Microsoft.AspNetCore.Razor.Test.Framework;
using Microsoft.AspNetCore.Razor.Text;
using Microsoft.AspNetCore.Razor.Tokenizer;
using Microsoft.AspNetCore.Razor.Tokenizer.Internal;
using Xunit;
namespace Microsoft.AspNetCore.Razor.Test.Parser.CSharp

View File

@ -9,6 +9,7 @@ using Microsoft.AspNetCore.Razor.Parser.SyntaxTree;
using Microsoft.AspNetCore.Razor.Test.Framework;
using Microsoft.AspNetCore.Razor.Text;
using Microsoft.AspNetCore.Razor.Tokenizer.Symbols;
using Microsoft.AspNetCore.Razor.Tokenizer.Symbols.Internal;
using Xunit;
namespace Microsoft.AspNetCore.Razor.Test.Parser.CSharp

View File

@ -8,6 +8,7 @@ using Microsoft.AspNetCore.Razor.Parser;
using Microsoft.AspNetCore.Razor.Parser.SyntaxTree;
using Microsoft.AspNetCore.Razor.Test.Framework;
using Microsoft.AspNetCore.Razor.Tokenizer.Symbols;
using Microsoft.AspNetCore.Razor.Tokenizer.Symbols.Internal;
using Xunit;
namespace Microsoft.AspNetCore.Razor.Test.Parser.CSharp

View File

@ -7,6 +7,7 @@ using Microsoft.AspNetCore.Razor.Parser;
using Microsoft.AspNetCore.Razor.Parser.SyntaxTree;
using Microsoft.AspNetCore.Razor.Test.Framework;
using Microsoft.AspNetCore.Razor.Tokenizer.Symbols;
using Microsoft.AspNetCore.Razor.Tokenizer.Symbols.Internal;
using Xunit;
namespace Microsoft.AspNetCore.Razor.Test.Parser.CSharp

View File

@ -3,7 +3,7 @@
using System;
using System.Threading;
using Microsoft.AspNetCore.Razor.Parser;
using Microsoft.AspNetCore.Razor.Parser.Internal;
using Microsoft.AspNetCore.Razor.Parser.SyntaxTree;
using Microsoft.AspNetCore.Razor.Test.Framework;
using Moq;

View File

@ -5,6 +5,7 @@ using System;
using System.Linq;
using Microsoft.AspNetCore.Razor.Chunks.Generators;
using Microsoft.AspNetCore.Razor.Parser;
using Microsoft.AspNetCore.Razor.Parser.Internal;
using Microsoft.AspNetCore.Razor.Parser.SyntaxTree;
using Microsoft.AspNetCore.Razor.Test.Framework;
using Microsoft.AspNetCore.Razor.Text;

View File

@ -5,11 +5,12 @@ using System;
using Microsoft.AspNetCore.Razor.Chunks.Generators;
using Microsoft.AspNetCore.Razor.Editor;
using Microsoft.AspNetCore.Razor.Parser;
using Microsoft.AspNetCore.Razor.Parser.Internal;
using Microsoft.AspNetCore.Razor.Parser.SyntaxTree;
using Microsoft.AspNetCore.Razor.Test.Framework;
using Microsoft.AspNetCore.Razor.Text;
using Microsoft.AspNetCore.Razor.Tokenizer;
using Microsoft.AspNetCore.Razor.Tokenizer.Symbols;
using Microsoft.AspNetCore.Razor.Tokenizer.Internal;
using Microsoft.AspNetCore.Razor.Tokenizer.Symbols.Internal;
using Xunit;
namespace Microsoft.AspNetCore.Razor.Test.Parser.Html

View File

@ -5,11 +5,12 @@ using System;
using Microsoft.AspNetCore.Razor.Chunks.Generators;
using Microsoft.AspNetCore.Razor.Editor;
using Microsoft.AspNetCore.Razor.Parser;
using Microsoft.AspNetCore.Razor.Parser.Internal;
using Microsoft.AspNetCore.Razor.Parser.SyntaxTree;
using Microsoft.AspNetCore.Razor.Test.Framework;
using Microsoft.AspNetCore.Razor.Text;
using Microsoft.AspNetCore.Razor.Tokenizer;
using Microsoft.AspNetCore.Razor.Tokenizer.Symbols;
using Microsoft.AspNetCore.Razor.Tokenizer.Internal;
using Microsoft.AspNetCore.Razor.Tokenizer.Symbols.Internal;
using Xunit;
namespace Microsoft.AspNetCore.Razor.Test.Parser.Html

View File

@ -9,6 +9,7 @@ using Microsoft.AspNetCore.Razor.Parser.SyntaxTree;
using Microsoft.AspNetCore.Razor.Test.Framework;
using Microsoft.AspNetCore.Razor.Text;
using Microsoft.AspNetCore.Razor.Tokenizer.Symbols;
using Microsoft.AspNetCore.Razor.Tokenizer.Symbols.Internal;
using Xunit;
namespace Microsoft.AspNetCore.Razor.Test.Parser.Html

View File

@ -4,6 +4,7 @@
using System;
using System.IO;
using Microsoft.AspNetCore.Razor.Parser;
using Microsoft.AspNetCore.Razor.Parser.Internal;
using Microsoft.AspNetCore.Razor.Parser.SyntaxTree;
using Microsoft.AspNetCore.Razor.Test.Framework;
using Microsoft.AspNetCore.Razor.Text;

View File

@ -5,9 +5,10 @@ using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using Microsoft.AspNetCore.Razor.Parser;
using Microsoft.AspNetCore.Razor.Parser.SyntaxTree;
using Microsoft.AspNetCore.Razor.Compilation.TagHelpers;
using Microsoft.AspNetCore.Razor.Parser;
using Microsoft.AspNetCore.Razor.Parser.Internal;
using Microsoft.AspNetCore.Razor.Parser.SyntaxTree;
using Microsoft.AspNetCore.Razor.Test.Framework;
using Moq;
using Moq.Protected;
@ -69,16 +70,16 @@ namespace Microsoft.AspNetCore.Razor.Test.Parser
{
// Arrange
var factory = SpanFactory.CreateCsHtml();
var parser = new Mock<RazorParser>(new CSharpCodeParser(),
new HtmlMarkupParser(),
Mock.Of<ITagHelperDescriptorResolver>());
var parser = new Mock<RazorParser>(
new CSharpCodeParser(),
new HtmlMarkupParser(),
Mock.Of<ITagHelperDescriptorResolver>());
parser.CallBase = true;
parser.Protected()
.Setup<IEnumerable<TagHelperDescriptor>>("GetTagHelperDescriptors",
ItExpr.IsAny<Block>(),
ItExpr.IsAny<ErrorSink>())
.Returns(Enumerable.Empty<TagHelperDescriptor>())
.Verifiable();
parser
.Protected()
.Setup<IEnumerable<TagHelperDescriptor>>("GetTagHelperDescriptors", ItExpr.IsAny<Block>(), ItExpr.IsAny<ErrorSink>())
.Returns(Enumerable.Empty<TagHelperDescriptor>())
.Verifiable();
// Act
parser.Object.Parse(new StringReader("<p>Hello world. The time is @DateTime.UtcNow</p>"));

View File

@ -2,6 +2,7 @@
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using Microsoft.AspNetCore.Razor.Parser;
using Microsoft.AspNetCore.Razor.Parser.Internal;
using Microsoft.AspNetCore.Razor.Test.Framework;
using Xunit;

View File

@ -4,6 +4,7 @@
using Microsoft.AspNetCore.Razor.Chunks.Generators;
using Microsoft.AspNetCore.Razor.CodeGenerators;
using Microsoft.AspNetCore.Razor.Parser;
using Microsoft.AspNetCore.Razor.Parser.Internal;
using Xunit;
namespace Microsoft.AspNetCore.Razor.Test

View File

@ -9,6 +9,7 @@ using System.Web.WebPages.TestUtils;
using Microsoft.AspNetCore.Razor.Chunks.Generators;
using Microsoft.AspNetCore.Razor.CodeGenerators;
using Microsoft.AspNetCore.Razor.Parser;
using Microsoft.AspNetCore.Razor.Parser.Internal;
using Microsoft.AspNetCore.Razor.Text;
using Moq;
using Xunit;

View File

@ -8,7 +8,7 @@ using Microsoft.AspNetCore.Razor.Parser;
using Microsoft.AspNetCore.Razor.Parser.SyntaxTree;
using Microsoft.AspNetCore.Razor.Parser.TagHelpers;
using Microsoft.AspNetCore.Razor.Test.Framework;
using Microsoft.AspNetCore.Razor.Tokenizer;
using Microsoft.AspNetCore.Razor.Tokenizer.Internal;
using Microsoft.Extensions.Internal;
using Moq;
using Xunit;

View File

@ -15,6 +15,7 @@ using Microsoft.AspNetCore.Razor.Text;
using Xunit;
using Microsoft.AspNetCore.Razor.Parser.TagHelpers.Internal;
using Microsoft.AspNetCore.Razor.Parser.TagHelpers;
using Microsoft.AspNetCore.Razor.Parser.Internal;
namespace Microsoft.AspNetCore.Razor.Test.TagHelpers
{

View File

@ -9,6 +9,7 @@ using Microsoft.AspNetCore.Razor.Compilation.TagHelpers;
using Microsoft.AspNetCore.Razor.Test.Framework;
using Microsoft.AspNetCore.Razor.Text;
using Microsoft.AspNetCore.Razor.Tokenizer;
using Microsoft.AspNetCore.Razor.Tokenizer.Internal;
namespace Microsoft.AspNetCore.Razor.Test.TagHelpers
{

View File

@ -4,6 +4,7 @@
using System;
using System.IO;
using Microsoft.AspNetCore.Razor.Parser;
using Microsoft.AspNetCore.Razor.Parser.Internal;
using Xunit;
namespace Microsoft.AspNetCore.Razor.Test.Text

View File

@ -3,6 +3,7 @@
using Microsoft.AspNetCore.Razor.Text;
using Microsoft.AspNetCore.Razor.Tokenizer;
using Microsoft.AspNetCore.Razor.Tokenizer.Internal;
using Microsoft.AspNetCore.Razor.Tokenizer.Symbols;
namespace Microsoft.AspNetCore.Razor.Test.Tokenizer

View File

@ -2,6 +2,7 @@
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using Microsoft.AspNetCore.Razor.Tokenizer.Symbols;
using Microsoft.AspNetCore.Razor.Tokenizer.Symbols.Internal;
using Xunit;
namespace Microsoft.AspNetCore.Razor.Test.Tokenizer

View File

@ -3,7 +3,8 @@
using Microsoft.AspNetCore.Razor.Text;
using Microsoft.AspNetCore.Razor.Tokenizer;
using Microsoft.AspNetCore.Razor.Tokenizer.Symbols;
using Microsoft.AspNetCore.Razor.Tokenizer.Internal;
using Microsoft.AspNetCore.Razor.Tokenizer.Symbols.Internal;
namespace Microsoft.AspNetCore.Razor.Test.Tokenizer
{

View File

@ -7,7 +7,9 @@ using System.IO;
using System.Text;
using Microsoft.AspNetCore.Razor.Text;
using Microsoft.AspNetCore.Razor.Tokenizer;
using Microsoft.AspNetCore.Razor.Tokenizer.Internal;
using Microsoft.AspNetCore.Razor.Tokenizer.Symbols;
using Microsoft.AspNetCore.Razor.Tokenizer.Symbols.Internal;
using Xunit;
namespace Microsoft.AspNetCore.Razor.Test.Tokenizer

View File

@ -2,7 +2,7 @@
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using Microsoft.AspNetCore.Razor.Utils;
using Microsoft.AspNetCore.Razor.Parser;
using Xunit;
namespace Microsoft.AspNetCore.Razor.Test.Utils