Get rid of AccessModifiers
This commit is contained in:
parent
a40ca857c5
commit
a580c8fdf1
|
|
@ -23,13 +23,19 @@ namespace Microsoft.AspNetCore.Mvc.Razor.Extensions
|
|||
var filePath = codeDocument.GetRelativePath() ?? codeDocument.Source.FilePath;
|
||||
|
||||
base.OnDocumentStructureCreated(codeDocument, @namespace, @class, method);
|
||||
|
||||
@namespace.Content = "AspNetCore";
|
||||
|
||||
@class.Name = CSharpIdentifier.GetClassNameFromPath(filePath);
|
||||
@class.BaseType = "global::Microsoft.AspNetCore.Mvc.Razor.RazorPage<TModel>";
|
||||
@class.AccessModifier = "public";
|
||||
@namespace.Content = "AspNetCore";
|
||||
@class.Modifiers.Clear();
|
||||
@class.Modifiers.Add("public");
|
||||
|
||||
method.Name = "ExecuteAsync";
|
||||
method.Modifiers = new[] { "async", "override" };
|
||||
method.AccessModifier = "public";
|
||||
method.Modifiers.Clear();
|
||||
method.Modifiers.Add("public");
|
||||
method.Modifiers.Add("async");
|
||||
method.Modifiers.Add("override");
|
||||
method.ReturnType = $"global::{typeof(System.Threading.Tasks.Task).FullName}";
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -26,13 +26,20 @@ namespace Microsoft.AspNetCore.Mvc.Razor.Extensions
|
|||
var filePath = codeDocument.GetRelativePath() ?? codeDocument.Source.FilePath;
|
||||
|
||||
base.OnDocumentStructureCreated(codeDocument, @namespace, @class, method);
|
||||
|
||||
@namespace.Content = "AspNetCore";
|
||||
|
||||
@class.BaseType = "global::Microsoft.AspNetCore.Mvc.RazorPages.Page";
|
||||
@class.Name = CSharpIdentifier.GetClassNameFromPath(filePath);
|
||||
@class.AccessModifier = "public";
|
||||
@namespace.Content = "AspNetCore";
|
||||
|
||||
@class.Modifiers.Clear();
|
||||
@class.Modifiers.Add("public");
|
||||
|
||||
method.Name = "ExecuteAsync";
|
||||
method.Modifiers = new[] { "async", "override" };
|
||||
method.AccessModifier = "public";
|
||||
method.Modifiers.Clear();
|
||||
method.Modifiers.Add("public");
|
||||
method.Modifiers.Add("async");
|
||||
method.Modifiers.Add("override");
|
||||
method.ReturnType = $"global::{typeof(System.Threading.Tasks.Task).FullName}";
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -13,6 +13,8 @@ namespace Microsoft.AspNetCore.Mvc.Razor.Extensions
|
|||
{
|
||||
public class ViewComponentTagHelperPass : IntermediateNodePassBase, IRazorOptimizationPass
|
||||
{
|
||||
private static readonly string[] PublicModifiers = new[] { "public" };
|
||||
|
||||
protected override void ExecuteCore(RazorCodeDocument codeDocument, DocumentIntermediateNode documentNode)
|
||||
{
|
||||
var visitor = new Visitor();
|
||||
|
|
@ -101,7 +103,7 @@ namespace Microsoft.AspNetCore.Mvc.Razor.Extensions
|
|||
var tagHelperTypeName = "Microsoft.AspNetCore.Razor.TagHelpers.TagHelper";
|
||||
var className = GetVCTHClassName(descriptor);
|
||||
|
||||
using (writer.BuildClassDeclaration("public", className, tagHelperTypeName, interfaces: null))
|
||||
using (writer.BuildClassDeclaration(PublicModifiers, className, tagHelperTypeName, interfaces: null))
|
||||
{
|
||||
// Add view component helper.
|
||||
writer.WriteVariableDeclaration(
|
||||
|
|
@ -144,14 +146,16 @@ namespace Microsoft.AspNetCore.Mvc.Razor.Extensions
|
|||
.WriteLine("]");
|
||||
|
||||
writer.WriteAutoPropertyDeclaration(
|
||||
"public",
|
||||
PublicModifiers,
|
||||
$"global::Microsoft.AspNetCore.Mvc.Rendering.ViewContext",
|
||||
"ViewContext");
|
||||
|
||||
foreach (var attribute in descriptor.BoundAttributes)
|
||||
{
|
||||
writer.WriteAutoPropertyDeclaration(
|
||||
"public", attribute.TypeName, attribute.GetPropertyName());
|
||||
PublicModifiers,
|
||||
attribute.TypeName,
|
||||
attribute.GetPropertyName());
|
||||
|
||||
if (attribute.IndexerTypeName != null)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -409,33 +409,8 @@ namespace Microsoft.AspNetCore.Razor.Language.CodeGeneration
|
|||
string.Format(CultureInfo.InvariantCulture, InstanceMethodFormat, instanceName, methodName));
|
||||
}
|
||||
|
||||
public CSharpCodeWriter WriteField(string accessibility, string typeName, string fieldName)
|
||||
public CSharpCodeWriter WriteField(IList<string> modifiers, string typeName, string fieldName)
|
||||
{
|
||||
if (accessibility == null)
|
||||
{
|
||||
throw new ArgumentNullException(nameof(accessibility));
|
||||
}
|
||||
|
||||
if (typeName == null)
|
||||
{
|
||||
throw new ArgumentNullException(nameof(typeName));
|
||||
}
|
||||
|
||||
if (fieldName == null)
|
||||
{
|
||||
throw new ArgumentNullException(nameof(fieldName));
|
||||
}
|
||||
|
||||
return WriteField(accessibility, Array.Empty<string>(), typeName, fieldName);
|
||||
}
|
||||
|
||||
public CSharpCodeWriter WriteField(string accessibility, IList<string> modifiers, string typeName, string fieldName)
|
||||
{
|
||||
if (accessibility == null)
|
||||
{
|
||||
throw new ArgumentNullException(nameof(accessibility));
|
||||
}
|
||||
|
||||
if (modifiers == null)
|
||||
{
|
||||
throw new ArgumentNullException(nameof(modifiers));
|
||||
|
|
@ -451,9 +426,6 @@ namespace Microsoft.AspNetCore.Razor.Language.CodeGeneration
|
|||
throw new ArgumentNullException(nameof(fieldName));
|
||||
}
|
||||
|
||||
Write(accessibility);
|
||||
Write(" ");
|
||||
|
||||
for (var i = 0; i < modifiers.Count; i++)
|
||||
{
|
||||
Write(modifiers[i]);
|
||||
|
|
@ -481,33 +453,8 @@ namespace Microsoft.AspNetCore.Razor.Language.CodeGeneration
|
|||
.WriteEndMethodInvocation(endLine);
|
||||
}
|
||||
|
||||
public CSharpCodeWriter WriteAutoPropertyDeclaration(string accessibility, string typeName, string propertyName)
|
||||
public CSharpCodeWriter WriteAutoPropertyDeclaration(IList<string> modifiers, string typeName, string propertyName)
|
||||
{
|
||||
if (accessibility == null)
|
||||
{
|
||||
throw new ArgumentNullException(nameof(accessibility));
|
||||
}
|
||||
|
||||
if (typeName == null)
|
||||
{
|
||||
throw new ArgumentNullException(nameof(typeName));
|
||||
}
|
||||
|
||||
if (propertyName == null)
|
||||
{
|
||||
throw new ArgumentNullException(nameof(propertyName));
|
||||
}
|
||||
|
||||
return WriteAutoPropertyDeclaration(accessibility, Array.Empty<string>(), typeName, propertyName);
|
||||
}
|
||||
|
||||
public CSharpCodeWriter WriteAutoPropertyDeclaration(string accessibility, IList<string> modifiers, string typeName, string propertyName)
|
||||
{
|
||||
if (accessibility == null)
|
||||
{
|
||||
throw new ArgumentNullException(nameof(accessibility));
|
||||
}
|
||||
|
||||
if (modifiers == null)
|
||||
{
|
||||
throw new ArgumentNullException(nameof(modifiers));
|
||||
|
|
@ -523,9 +470,6 @@ namespace Microsoft.AspNetCore.Razor.Language.CodeGeneration
|
|||
throw new ArgumentNullException(nameof(propertyName));
|
||||
}
|
||||
|
||||
Write(accessibility);
|
||||
Write(" ");
|
||||
|
||||
for (var i = 0; i < modifiers.Count; i++)
|
||||
{
|
||||
Write(modifiers[i]);
|
||||
|
|
@ -578,12 +522,19 @@ namespace Microsoft.AspNetCore.Razor.Language.CodeGeneration
|
|||
}
|
||||
|
||||
public CSharpCodeWritingScope BuildClassDeclaration(
|
||||
string accessibility,
|
||||
IList<string> modifiers,
|
||||
string name,
|
||||
string baseType,
|
||||
IEnumerable<string> interfaces)
|
||||
{
|
||||
Write(accessibility).Write(" class ").Write(name);
|
||||
for (var i = 0; i < modifiers.Count; i++)
|
||||
{
|
||||
Write(modifiers[i]);
|
||||
Write(" ");
|
||||
}
|
||||
|
||||
Write("class ");
|
||||
Write(name);
|
||||
|
||||
var hasBaseType = !string.IsNullOrEmpty(baseType);
|
||||
var hasInterfaces = interfaces != null && interfaces.Count() > 0;
|
||||
|
|
|
|||
|
|
@ -118,7 +118,7 @@ namespace Microsoft.AspNetCore.Razor.Language.CodeGeneration
|
|||
|
||||
public override void VisitClassDeclaration(ClassDeclarationIntermediateNode node)
|
||||
{
|
||||
using (Context.Writer.BuildClassDeclaration(node.AccessModifier, node.Name, node.BaseType, node.Interfaces))
|
||||
using (Context.Writer.BuildClassDeclaration(node.Modifiers, node.Name, node.BaseType, node.Interfaces))
|
||||
{
|
||||
RenderChildren(node);
|
||||
}
|
||||
|
|
@ -128,25 +128,13 @@ namespace Microsoft.AspNetCore.Razor.Language.CodeGeneration
|
|||
{
|
||||
Context.Writer.WriteLine("#pragma warning disable 1998");
|
||||
|
||||
Context.Writer
|
||||
.Write(node.AccessModifier)
|
||||
.Write(" ");
|
||||
|
||||
if (node.Modifiers != null)
|
||||
for (var i = 0; i < node.Modifiers.Count; i++)
|
||||
{
|
||||
for (var i = 0; i < node.Modifiers.Count; i++)
|
||||
{
|
||||
Context.Writer.Write(node.Modifiers[i]);
|
||||
|
||||
if (i + 1 < node.Modifiers.Count)
|
||||
{
|
||||
Context.Writer.Write(" ");
|
||||
}
|
||||
}
|
||||
Context.Writer.Write(node.Modifiers[i]);
|
||||
Context.Writer.Write(" ");
|
||||
}
|
||||
|
||||
Context.Writer
|
||||
.Write(" ")
|
||||
.Write(node.ReturnType)
|
||||
.Write(" ")
|
||||
.Write(node.Name)
|
||||
|
|
@ -162,12 +150,12 @@ namespace Microsoft.AspNetCore.Razor.Language.CodeGeneration
|
|||
|
||||
public override void VisitFieldDeclaration(FieldDeclarationIntermediateNode node)
|
||||
{
|
||||
Context.Writer.WriteField(node.AccessModifier, node.Modifiers, node.Type, node.Name);
|
||||
Context.Writer.WriteField(node.Modifiers, node.Type, node.Name);
|
||||
}
|
||||
|
||||
public override void VisitPropertyDeclaration(PropertyDeclarationIntermediateNode node)
|
||||
{
|
||||
Context.Writer.WriteAutoPropertyDeclaration(node.AccessModifier, node.Modifiers, node.Type, node.Name);
|
||||
Context.Writer.WriteAutoPropertyDeclaration(node.Modifiers, node.Type, node.Name);
|
||||
}
|
||||
|
||||
public override void VisitExtension(ExtensionIntermediateNode node)
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ namespace Microsoft.AspNetCore.Razor.Language.Intermediate
|
|||
|
||||
public override bool HasDiagnostics => _diagnostics != null && _diagnostics.Count > 0;
|
||||
|
||||
public string AccessModifier { get; set; }
|
||||
public IList<string> Modifiers { get; } = new List<string>();
|
||||
|
||||
public string Name { get; set; }
|
||||
|
||||
|
|
|
|||
|
|
@ -39,13 +39,11 @@ namespace Microsoft.AspNetCore.Razor.Language.Intermediate
|
|||
|
||||
public override IntermediateNodeCollection Children => ReadOnlyIntermediateNodeCollection.Instance;
|
||||
|
||||
public IList<string> Modifiers { get; set; } = new List<string>();
|
||||
|
||||
public override SourceSpan? Source { get; set; }
|
||||
|
||||
public override bool HasDiagnostics => _diagnostics != null && _diagnostics.Count > 0;
|
||||
|
||||
public string AccessModifier { get; set; }
|
||||
public IList<string> Modifiers { get; } = new List<string>();
|
||||
|
||||
public string Name { get; set; }
|
||||
|
||||
|
|
|
|||
|
|
@ -43,9 +43,7 @@ namespace Microsoft.AspNetCore.Razor.Language.Intermediate
|
|||
|
||||
public override bool HasDiagnostics => _diagnostics != null && _diagnostics.Count > 0;
|
||||
|
||||
public string AccessModifier { get; set; }
|
||||
|
||||
public IList<string> Modifiers { get; set; } = new List<string>();
|
||||
public IList<string> Modifiers { get; } = new List<string>();
|
||||
|
||||
public string Name { get; set; }
|
||||
|
||||
|
|
|
|||
|
|
@ -38,14 +38,12 @@ namespace Microsoft.AspNetCore.Razor.Language.Intermediate
|
|||
}
|
||||
|
||||
public override IntermediateNodeCollection Children => ReadOnlyIntermediateNodeCollection.Instance;
|
||||
|
||||
public IList<string> Modifiers { get; set; } = new List<string>();
|
||||
|
||||
|
||||
public override SourceSpan? Source { get; set; }
|
||||
|
||||
public override bool HasDiagnostics => _diagnostics != null && _diagnostics.Count > 0;
|
||||
|
||||
public string AccessModifier { get; set; }
|
||||
public IList<string> Modifiers { get; } = new List<string>();
|
||||
|
||||
public string Name { get; set; }
|
||||
|
||||
|
|
|
|||
|
|
@ -80,7 +80,7 @@ namespace Microsoft.AspNetCore.Razor.Language
|
|||
configurationFeature.ConfigureClass.Add((document, @class) =>
|
||||
{
|
||||
@class.Name = "Template";
|
||||
@class.AccessModifier = "public";
|
||||
@class.Modifiers.Add("public");
|
||||
});
|
||||
|
||||
configurationFeature.ConfigureNamespace.Add((document, @namespace) =>
|
||||
|
|
@ -88,12 +88,14 @@ namespace Microsoft.AspNetCore.Razor.Language
|
|||
@namespace.Content = "Razor";
|
||||
});
|
||||
|
||||
configurationFeature.ConfigureMethod.Add((document, @method) =>
|
||||
configurationFeature.ConfigureMethod.Add((document, method) =>
|
||||
{
|
||||
@method.Name = "ExecuteAsync";
|
||||
@method.ReturnType = $"global::{typeof(Task).FullName}";
|
||||
@method.AccessModifier = "public";
|
||||
method.Modifiers = new[] { "async", "override" };
|
||||
method.Name = "ExecuteAsync";
|
||||
method.ReturnType = $"global::{typeof(Task).FullName}";
|
||||
|
||||
method.Modifiers.Add("public");
|
||||
method.Modifiers.Add("async");
|
||||
method.Modifiers.Add("override");
|
||||
});
|
||||
|
||||
builder.Features.Add(configurationFeature);
|
||||
|
|
|
|||
|
|
@ -47,7 +47,8 @@ namespace RazorPageGenerator
|
|||
.ConfigureClass((document, @class) =>
|
||||
{
|
||||
@class.Name = Path.GetFileNameWithoutExtension(document.Source.FilePath);
|
||||
@class.AccessModifier = "internal";
|
||||
@class.Modifiers.Clear();
|
||||
@class.Modifiers.Add("internal");
|
||||
});
|
||||
|
||||
builder.Features.Add(new SuppressChecksumOptionsFeature());
|
||||
|
|
|
|||
|
|
@ -90,7 +90,7 @@ namespace Microsoft.AspNetCore.Mvc.Razor.Extensions
|
|||
|
||||
// Assert
|
||||
Assert.Equal("global::Microsoft.AspNetCore.Mvc.Razor.RazorPage<TModel>", visitor.Class.BaseType);
|
||||
Assert.Equal("public", visitor.Class.AccessModifier);
|
||||
Assert.Equal(new[] { "public" }, visitor.Class.Modifiers);
|
||||
Assert.Equal("Test_cshtml", visitor.Class.Name);
|
||||
}
|
||||
|
||||
|
|
@ -183,9 +183,8 @@ namespace Microsoft.AspNetCore.Mvc.Razor.Extensions
|
|||
|
||||
// Assert
|
||||
Assert.Equal("ExecuteAsync", visitor.Method.Name);
|
||||
Assert.Equal("public", visitor.Method.AccessModifier);
|
||||
Assert.Equal("global::System.Threading.Tasks.Task", visitor.Method.ReturnType);
|
||||
Assert.Equal(new[] { "async", "override" }, visitor.Method.Modifiers);
|
||||
Assert.Equal(new[] { "public", "async", "override" }, visitor.Method.Modifiers);
|
||||
}
|
||||
|
||||
private static RazorCodeDocument CreateDocument(string content, string filePath = null)
|
||||
|
|
|
|||
|
|
@ -110,7 +110,7 @@ namespace Microsoft.AspNetCore.Mvc.Razor.Extensions
|
|||
|
||||
// Assert
|
||||
Assert.Equal("global::Microsoft.AspNetCore.Mvc.RazorPages.Page", visitor.Class.BaseType);
|
||||
Assert.Equal("public", visitor.Class.AccessModifier);
|
||||
Assert.Equal(new[] { "public" }, visitor.Class.Modifiers);
|
||||
Assert.Equal("Test_cshtml", visitor.Class.Name);
|
||||
}
|
||||
|
||||
|
|
@ -203,9 +203,8 @@ namespace Microsoft.AspNetCore.Mvc.Razor.Extensions
|
|||
|
||||
// Assert
|
||||
Assert.Equal("ExecuteAsync", visitor.Method.Name);
|
||||
Assert.Equal("public", visitor.Method.AccessModifier);
|
||||
Assert.Equal("global::System.Threading.Tasks.Task", visitor.Method.ReturnType);
|
||||
Assert.Equal(new[] { "async", "override" }, visitor.Method.Modifiers);
|
||||
Assert.Equal(new[] { "public", "async", "override" }, visitor.Method.Modifiers);
|
||||
}
|
||||
|
||||
private static RazorCodeDocument CreateDocument(string content, string filePath = null)
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ Document -
|
|||
DirectiveToken - (832:14,14 [87] ) - Microsoft.AspNetCore.Mvc.Razor.TagHelpers.BodyTagHelper, Microsoft.AspNetCore.Mvc.Razor
|
||||
CSharpCode -
|
||||
IntermediateToken - - CSharp - private static System.Object __o = null;
|
||||
MethodDeclaration - - public - async, override - global::System.Threading.Tasks.Task - ExecuteAsync
|
||||
MethodDeclaration - - public async override - global::System.Threading.Tasks.Task - ExecuteAsync
|
||||
HtmlContent - (0:0,0 [4] Basic.cshtml)
|
||||
IntermediateToken - (0:0,0 [4] Basic.cshtml) - Html - <div
|
||||
HtmlAttribute - (4:0,4 [25] Basic.cshtml) - class=" - "
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ Document -
|
|||
UsingStatement - (135:5,1 [42] ) - Microsoft.AspNetCore.Mvc.Rendering
|
||||
UsingStatement - (178:6,1 [45] ) - Microsoft.AspNetCore.Mvc.ViewFeatures
|
||||
ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_Basic_cshtml - global::Microsoft.AspNetCore.Mvc.Razor.RazorPage<dynamic> -
|
||||
MethodDeclaration - - public - async, override - global::System.Threading.Tasks.Task - ExecuteAsync
|
||||
MethodDeclaration - - public async override - global::System.Threading.Tasks.Task - ExecuteAsync
|
||||
CSharpCode -
|
||||
IntermediateToken - - CSharp - BeginContext(0, 4, true);
|
||||
HtmlContent - (0:0,0 [4] Basic.cshtml)
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ Document -
|
|||
DirectiveToken - (159:11,8 [17] IncompleteDirectives.cshtml) - MyService<TModel>
|
||||
CSharpCode -
|
||||
IntermediateToken - - CSharp - private static System.Object __o = null;
|
||||
MethodDeclaration - - public - async, override - global::System.Threading.Tasks.Task - ExecuteAsync
|
||||
MethodDeclaration - - public async override - global::System.Threading.Tasks.Task - ExecuteAsync
|
||||
HtmlContent - (83:0,83 [4] IncompleteDirectives.cshtml)
|
||||
IntermediateToken - (83:0,83 [4] IncompleteDirectives.cshtml) - Html - \n\n
|
||||
MalformedDirective - (102:4,0 [6] IncompleteDirectives.cshtml)
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ Document -
|
|||
UsingStatement - (135:5,1 [42] ) - Microsoft.AspNetCore.Mvc.Rendering
|
||||
UsingStatement - (178:6,1 [45] ) - Microsoft.AspNetCore.Mvc.ViewFeatures
|
||||
ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_IncompleteDirectives_cshtml - global::Microsoft.AspNetCore.Mvc.RazorPages.Page -
|
||||
MethodDeclaration - - public - async, override - global::System.Threading.Tasks.Task - ExecuteAsync
|
||||
MethodDeclaration - - public async override - global::System.Threading.Tasks.Task - ExecuteAsync
|
||||
CSharpCode -
|
||||
IntermediateToken - - CSharp - BeginContext(83, 4, true);
|
||||
HtmlContent - (83:0,83 [4] IncompleteDirectives.cshtml)
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ Document -
|
|||
DirectiveToken - (45:1,7 [7] InheritsViewModel.cshtml) - MyModel
|
||||
CSharpCode -
|
||||
IntermediateToken - - CSharp - private static System.Object __o = null;
|
||||
MethodDeclaration - - public - async, override - global::System.Threading.Tasks.Task - ExecuteAsync
|
||||
MethodDeclaration - - public async override - global::System.Threading.Tasks.Task - ExecuteAsync
|
||||
Inject -
|
||||
Inject -
|
||||
Inject -
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ Document -
|
|||
UsingStatement - (135:5,1 [42] ) - Microsoft.AspNetCore.Mvc.Rendering
|
||||
UsingStatement - (178:6,1 [45] ) - Microsoft.AspNetCore.Mvc.ViewFeatures
|
||||
ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_InheritsViewModel_cshtml - MyBasePageForViews<MyModel> -
|
||||
MethodDeclaration - - public - async, override - global::System.Threading.Tasks.Task - ExecuteAsync
|
||||
MethodDeclaration - - public async override - global::System.Threading.Tasks.Task - ExecuteAsync
|
||||
Inject -
|
||||
Inject -
|
||||
Inject -
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ Document -
|
|||
DirectiveToken - (14:1,7 [7] InheritsWithViewImports.cshtml) - MyModel
|
||||
CSharpCode -
|
||||
IntermediateToken - - CSharp - private static System.Object __o = null;
|
||||
MethodDeclaration - - public - async, override - global::System.Threading.Tasks.Task - ExecuteAsync
|
||||
MethodDeclaration - - public async override - global::System.Threading.Tasks.Task - ExecuteAsync
|
||||
Inject -
|
||||
Inject -
|
||||
Inject -
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ Document -
|
|||
UsingStatement - (135:5,1 [42] ) - Microsoft.AspNetCore.Mvc.Rendering
|
||||
UsingStatement - (178:6,1 [45] ) - Microsoft.AspNetCore.Mvc.ViewFeatures
|
||||
ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_InheritsWithViewImports_cshtml - MyPageModel<MyModel> -
|
||||
MethodDeclaration - - public - async, override - global::System.Threading.Tasks.Task - ExecuteAsync
|
||||
MethodDeclaration - - public async override - global::System.Threading.Tasks.Task - ExecuteAsync
|
||||
Inject -
|
||||
Inject -
|
||||
Inject -
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ Document -
|
|||
DirectiveToken - (72:2,26 [4] InjectWithModel.cshtml) - Html
|
||||
CSharpCode -
|
||||
IntermediateToken - - CSharp - private static System.Object __o = null;
|
||||
MethodDeclaration - - public - async, override - global::System.Threading.Tasks.Task - ExecuteAsync
|
||||
MethodDeclaration - - public async override - global::System.Threading.Tasks.Task - ExecuteAsync
|
||||
Inject -
|
||||
Inject -
|
||||
Inject -
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ Document -
|
|||
UsingStatement - (135:5,1 [42] ) - Microsoft.AspNetCore.Mvc.Rendering
|
||||
UsingStatement - (178:6,1 [45] ) - Microsoft.AspNetCore.Mvc.ViewFeatures
|
||||
ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_InjectWithModel_cshtml - global::Microsoft.AspNetCore.Mvc.Razor.RazorPage<MyModel> -
|
||||
MethodDeclaration - - public - async, override - global::System.Threading.Tasks.Task - ExecuteAsync
|
||||
MethodDeclaration - - public async override - global::System.Threading.Tasks.Task - ExecuteAsync
|
||||
Inject -
|
||||
Inject -
|
||||
Inject -
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ Document -
|
|||
DirectiveToken - (147:4,26 [5] InjectWithSemicolon.cshtml) - Html2
|
||||
CSharpCode -
|
||||
IntermediateToken - - CSharp - private static System.Object __o = null;
|
||||
MethodDeclaration - - public - async, override - global::System.Threading.Tasks.Task - ExecuteAsync
|
||||
MethodDeclaration - - public async override - global::System.Threading.Tasks.Task - ExecuteAsync
|
||||
Inject -
|
||||
Inject -
|
||||
Inject -
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ Document -
|
|||
UsingStatement - (135:5,1 [42] ) - Microsoft.AspNetCore.Mvc.Rendering
|
||||
UsingStatement - (178:6,1 [45] ) - Microsoft.AspNetCore.Mvc.ViewFeatures
|
||||
ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_InjectWithSemicolon_cshtml - global::Microsoft.AspNetCore.Mvc.Razor.RazorPage<MyModel> -
|
||||
MethodDeclaration - - public - async, override - global::System.Threading.Tasks.Task - ExecuteAsync
|
||||
MethodDeclaration - - public async override - global::System.Threading.Tasks.Task - ExecuteAsync
|
||||
Inject -
|
||||
Inject -
|
||||
Inject -
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ Document -
|
|||
DirectiveToken - (14:0,14 [14] Inject.cshtml) - MyPropertyName
|
||||
CSharpCode -
|
||||
IntermediateToken - - CSharp - private static System.Object __o = null;
|
||||
MethodDeclaration - - public - async, override - global::System.Threading.Tasks.Task - ExecuteAsync
|
||||
MethodDeclaration - - public async override - global::System.Threading.Tasks.Task - ExecuteAsync
|
||||
Inject -
|
||||
Inject -
|
||||
Inject -
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ Document -
|
|||
UsingStatement - (135:5,1 [42] ) - Microsoft.AspNetCore.Mvc.Rendering
|
||||
UsingStatement - (178:6,1 [45] ) - Microsoft.AspNetCore.Mvc.ViewFeatures
|
||||
ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_Inject_cshtml - global::Microsoft.AspNetCore.Mvc.Razor.RazorPage<dynamic> -
|
||||
MethodDeclaration - - public - async, override - global::System.Threading.Tasks.Task - ExecuteAsync
|
||||
MethodDeclaration - - public async override - global::System.Threading.Tasks.Task - ExecuteAsync
|
||||
Inject -
|
||||
Inject -
|
||||
Inject -
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ Document -
|
|||
DirectiveToken - (832:14,14 [87] ) - Microsoft.AspNetCore.Mvc.Razor.TagHelpers.BodyTagHelper, Microsoft.AspNetCore.Mvc.Razor
|
||||
CSharpCode -
|
||||
IntermediateToken - - CSharp - private static System.Object __o = null;
|
||||
MethodDeclaration - - public - async, override - global::System.Threading.Tasks.Task - ExecuteAsync
|
||||
MethodDeclaration - - public async override - global::System.Threading.Tasks.Task - ExecuteAsync
|
||||
MalformedDirective - (0:0,0 [11] InvalidNamespaceAtEOF.cshtml)
|
||||
HtmlContent - (11:0,11 [5] InvalidNamespaceAtEOF.cshtml)
|
||||
IntermediateToken - (11:0,11 [5] InvalidNamespaceAtEOF.cshtml) - Html - Test.
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ Document -
|
|||
UsingStatement - (135:5,1 [42] ) - Microsoft.AspNetCore.Mvc.Rendering
|
||||
UsingStatement - (178:6,1 [45] ) - Microsoft.AspNetCore.Mvc.ViewFeatures
|
||||
ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_InvalidNamespaceAtEOF_cshtml - global::Microsoft.AspNetCore.Mvc.Razor.RazorPage<dynamic> -
|
||||
MethodDeclaration - - public - async, override - global::System.Threading.Tasks.Task - ExecuteAsync
|
||||
MethodDeclaration - - public async override - global::System.Threading.Tasks.Task - ExecuteAsync
|
||||
MalformedDirective - (0:0,0 [11] InvalidNamespaceAtEOF.cshtml)
|
||||
CSharpCode -
|
||||
IntermediateToken - - CSharp - BeginContext(11, 5, true);
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ Document -
|
|||
DirectiveToken - (832:14,14 [87] ) - Microsoft.AspNetCore.Mvc.Razor.TagHelpers.BodyTagHelper, Microsoft.AspNetCore.Mvc.Razor
|
||||
CSharpCode -
|
||||
IntermediateToken - - CSharp - private static System.Object __o = null;
|
||||
MethodDeclaration - - public - async, override - global::System.Threading.Tasks.Task - ExecuteAsync
|
||||
MethodDeclaration - - public async override - global::System.Threading.Tasks.Task - ExecuteAsync
|
||||
MalformedDirective - (0:0,0 [6] MalformedPageDirective.cshtml)
|
||||
HtmlContent - (6:0,6 [49] MalformedPageDirective.cshtml)
|
||||
IntermediateToken - (6:0,6 [8] MalformedPageDirective.cshtml) - Html - "foo\n\n
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ Document -
|
|||
UsingStatement - (135:5,1 [42] ) - Microsoft.AspNetCore.Mvc.Rendering
|
||||
UsingStatement - (178:6,1 [45] ) - Microsoft.AspNetCore.Mvc.ViewFeatures
|
||||
ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_MalformedPageDirective_cshtml - global::Microsoft.AspNetCore.Mvc.Razor.RazorPage<dynamic> -
|
||||
MethodDeclaration - - public - async, override - global::System.Threading.Tasks.Task - ExecuteAsync
|
||||
MethodDeclaration - - public async override - global::System.Threading.Tasks.Task - ExecuteAsync
|
||||
MalformedDirective - (0:0,0 [6] MalformedPageDirective.cshtml)
|
||||
CSharpCode -
|
||||
IntermediateToken - - CSharp - BeginContext(6, 49, true);
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ Document -
|
|||
CSharpCode -
|
||||
IntermediateToken - - CSharp - private static System.Object __o = null;
|
||||
DeclareTagHelperFields - - InputTestTagHelper
|
||||
MethodDeclaration - - public - async, override - global::System.Threading.Tasks.Task - ExecuteAsync
|
||||
MethodDeclaration - - public async override - global::System.Threading.Tasks.Task - ExecuteAsync
|
||||
HtmlContent - (17:1,0 [2] ModelExpressionTagHelper.cshtml)
|
||||
IntermediateToken - (17:1,0 [2] ModelExpressionTagHelper.cshtml) - Html - \n
|
||||
HtmlContent - (62:2,43 [4] ModelExpressionTagHelper.cshtml)
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ Document -
|
|||
UsingStatement - (178:6,1 [45] ) - Microsoft.AspNetCore.Mvc.ViewFeatures
|
||||
ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_ModelExpressionTagHelper_cshtml - global::Microsoft.AspNetCore.Mvc.Razor.RazorPage<DateTime> -
|
||||
DeclareTagHelperFields - - InputTestTagHelper
|
||||
MethodDeclaration - - public - async, override - global::System.Threading.Tasks.Task - ExecuteAsync
|
||||
MethodDeclaration - - public async override - global::System.Threading.Tasks.Task - ExecuteAsync
|
||||
CSharpCode -
|
||||
IntermediateToken - - CSharp - BeginContext(17, 2, true);
|
||||
HtmlContent - (17:1,0 [2] ModelExpressionTagHelper.cshtml)
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ Document -
|
|||
DirectiveToken - (7:0,7 [30] Model.cshtml) - System.Collections.IEnumerable
|
||||
CSharpCode -
|
||||
IntermediateToken - - CSharp - private static System.Object __o = null;
|
||||
MethodDeclaration - - public - async, override - global::System.Threading.Tasks.Task - ExecuteAsync
|
||||
MethodDeclaration - - public async override - global::System.Threading.Tasks.Task - ExecuteAsync
|
||||
Inject -
|
||||
Inject -
|
||||
Inject -
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ Document -
|
|||
UsingStatement - (135:5,1 [42] ) - Microsoft.AspNetCore.Mvc.Rendering
|
||||
UsingStatement - (178:6,1 [45] ) - Microsoft.AspNetCore.Mvc.ViewFeatures
|
||||
ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_Model_cshtml - global::Microsoft.AspNetCore.Mvc.Razor.RazorPage<System.Collections.IEnumerable> -
|
||||
MethodDeclaration - - public - async, override - global::System.Threading.Tasks.Task - ExecuteAsync
|
||||
MethodDeclaration - - public async override - global::System.Threading.Tasks.Task - ExecuteAsync
|
||||
Inject -
|
||||
Inject -
|
||||
Inject -
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ Document -
|
|||
DirectiveToken - (37:1,7 [30] MultipleModels.cshtml) - System.Collections.IEnumerable
|
||||
CSharpCode -
|
||||
IntermediateToken - - CSharp - private static System.Object __o = null;
|
||||
MethodDeclaration - - public - async, override - global::System.Threading.Tasks.Task - ExecuteAsync
|
||||
MethodDeclaration - - public async override - global::System.Threading.Tasks.Task - ExecuteAsync
|
||||
Inject -
|
||||
Inject -
|
||||
Inject -
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ Document -
|
|||
DirectiveToken - (18:1,11 [14] PageWithNamespace.cshtml) - Test.Namespace
|
||||
CSharpCode -
|
||||
IntermediateToken - - CSharp - private static System.Object __o = null;
|
||||
MethodDeclaration - - public - async, override - global::System.Threading.Tasks.Task - ExecuteAsync
|
||||
MethodDeclaration - - public async override - global::System.Threading.Tasks.Task - ExecuteAsync
|
||||
HtmlContent - (34:2,0 [20] PageWithNamespace.cshtml)
|
||||
IntermediateToken - (34:2,0 [4] PageWithNamespace.cshtml) - Html - <h1>
|
||||
IntermediateToken - (38:2,4 [9] PageWithNamespace.cshtml) - Html - Hi There!
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ Document -
|
|||
UsingStatement - (135:5,1 [42] ) - Microsoft.AspNetCore.Mvc.Rendering
|
||||
UsingStatement - (178:6,1 [45] ) - Microsoft.AspNetCore.Mvc.ViewFeatures
|
||||
ClassDeclaration - - public - PageWithNamespace_Page - global::Microsoft.AspNetCore.Mvc.RazorPages.Page -
|
||||
MethodDeclaration - - public - async, override - global::System.Threading.Tasks.Task - ExecuteAsync
|
||||
MethodDeclaration - - public async override - global::System.Threading.Tasks.Task - ExecuteAsync
|
||||
CSharpCode -
|
||||
IntermediateToken - - CSharp - BeginContext(34, 20, true);
|
||||
HtmlContent - (34:2,0 [20] PageWithNamespace.cshtml)
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ Document -
|
|||
CSharpCode -
|
||||
IntermediateToken - - CSharp - private static System.Object __o = null;
|
||||
DeclareTagHelperFields - - DivTagHelper
|
||||
MethodDeclaration - - public - async, override - global::System.Threading.Tasks.Task - ExecuteAsync
|
||||
MethodDeclaration - - public async override - global::System.Threading.Tasks.Task - ExecuteAsync
|
||||
HtmlContent - (7:1,0 [2] RazorPagesWithoutModel.cshtml)
|
||||
IntermediateToken - (7:1,0 [2] RazorPagesWithoutModel.cshtml) - Html - \n
|
||||
HtmlContent - (35:2,26 [2] RazorPagesWithoutModel.cshtml)
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ Document -
|
|||
DeclarePreallocatedTagHelperHtmlAttribute - - __tagHelperAttribute_2 - class - form-group - AttributeStructure.DoubleQuotes
|
||||
DeclarePreallocatedTagHelperHtmlAttribute - - __tagHelperAttribute_3 - class - col-md-offset-2 col-md-10 - AttributeStructure.DoubleQuotes
|
||||
DeclareTagHelperFields - - DivTagHelper
|
||||
MethodDeclaration - - public - async, override - global::System.Threading.Tasks.Task - ExecuteAsync
|
||||
MethodDeclaration - - public async override - global::System.Threading.Tasks.Task - ExecuteAsync
|
||||
CSharpCode -
|
||||
IntermediateToken - - CSharp - BeginContext(7, 2, true);
|
||||
HtmlContent - (7:1,0 [2] RazorPagesWithoutModel.cshtml)
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ Document -
|
|||
CSharpCode -
|
||||
IntermediateToken - - CSharp - private static System.Object __o = null;
|
||||
DeclareTagHelperFields - - DivTagHelper
|
||||
MethodDeclaration - - public - async, override - global::System.Threading.Tasks.Task - ExecuteAsync
|
||||
MethodDeclaration - - public async override - global::System.Threading.Tasks.Task - ExecuteAsync
|
||||
HtmlContent - (7:1,0 [2] RazorPages.cshtml)
|
||||
IntermediateToken - (7:1,0 [2] RazorPages.cshtml) - Html - \n
|
||||
HtmlContent - (52:3,26 [2] RazorPages.cshtml)
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ Document -
|
|||
DeclarePreallocatedTagHelperHtmlAttribute - - __tagHelperAttribute_2 - class - form-group - AttributeStructure.DoubleQuotes
|
||||
DeclarePreallocatedTagHelperHtmlAttribute - - __tagHelperAttribute_3 - class - col-md-offset-2 col-md-10 - AttributeStructure.DoubleQuotes
|
||||
DeclareTagHelperFields - - DivTagHelper
|
||||
MethodDeclaration - - public - async, override - global::System.Threading.Tasks.Task - ExecuteAsync
|
||||
MethodDeclaration - - public async override - global::System.Threading.Tasks.Task - ExecuteAsync
|
||||
CSharpCode -
|
||||
IntermediateToken - - CSharp - BeginContext(7, 2, true);
|
||||
HtmlContent - (7:1,0 [2] RazorPages.cshtml)
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ Document -
|
|||
CSharpCode -
|
||||
IntermediateToken - - CSharp - private static System.Object __o = null;
|
||||
DeclareTagHelperFields - - AspNetCore.TestFiles_IntegrationTests_CodeGenerationIntegrationTest_ViewComponentTagHelper_cshtml.__Generated__TestViewComponentTagHelper - AllTagHelper
|
||||
MethodDeclaration - - public - async, override - global::System.Threading.Tasks.Task - ExecuteAsync
|
||||
MethodDeclaration - - public async override - global::System.Threading.Tasks.Task - ExecuteAsync
|
||||
HtmlContent - (26:0,26 [2] ViewComponentTagHelper.cshtml)
|
||||
IntermediateToken - (26:0,26 [2] ViewComponentTagHelper.cshtml) - Html - \n
|
||||
CSharpCode - (30:1,2 [26] ViewComponentTagHelper.cshtml)
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ Document -
|
|||
ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_ViewComponentTagHelper_cshtml - global::Microsoft.AspNetCore.Mvc.Razor.RazorPage<dynamic> -
|
||||
DeclarePreallocatedTagHelperAttribute - - __tagHelperAttribute_0 - bar - World - HtmlAttributeValueStyle.DoubleQuotes
|
||||
DeclareTagHelperFields - - AspNetCore.TestFiles_IntegrationTests_CodeGenerationIntegrationTest_ViewComponentTagHelper_cshtml.__Generated__TestViewComponentTagHelper - AllTagHelper
|
||||
MethodDeclaration - - public - async, override - global::System.Threading.Tasks.Task - ExecuteAsync
|
||||
MethodDeclaration - - public async override - global::System.Threading.Tasks.Task - ExecuteAsync
|
||||
CSharpCode - (30:1,2 [26] ViewComponentTagHelper.cshtml)
|
||||
IntermediateToken - (30:1,2 [26] ViewComponentTagHelper.cshtml) - CSharp - \n var foo = "Hello";\n
|
||||
CSharpCode -
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ Document -
|
|||
DirectiveToken - (11:0,11 [14] ViewWithNamespace.cshtml) - Test.Namespace
|
||||
CSharpCode -
|
||||
IntermediateToken - - CSharp - private static System.Object __o = null;
|
||||
MethodDeclaration - - public - async, override - global::System.Threading.Tasks.Task - ExecuteAsync
|
||||
MethodDeclaration - - public async override - global::System.Threading.Tasks.Task - ExecuteAsync
|
||||
HtmlContent - (27:1,0 [20] ViewWithNamespace.cshtml)
|
||||
IntermediateToken - (27:1,0 [4] ViewWithNamespace.cshtml) - Html - <h1>
|
||||
IntermediateToken - (31:1,4 [9] ViewWithNamespace.cshtml) - Html - Hi There!
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ Document -
|
|||
UsingStatement - (135:5,1 [42] ) - Microsoft.AspNetCore.Mvc.Rendering
|
||||
UsingStatement - (178:6,1 [45] ) - Microsoft.AspNetCore.Mvc.ViewFeatures
|
||||
ClassDeclaration - - public - ViewWithNamespace_View - global::Microsoft.AspNetCore.Mvc.Razor.RazorPage<dynamic> -
|
||||
MethodDeclaration - - public - async, override - global::System.Threading.Tasks.Task - ExecuteAsync
|
||||
MethodDeclaration - - public async override - global::System.Threading.Tasks.Task - ExecuteAsync
|
||||
CSharpCode -
|
||||
IntermediateToken - - CSharp - BeginContext(27, 20, true);
|
||||
HtmlContent - (27:1,0 [20] ViewWithNamespace.cshtml)
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ Document -
|
|||
DirectiveToken - (28:0,28 [5] _ViewImports.cshtml) - Model
|
||||
CSharpCode -
|
||||
IntermediateToken - - CSharp - private static System.Object __o = null;
|
||||
MethodDeclaration - - public - async, override - global::System.Threading.Tasks.Task - ExecuteAsync
|
||||
MethodDeclaration - - public async override - global::System.Threading.Tasks.Task - ExecuteAsync
|
||||
Inject -
|
||||
Inject -
|
||||
Inject -
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ Document -
|
|||
UsingStatement - (135:5,1 [42] ) - Microsoft.AspNetCore.Mvc.Rendering
|
||||
UsingStatement - (178:6,1 [45] ) - Microsoft.AspNetCore.Mvc.ViewFeatures
|
||||
ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest__ViewImports_cshtml - global::Microsoft.AspNetCore.Mvc.Razor.RazorPage<dynamic> -
|
||||
MethodDeclaration - - public - async, override - global::System.Threading.Tasks.Task - ExecuteAsync
|
||||
MethodDeclaration - - public async override - global::System.Threading.Tasks.Task - ExecuteAsync
|
||||
Inject -
|
||||
Inject -
|
||||
Inject -
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ Document -
|
|||
DeclarePreallocatedTagHelperHtmlAttribute - - __tagHelperAttribute_1 - type - text - AttributeStructure.SingleQuotes
|
||||
DeclarePreallocatedTagHelperHtmlAttribute - - __tagHelperAttribute_2 - unbound - foo - AttributeStructure.DoubleQuotes
|
||||
DeclareTagHelperFields - - FormTagHelper - InputTagHelper
|
||||
MethodDeclaration - - public - async, override - global::System.Threading.Tasks.Task - ExecuteAsync
|
||||
MethodDeclaration - - public async override - global::System.Threading.Tasks.Task - ExecuteAsync
|
||||
CSharpCode -
|
||||
IntermediateToken - - CSharp - BeginContext(31, 28, true);
|
||||
HtmlContent - (31:1,0 [28] BasicTest.cshtml)
|
||||
|
|
|
|||
|
|
@ -308,7 +308,7 @@ namespace Microsoft.AspNetCore.Razor.Language.CodeGeneration
|
|||
var writer = new CSharpCodeWriter();
|
||||
|
||||
// Act
|
||||
writer.WriteField("private", "global::System.String", "_myString");
|
||||
writer.WriteField(new[] { "private" }, "global::System.String", "_myString");
|
||||
|
||||
// Assert
|
||||
var output = writer.GenerateCode();
|
||||
|
|
@ -322,7 +322,7 @@ namespace Microsoft.AspNetCore.Razor.Language.CodeGeneration
|
|||
var writer = new CSharpCodeWriter();
|
||||
|
||||
// Act
|
||||
writer.WriteField("private", new[] { "readonly", "static" }, "global::System.String", "_myString");
|
||||
writer.WriteField(new[] { "private", "readonly", "static" }, "global::System.String", "_myString");
|
||||
|
||||
// Assert
|
||||
var output = writer.GenerateCode();
|
||||
|
|
@ -336,7 +336,7 @@ namespace Microsoft.AspNetCore.Razor.Language.CodeGeneration
|
|||
var writer = new CSharpCodeWriter();
|
||||
|
||||
// Act
|
||||
writer.WriteAutoPropertyDeclaration("public", "global::System.String", "MyString");
|
||||
writer.WriteAutoPropertyDeclaration(new[] { "public" }, "global::System.String", "MyString");
|
||||
|
||||
// Assert
|
||||
var output = writer.GenerateCode();
|
||||
|
|
@ -350,7 +350,7 @@ namespace Microsoft.AspNetCore.Razor.Language.CodeGeneration
|
|||
var writer = new CSharpCodeWriter();
|
||||
|
||||
// Act
|
||||
writer.WriteAutoPropertyDeclaration("public", new[] { "static" }, "global::System.String", "MyString");
|
||||
writer.WriteAutoPropertyDeclaration(new[] { "public", "static" }, "global::System.String", "MyString");
|
||||
|
||||
// Assert
|
||||
var output = writer.GenerateCode();
|
||||
|
|
|
|||
|
|
@ -133,7 +133,10 @@ namespace TestNamespace
|
|||
var builder = IntermediateNodeBuilder.Create(document);
|
||||
builder.Add(new ClassDeclarationIntermediateNode()
|
||||
{
|
||||
AccessModifier = "internal",
|
||||
Modifiers =
|
||||
{
|
||||
"internal"
|
||||
},
|
||||
BaseType = "TestBase",
|
||||
Interfaces = new List<string> { "IFoo", "IBar", },
|
||||
Name = "TestClass",
|
||||
|
|
@ -174,8 +177,12 @@ internal class TestClass : TestBase, IFoo, IBar
|
|||
var builder = IntermediateNodeBuilder.Create(document);
|
||||
builder.Add(new MethodDeclarationIntermediateNode()
|
||||
{
|
||||
AccessModifier = "internal",
|
||||
Modifiers = new List<string> { "virtual", "async", },
|
||||
Modifiers =
|
||||
{
|
||||
"internal",
|
||||
"virtual",
|
||||
"async",
|
||||
},
|
||||
Name = "TestMethod",
|
||||
ReturnType = "string",
|
||||
});
|
||||
|
|
@ -217,8 +224,11 @@ internal virtual async string TestMethod()
|
|||
var builder = IntermediateNodeBuilder.Create(document);
|
||||
builder.Add(new FieldDeclarationIntermediateNode()
|
||||
{
|
||||
AccessModifier = "internal",
|
||||
Modifiers = new List<string> { "readonly", },
|
||||
Modifiers =
|
||||
{
|
||||
"internal",
|
||||
"readonly",
|
||||
},
|
||||
Name = "_foo",
|
||||
Type = "string",
|
||||
});
|
||||
|
|
@ -256,8 +266,11 @@ internal readonly string _foo;
|
|||
var builder = IntermediateNodeBuilder.Create(document);
|
||||
builder.Add(new PropertyDeclarationIntermediateNode()
|
||||
{
|
||||
AccessModifier = "internal",
|
||||
Modifiers = new List<string> { "virtual", },
|
||||
Modifiers =
|
||||
{
|
||||
"internal",
|
||||
"virtual",
|
||||
},
|
||||
Name = "Foo",
|
||||
Type = "string",
|
||||
});
|
||||
|
|
|
|||
|
|
@ -66,7 +66,10 @@ namespace Microsoft.AspNetCore.Razor.Language.IntegrationTests
|
|||
engine.ConfigureClass((document, @class) =>
|
||||
{
|
||||
@class.Name = "MyClass";
|
||||
@class.AccessModifier = "protected internal";
|
||||
|
||||
@class.Modifiers.Clear();
|
||||
@class.Modifiers.Add("protected");
|
||||
@class.Modifiers.Add("internal");
|
||||
});
|
||||
|
||||
engine.ConfigureClass((document, @class) =>
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
Document -
|
||||
NamespaceDeclaration - - Razor
|
||||
ClassDeclaration - - public - Template - -
|
||||
MethodDeclaration - - public - async, override - global::System.Threading.Tasks.Task - ExecuteAsync
|
||||
MethodDeclaration - - public async override - global::System.Threading.Tasks.Task - ExecuteAsync
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
Document -
|
||||
NamespaceDeclaration - - Razor
|
||||
ClassDeclaration - - public - Template - -
|
||||
MethodDeclaration - - public - async, override - global::System.Threading.Tasks.Task - ExecuteAsync
|
||||
MethodDeclaration - - public async override - global::System.Threading.Tasks.Task - ExecuteAsync
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
Document -
|
||||
NamespaceDeclaration - - Razor
|
||||
ClassDeclaration - - public - Template - -
|
||||
MethodDeclaration - - public - async, override - global::System.Threading.Tasks.Task - ExecuteAsync
|
||||
MethodDeclaration - - public async override - global::System.Threading.Tasks.Task - ExecuteAsync
|
||||
HtmlContent - (0:0,0 [13] HelloWorld.cshtml)
|
||||
IntermediateToken - (0:0,0 [13] HelloWorld.cshtml) - Html - Hello, World!
|
||||
|
|
|
|||
|
|
@ -5,6 +5,6 @@ Document -
|
|||
DirectiveToken - (14:0,14 [17] AddTagHelperDirective.cshtml) - "*, TestAssembly"
|
||||
CSharpCode -
|
||||
IntermediateToken - - CSharp - private static System.Object __o = null;
|
||||
MethodDeclaration - - public - async - System.Threading.Tasks.Task - ExecuteAsync
|
||||
MethodDeclaration - - public async - System.Threading.Tasks.Task - ExecuteAsync
|
||||
HtmlContent - (31:0,31 [2] AddTagHelperDirective.cshtml)
|
||||
IntermediateToken - (31:0,31 [2] AddTagHelperDirective.cshtml) - Html - \n
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ Document -
|
|||
CSharpCode -
|
||||
IntermediateToken - - CSharp - private static System.Object __o = null;
|
||||
DeclareTagHelperFields - - TestNamespace.PTagHelper - TestNamespace.CatchAllTagHelper - TestNamespace.InputTagHelper - TestNamespace.InputTagHelper2
|
||||
MethodDeclaration - - public - async - System.Threading.Tasks.Task - ExecuteAsync
|
||||
MethodDeclaration - - public async - System.Threading.Tasks.Task - ExecuteAsync
|
||||
HtmlContent - (29:0,29 [4] AttributeTargetingTagHelpers.cshtml)
|
||||
IntermediateToken - (29:0,29 [4] AttributeTargetingTagHelpers.cshtml) - Html - \n\n
|
||||
TagHelper - (33:2,0 [228] AttributeTargetingTagHelpers.cshtml) - p - TagMode.StartTagAndEndTag
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ Document -
|
|||
DeclarePreallocatedTagHelperAttribute - - __tagHelperAttribute_1 - type - checkbox - HtmlAttributeValueStyle.DoubleQuotes
|
||||
DeclarePreallocatedTagHelperHtmlAttribute - - __tagHelperAttribute_2 - class - btn - AttributeStructure.DoubleQuotes
|
||||
DeclareTagHelperFields - - TestNamespace.PTagHelper - TestNamespace.CatchAllTagHelper - TestNamespace.InputTagHelper - TestNamespace.InputTagHelper2
|
||||
MethodDeclaration - - public - async - System.Threading.Tasks.Task - ExecuteAsync
|
||||
MethodDeclaration - - public async - System.Threading.Tasks.Task - ExecuteAsync
|
||||
HtmlContent - (31:1,0 [2] AttributeTargetingTagHelpers.cshtml)
|
||||
IntermediateToken - (31:1,0 [2] AttributeTargetingTagHelpers.cshtml) - Html - \n
|
||||
TagHelper - (33:2,0 [228] AttributeTargetingTagHelpers.cshtml) - p - TagMode.StartTagAndEndTag
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ Document -
|
|||
DesignTimeDirective -
|
||||
CSharpCode -
|
||||
IntermediateToken - - CSharp - private static System.Object __o = null;
|
||||
MethodDeclaration - - public - async - System.Threading.Tasks.Task - ExecuteAsync
|
||||
MethodDeclaration - - public async - System.Threading.Tasks.Task - ExecuteAsync
|
||||
HtmlContent - (89:5,1 [102] Await.cshtml)
|
||||
IntermediateToken - (89:5,1 [4] Await.cshtml) - Html - \n\n
|
||||
IntermediateToken - (93:7,0 [9] Await.cshtml) - Html - <section>
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
Document -
|
||||
NamespaceDeclaration - - Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles
|
||||
ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_Await_Runtime - -
|
||||
MethodDeclaration - - public - async - System.Threading.Tasks.Task - ExecuteAsync
|
||||
MethodDeclaration - - public async - System.Threading.Tasks.Task - ExecuteAsync
|
||||
HtmlContent - (91:6,0 [100] Await.cshtml)
|
||||
IntermediateToken - (91:6,0 [2] Await.cshtml) - Html - \n
|
||||
IntermediateToken - (93:7,0 [9] Await.cshtml) - Html - <section>
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ Document -
|
|||
DirectiveToken - (119:4,10 [5] BasicImports_Imports0.cshtml) - Hello
|
||||
CSharpCode -
|
||||
IntermediateToken - - CSharp - private static System.Object __o = null;
|
||||
MethodDeclaration - - public - async - System.Threading.Tasks.Task - ExecuteAsync
|
||||
MethodDeclaration - - public async - System.Threading.Tasks.Task - ExecuteAsync
|
||||
HtmlContent - (0:0,0 [18] BasicImports.cshtml)
|
||||
IntermediateToken - (0:0,0 [3] BasicImports.cshtml) - Html - <p>
|
||||
IntermediateToken - (3:0,3 [9] BasicImports.cshtml) - Html - Hi there!
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ Document -
|
|||
UsingStatement - (80:3,1 [29] BasicImports_Imports0.cshtml) - System.ComponentModel
|
||||
UsingStatement - (23:1,1 [20] BasicImports_Imports1.cshtml) - System.Text
|
||||
ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_BasicImports_Runtime - Hello -
|
||||
MethodDeclaration - - public - async - System.Threading.Tasks.Task - ExecuteAsync
|
||||
MethodDeclaration - - public async - System.Threading.Tasks.Task - ExecuteAsync
|
||||
HtmlContent - (0:0,0 [18] BasicImports.cshtml)
|
||||
IntermediateToken - (0:0,0 [3] BasicImports.cshtml) - Html - <p>
|
||||
IntermediateToken - (3:0,3 [9] BasicImports.cshtml) - Html - Hi there!
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ Document -
|
|||
CSharpCode -
|
||||
IntermediateToken - - CSharp - private static System.Object __o = null;
|
||||
DeclareTagHelperFields - - TestNamespace.PTagHelper - TestNamespace.InputTagHelper - TestNamespace.InputTagHelper2
|
||||
MethodDeclaration - - public - async - System.Threading.Tasks.Task - ExecuteAsync
|
||||
MethodDeclaration - - public async - System.Threading.Tasks.Task - ExecuteAsync
|
||||
HtmlContent - (31:0,31 [73] BasicTagHelpers.cshtml)
|
||||
IntermediateToken - (31:0,31 [4] BasicTagHelpers.cshtml) - Html - \n\n
|
||||
IntermediateToken - (35:2,0 [4] BasicTagHelpers.cshtml) - Html - <div
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ Document -
|
|||
CSharpCode -
|
||||
IntermediateToken - - CSharp - private static System.Object __o = null;
|
||||
DeclareTagHelperFields - - TestNamespace.PTagHelper - TestNamespace.InputTagHelper - TestNamespace.InputTagHelper2
|
||||
MethodDeclaration - - public - async - System.Threading.Tasks.Task - ExecuteAsync
|
||||
MethodDeclaration - - public async - System.Threading.Tasks.Task - ExecuteAsync
|
||||
HtmlContent - (22:0,22 [2] BasicTagHelpers_Prefixed.cshtml)
|
||||
IntermediateToken - (22:0,22 [2] BasicTagHelpers_Prefixed.cshtml) - Html - \n
|
||||
HtmlContent - (55:1,31 [54] BasicTagHelpers_Prefixed.cshtml)
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ Document -
|
|||
DeclarePreallocatedTagHelperAttribute - - __tagHelperAttribute_0 - type - checkbox - HtmlAttributeValueStyle.DoubleQuotes
|
||||
DeclarePreallocatedTagHelperHtmlAttribute - - __tagHelperAttribute_1 - class - Hello World - AttributeStructure.DoubleQuotes
|
||||
DeclareTagHelperFields - - TestNamespace.PTagHelper - TestNamespace.InputTagHelper - TestNamespace.InputTagHelper2
|
||||
MethodDeclaration - - public - async - System.Threading.Tasks.Task - ExecuteAsync
|
||||
MethodDeclaration - - public async - System.Threading.Tasks.Task - ExecuteAsync
|
||||
HtmlContent - (57:2,0 [52] BasicTagHelpers_Prefixed.cshtml)
|
||||
IntermediateToken - (57:2,0 [2] BasicTagHelpers_Prefixed.cshtml) - Html - \n
|
||||
IntermediateToken - (59:3,0 [7] BasicTagHelpers_Prefixed.cshtml) - Html - <THSdiv
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ Document -
|
|||
DeclarePreallocatedTagHelperAttribute - - __tagHelperAttribute_1 - type - checkbox - HtmlAttributeValueStyle.DoubleQuotes
|
||||
DeclarePreallocatedTagHelperHtmlAttribute - - __tagHelperAttribute_2 - class - Hello World - AttributeStructure.DoubleQuotes
|
||||
DeclareTagHelperFields - - TestNamespace.PTagHelper - TestNamespace.InputTagHelper - TestNamespace.InputTagHelper2
|
||||
MethodDeclaration - - public - async - System.Threading.Tasks.Task - ExecuteAsync
|
||||
MethodDeclaration - - public async - System.Threading.Tasks.Task - ExecuteAsync
|
||||
HtmlContent - (72:2,0 [49] BasicTagHelpers_RemoveTagHelper.cshtml)
|
||||
IntermediateToken - (72:2,0 [2] BasicTagHelpers_RemoveTagHelper.cshtml) - Html - \n
|
||||
IntermediateToken - (74:3,0 [4] BasicTagHelpers_RemoveTagHelper.cshtml) - Html - <div
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ Document -
|
|||
DeclarePreallocatedTagHelperHtmlAttribute - - __tagHelperAttribute_3 - class - Hello World - AttributeStructure.DoubleQuotes
|
||||
DeclarePreallocatedTagHelperHtmlAttribute - - __tagHelperAttribute_4 - data-delay - 1000 - AttributeStructure.DoubleQuotes
|
||||
DeclareTagHelperFields - - TestNamespace.PTagHelper - TestNamespace.InputTagHelper - TestNamespace.InputTagHelper2
|
||||
MethodDeclaration - - public - async - System.Threading.Tasks.Task - ExecuteAsync
|
||||
MethodDeclaration - - public async - System.Threading.Tasks.Task - ExecuteAsync
|
||||
HtmlContent - (33:1,0 [71] BasicTagHelpers.cshtml)
|
||||
IntermediateToken - (33:1,0 [2] BasicTagHelpers.cshtml) - Html - \n
|
||||
IntermediateToken - (35:2,0 [4] BasicTagHelpers.cshtml) - Html - <div
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ Document -
|
|||
DesignTimeDirective -
|
||||
CSharpCode -
|
||||
IntermediateToken - - CSharp - private static System.Object __o = null;
|
||||
MethodDeclaration - - public - async - System.Threading.Tasks.Task - ExecuteAsync
|
||||
MethodDeclaration - - public async - System.Threading.Tasks.Task - ExecuteAsync
|
||||
CSharpCode - (2:0,2 [18] Blocks.cshtml)
|
||||
IntermediateToken - (2:0,2 [18] Blocks.cshtml) - CSharp - \n int i = 1;\n
|
||||
HtmlContent - (23:3,0 [2] Blocks.cshtml)
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
Document -
|
||||
NamespaceDeclaration - - Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles
|
||||
ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_Blocks_Runtime - -
|
||||
MethodDeclaration - - public - async - System.Threading.Tasks.Task - ExecuteAsync
|
||||
MethodDeclaration - - public async - System.Threading.Tasks.Task - ExecuteAsync
|
||||
CSharpCode - (2:0,2 [18] Blocks.cshtml)
|
||||
IntermediateToken - (2:0,2 [18] Blocks.cshtml) - CSharp - \n int i = 1;\n
|
||||
HtmlContent - (23:3,0 [2] Blocks.cshtml)
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ Document -
|
|||
DesignTimeDirective -
|
||||
CSharpCode -
|
||||
IntermediateToken - - CSharp - private static System.Object __o = null;
|
||||
MethodDeclaration - - public - async - System.Threading.Tasks.Task - ExecuteAsync
|
||||
MethodDeclaration - - public async - System.Threading.Tasks.Task - ExecuteAsync
|
||||
HtmlContent - (0:0,0 [12] CSharp7.cshtml)
|
||||
IntermediateToken - (0:0,0 [6] CSharp7.cshtml) - Html - <body>
|
||||
IntermediateToken - (6:0,6 [6] CSharp7.cshtml) - Html - \n
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
Document -
|
||||
NamespaceDeclaration - - Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles
|
||||
ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_CSharp7_Runtime - -
|
||||
MethodDeclaration - - public - async - System.Threading.Tasks.Task - ExecuteAsync
|
||||
MethodDeclaration - - public async - System.Threading.Tasks.Task - ExecuteAsync
|
||||
HtmlContent - (0:0,0 [8] CSharp7.cshtml)
|
||||
IntermediateToken - (0:0,0 [6] CSharp7.cshtml) - Html - <body>
|
||||
IntermediateToken - (6:0,6 [2] CSharp7.cshtml) - Html - \n
|
||||
|
|
|
|||
|
|
@ -4,6 +4,6 @@ Document -
|
|||
DesignTimeDirective -
|
||||
CSharpCode -
|
||||
IntermediateToken - - CSharp - private static System.Object __o = null;
|
||||
MethodDeclaration - - public - async - System.Threading.Tasks.Task - ExecuteAsync
|
||||
MethodDeclaration - - public async - System.Threading.Tasks.Task - ExecuteAsync
|
||||
CSharpCode - (2:0,2 [0] CodeBlockAtEOF.cshtml)
|
||||
IntermediateToken - (2:0,2 [0] CodeBlockAtEOF.cshtml) - CSharp -
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
Document -
|
||||
NamespaceDeclaration - - Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles
|
||||
ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_CodeBlockAtEOF_Runtime - -
|
||||
MethodDeclaration - - public - async - System.Threading.Tasks.Task - ExecuteAsync
|
||||
MethodDeclaration - - public async - System.Threading.Tasks.Task - ExecuteAsync
|
||||
CSharpCode - (2:0,2 [0] CodeBlockAtEOF.cshtml)
|
||||
IntermediateToken - (2:0,2 [0] CodeBlockAtEOF.cshtml) - CSharp -
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ Document -
|
|||
DesignTimeDirective -
|
||||
CSharpCode -
|
||||
IntermediateToken - - CSharp - private static System.Object __o = null;
|
||||
MethodDeclaration - - public - async - System.Threading.Tasks.Task - ExecuteAsync
|
||||
MethodDeclaration - - public async - System.Threading.Tasks.Task - ExecuteAsync
|
||||
CSharpCode - (2:0,2 [17] CodeBlockWithTextElement.cshtml)
|
||||
IntermediateToken - (2:0,2 [17] CodeBlockWithTextElement.cshtml) - CSharp - \n var a = 1;
|
||||
HtmlContent - (25:1,21 [3] CodeBlockWithTextElement.cshtml)
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
Document -
|
||||
NamespaceDeclaration - - Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles
|
||||
ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_CodeBlockWithTextElement_Runtime - -
|
||||
MethodDeclaration - - public - async - System.Threading.Tasks.Task - ExecuteAsync
|
||||
MethodDeclaration - - public async - System.Threading.Tasks.Task - ExecuteAsync
|
||||
CSharpCode - (2:0,2 [17] CodeBlockWithTextElement.cshtml)
|
||||
IntermediateToken - (2:0,2 [17] CodeBlockWithTextElement.cshtml) - CSharp - \n var a = 1;
|
||||
HtmlContent - (25:1,21 [3] CodeBlockWithTextElement.cshtml)
|
||||
|
|
|
|||
|
|
@ -4,6 +4,6 @@ Document -
|
|||
DesignTimeDirective -
|
||||
CSharpCode -
|
||||
IntermediateToken - - CSharp - private static System.Object __o = null;
|
||||
MethodDeclaration - - public - async - System.Threading.Tasks.Task - ExecuteAsync
|
||||
MethodDeclaration - - public async - System.Threading.Tasks.Task - ExecuteAsync
|
||||
CSharpCode - (2:0,2 [115] CodeBlock.cshtml)
|
||||
IntermediateToken - (2:0,2 [115] CodeBlock.cshtml) - CSharp - \n for(int i = 1; i <= 10; i++) {\n Output.Write("<p>Hello from C#, #" + i.ToString() + "</p>");\n }\n
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
Document -
|
||||
NamespaceDeclaration - - Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles
|
||||
ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_CodeBlock_Runtime - -
|
||||
MethodDeclaration - - public - async - System.Threading.Tasks.Task - ExecuteAsync
|
||||
MethodDeclaration - - public async - System.Threading.Tasks.Task - ExecuteAsync
|
||||
CSharpCode - (2:0,2 [115] CodeBlock.cshtml)
|
||||
IntermediateToken - (2:0,2 [115] CodeBlock.cshtml) - CSharp - \n for(int i = 1; i <= 10; i++) {\n Output.Write("<p>Hello from C#, #" + i.ToString() + "</p>");\n }\n
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ Document -
|
|||
CSharpCode -
|
||||
IntermediateToken - - CSharp - private static System.Object __o = null;
|
||||
DeclareTagHelperFields - - TestNamespace.PTagHelper - TestNamespace.InputTagHelper - TestNamespace.InputTagHelper2
|
||||
MethodDeclaration - - public - async - System.Threading.Tasks.Task - ExecuteAsync
|
||||
MethodDeclaration - - public async - System.Threading.Tasks.Task - ExecuteAsync
|
||||
HtmlContent - (31:0,31 [4] ComplexTagHelpers.cshtml)
|
||||
IntermediateToken - (31:0,31 [4] ComplexTagHelpers.cshtml) - Html - \n\n
|
||||
CSharpCode - (36:2,1 [52] ComplexTagHelpers.cshtml)
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ Document -
|
|||
DeclarePreallocatedTagHelperHtmlAttribute - - __tagHelperAttribute_6 - unbound - world - AttributeStructure.DoubleQuotes
|
||||
DeclarePreallocatedTagHelperHtmlAttribute - - __tagHelperAttribute_7 - class - hello - AttributeStructure.DoubleQuotes
|
||||
DeclareTagHelperFields - - TestNamespace.PTagHelper - TestNamespace.InputTagHelper - TestNamespace.InputTagHelper2
|
||||
MethodDeclaration - - public - async - System.Threading.Tasks.Task - ExecuteAsync
|
||||
MethodDeclaration - - public async - System.Threading.Tasks.Task - ExecuteAsync
|
||||
HtmlContent - (33:1,0 [2] ComplexTagHelpers.cshtml)
|
||||
IntermediateToken - (33:1,0 [2] ComplexTagHelpers.cshtml) - Html - \n
|
||||
CSharpCode - (36:2,1 [48] ComplexTagHelpers.cshtml)
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ Document -
|
|||
DesignTimeDirective -
|
||||
CSharpCode -
|
||||
IntermediateToken - - CSharp - private static System.Object __o = null;
|
||||
MethodDeclaration - - public - async - System.Threading.Tasks.Task - ExecuteAsync
|
||||
MethodDeclaration - - public async - System.Threading.Tasks.Task - ExecuteAsync
|
||||
CSharpCode - (2:0,2 [48] ConditionalAttributes.cshtml)
|
||||
IntermediateToken - (2:0,2 [48] ConditionalAttributes.cshtml) - CSharp - \n var ch = true;\n var cls = "bar";\n
|
||||
HtmlContent - (50:3,4 [16] ConditionalAttributes.cshtml)
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
Document -
|
||||
NamespaceDeclaration - - Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles
|
||||
ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_ConditionalAttributes_Runtime - -
|
||||
MethodDeclaration - - public - async - System.Threading.Tasks.Task - ExecuteAsync
|
||||
MethodDeclaration - - public async - System.Threading.Tasks.Task - ExecuteAsync
|
||||
CSharpCode - (2:0,2 [44] ConditionalAttributes.cshtml)
|
||||
IntermediateToken - (2:0,2 [44] ConditionalAttributes.cshtml) - CSharp - \n var ch = true;\n var cls = "bar";\n
|
||||
HtmlContent - (46:3,0 [28] ConditionalAttributes.cshtml)
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ Document -
|
|||
DeclarePreallocatedTagHelperAttribute - - __tagHelperAttribute_7 - type - checkbox - HtmlAttributeValueStyle.DoubleQuotes
|
||||
DeclarePreallocatedTagHelperHtmlAttribute - - __tagHelperAttribute_8 - value - 2 TagHelper - AttributeStructure.DoubleQuotes
|
||||
DeclareTagHelperFields - - TestNamespace.ATagHelper - TestNamespace.CatchAllTagHelper - TestNamespace.ATagHelperMultipleSelectors - TestNamespace.InputTagHelper - TestNamespace.InputTagHelper2 - TestNamespace.CatchAllTagHelper2
|
||||
MethodDeclaration - - public - async - System.Threading.Tasks.Task - ExecuteAsync
|
||||
MethodDeclaration - - public async - System.Threading.Tasks.Task - ExecuteAsync
|
||||
HtmlContent - (33:1,0 [2] CssSelectorTagHelperAttributes.cshtml)
|
||||
IntermediateToken - (33:1,0 [2] CssSelectorTagHelperAttributes.cshtml) - Html - \n
|
||||
TagHelper - (35:2,0 [30] CssSelectorTagHelperAttributes.cshtml) - a - TagMode.StartTagAndEndTag
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ Document -
|
|||
DirectiveToken - (173:11,9 [6] DesignTime.cshtml) - Footer
|
||||
CSharpCode -
|
||||
IntermediateToken - - CSharp - private static System.Object __o = null;
|
||||
MethodDeclaration - - public - async - System.Threading.Tasks.Task - ExecuteAsync
|
||||
MethodDeclaration - - public async - System.Threading.Tasks.Task - ExecuteAsync
|
||||
HtmlContent - (0:0,0 [19] DesignTime.cshtml)
|
||||
IntermediateToken - (0:0,0 [5] DesignTime.cshtml) - Html - <div>
|
||||
IntermediateToken - (5:0,5 [14] DesignTime.cshtml) - Html - \n
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ Document -
|
|||
CSharpCode -
|
||||
IntermediateToken - - CSharp - private static System.Object __o = null;
|
||||
DeclareTagHelperFields - - TestNamespace.PTagHelper - TestNamespace.InputTagHelper - TestNamespace.InputTagHelper2
|
||||
MethodDeclaration - - public - async - System.Threading.Tasks.Task - ExecuteAsync
|
||||
MethodDeclaration - - public async - System.Threading.Tasks.Task - ExecuteAsync
|
||||
HtmlContent - (31:0,31 [4] DuplicateAttributeTagHelpers.cshtml)
|
||||
IntermediateToken - (31:0,31 [4] DuplicateAttributeTagHelpers.cshtml) - Html - \n\n
|
||||
TagHelper - (35:2,0 [259] DuplicateAttributeTagHelpers.cshtml) - p - TagMode.StartTagAndEndTag
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ Document -
|
|||
DeclarePreallocatedTagHelperHtmlAttribute - - __tagHelperAttribute_7 - AGE - 40 - AttributeStructure.DoubleQuotes
|
||||
DeclarePreallocatedTagHelperHtmlAttribute - - __tagHelperAttribute_8 - Age - 500 - AttributeStructure.DoubleQuotes
|
||||
DeclareTagHelperFields - - TestNamespace.PTagHelper - TestNamespace.InputTagHelper - TestNamespace.InputTagHelper2
|
||||
MethodDeclaration - - public - async - System.Threading.Tasks.Task - ExecuteAsync
|
||||
MethodDeclaration - - public async - System.Threading.Tasks.Task - ExecuteAsync
|
||||
HtmlContent - (33:1,0 [2] DuplicateAttributeTagHelpers.cshtml)
|
||||
IntermediateToken - (33:1,0 [2] DuplicateAttributeTagHelpers.cshtml) - Html - \n
|
||||
TagHelper - (35:2,0 [259] DuplicateAttributeTagHelpers.cshtml) - p - TagMode.StartTagAndEndTag
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ Document -
|
|||
CSharpCode -
|
||||
IntermediateToken - - CSharp - private static System.Object __o = null;
|
||||
DeclareTagHelperFields - - TestNamespace.InputTagHelper - TestNamespace.CatchAllTagHelper
|
||||
MethodDeclaration - - public - async - System.Threading.Tasks.Task - ExecuteAsync
|
||||
MethodDeclaration - - public async - System.Threading.Tasks.Task - ExecuteAsync
|
||||
HtmlContent - (31:0,31 [4] DuplicateTargetTagHelper.cshtml)
|
||||
IntermediateToken - (31:0,31 [4] DuplicateTargetTagHelper.cshtml) - Html - \n\n
|
||||
TagHelper - (35:2,0 [40] DuplicateTargetTagHelper.cshtml) - input - TagMode.SelfClosing
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ Document -
|
|||
ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_DuplicateTargetTagHelper_Runtime - -
|
||||
DeclarePreallocatedTagHelperAttribute - - __tagHelperAttribute_0 - type - checkbox - HtmlAttributeValueStyle.DoubleQuotes
|
||||
DeclareTagHelperFields - - TestNamespace.InputTagHelper - TestNamespace.CatchAllTagHelper
|
||||
MethodDeclaration - - public - async - System.Threading.Tasks.Task - ExecuteAsync
|
||||
MethodDeclaration - - public async - System.Threading.Tasks.Task - ExecuteAsync
|
||||
HtmlContent - (33:1,0 [2] DuplicateTargetTagHelper.cshtml)
|
||||
IntermediateToken - (33:1,0 [2] DuplicateTargetTagHelper.cshtml) - Html - \n
|
||||
TagHelper - (35:2,0 [40] DuplicateTargetTagHelper.cshtml) - input - TagMode.SelfClosing
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ Document -
|
|||
CSharpCode -
|
||||
IntermediateToken - - CSharp - private static System.Object __o = null;
|
||||
DeclareTagHelperFields - - TestNamespace.InputTagHelper
|
||||
MethodDeclaration - - public - async - System.Threading.Tasks.Task - ExecuteAsync
|
||||
MethodDeclaration - - public async - System.Threading.Tasks.Task - ExecuteAsync
|
||||
HtmlContent - (31:0,31 [4] DynamicAttributeTagHelpers.cshtml)
|
||||
IntermediateToken - (31:0,31 [4] DynamicAttributeTagHelpers.cshtml) - Html - \n\n
|
||||
TagHelper - (35:2,0 [40] DynamicAttributeTagHelpers.cshtml) - input - TagMode.SelfClosing
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ Document -
|
|||
NamespaceDeclaration - - Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles
|
||||
ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_DynamicAttributeTagHelpers_Runtime - -
|
||||
DeclareTagHelperFields - - TestNamespace.InputTagHelper
|
||||
MethodDeclaration - - public - async - System.Threading.Tasks.Task - ExecuteAsync
|
||||
MethodDeclaration - - public async - System.Threading.Tasks.Task - ExecuteAsync
|
||||
HtmlContent - (33:1,0 [2] DynamicAttributeTagHelpers.cshtml)
|
||||
IntermediateToken - (33:1,0 [2] DynamicAttributeTagHelpers.cshtml) - Html - \n
|
||||
TagHelper - (35:2,0 [40] DynamicAttributeTagHelpers.cshtml) - input - TagMode.SelfClosing
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ Document -
|
|||
CSharpCode -
|
||||
IntermediateToken - - CSharp - private static System.Object __o = null;
|
||||
DeclareTagHelperFields - - TestNamespace.InputTagHelper - TestNamespace.InputTagHelper2 - TestNamespace.PTagHelper
|
||||
MethodDeclaration - - public - async - System.Threading.Tasks.Task - ExecuteAsync
|
||||
MethodDeclaration - - public async - System.Threading.Tasks.Task - ExecuteAsync
|
||||
HtmlContent - (29:0,29 [15] EmptyAttributeTagHelpers.cshtml)
|
||||
IntermediateToken - (29:0,29 [4] EmptyAttributeTagHelpers.cshtml) - Html - \n\n
|
||||
IntermediateToken - (33:2,0 [5] EmptyAttributeTagHelpers.cshtml) - Html - <div>
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ Document -
|
|||
DeclarePreallocatedTagHelperAttribute - - __tagHelperAttribute_0 - type - - HtmlAttributeValueStyle.DoubleQuotes
|
||||
DeclarePreallocatedTagHelperHtmlAttribute - - __tagHelperAttribute_1 - class - - AttributeStructure.DoubleQuotes
|
||||
DeclareTagHelperFields - - TestNamespace.InputTagHelper - TestNamespace.InputTagHelper2 - TestNamespace.PTagHelper
|
||||
MethodDeclaration - - public - async - System.Threading.Tasks.Task - ExecuteAsync
|
||||
MethodDeclaration - - public async - System.Threading.Tasks.Task - ExecuteAsync
|
||||
HtmlContent - (31:1,0 [13] EmptyAttributeTagHelpers.cshtml)
|
||||
IntermediateToken - (31:1,0 [2] EmptyAttributeTagHelpers.cshtml) - Html - \n
|
||||
IntermediateToken - (33:2,0 [5] EmptyAttributeTagHelpers.cshtml) - Html - <div>
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ Document -
|
|||
DesignTimeDirective -
|
||||
CSharpCode -
|
||||
IntermediateToken - - CSharp - private static System.Object __o = null;
|
||||
MethodDeclaration - - public - async - System.Threading.Tasks.Task - ExecuteAsync
|
||||
MethodDeclaration - - public async - System.Threading.Tasks.Task - ExecuteAsync
|
||||
HtmlContent - (0:0,0 [18] EmptyCodeBlock.cshtml)
|
||||
IntermediateToken - (0:0,0 [18] EmptyCodeBlock.cshtml) - Html - This is markup\n\n
|
||||
CSharpCode - (20:2,2 [0] EmptyCodeBlock.cshtml)
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
Document -
|
||||
NamespaceDeclaration - - Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles
|
||||
ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_EmptyCodeBlock_Runtime - -
|
||||
MethodDeclaration - - public - async - System.Threading.Tasks.Task - ExecuteAsync
|
||||
MethodDeclaration - - public async - System.Threading.Tasks.Task - ExecuteAsync
|
||||
HtmlContent - (0:0,0 [18] EmptyCodeBlock.cshtml)
|
||||
IntermediateToken - (0:0,0 [18] EmptyCodeBlock.cshtml) - Html - This is markup\n\n
|
||||
CSharpCode - (20:2,2 [0] EmptyCodeBlock.cshtml)
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ Document -
|
|||
DesignTimeDirective -
|
||||
CSharpCode -
|
||||
IntermediateToken - - CSharp - private static System.Object __o = null;
|
||||
MethodDeclaration - - public - async - System.Threading.Tasks.Task - ExecuteAsync
|
||||
MethodDeclaration - - public async - System.Threading.Tasks.Task - ExecuteAsync
|
||||
HtmlContent - (0:0,0 [18] EmptyExplicitExpression.cshtml)
|
||||
IntermediateToken - (0:0,0 [18] EmptyExplicitExpression.cshtml) - Html - This is markup\n\n
|
||||
CSharpExpression - (20:2,2 [0] EmptyExplicitExpression.cshtml)
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
Document -
|
||||
NamespaceDeclaration - - Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles
|
||||
ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_EmptyExplicitExpression_Runtime - -
|
||||
MethodDeclaration - - public - async - System.Threading.Tasks.Task - ExecuteAsync
|
||||
MethodDeclaration - - public async - System.Threading.Tasks.Task - ExecuteAsync
|
||||
HtmlContent - (0:0,0 [18] EmptyExplicitExpression.cshtml)
|
||||
IntermediateToken - (0:0,0 [18] EmptyExplicitExpression.cshtml) - Html - This is markup\n\n
|
||||
CSharpExpression - (20:2,2 [0] EmptyExplicitExpression.cshtml)
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ Document -
|
|||
DesignTimeDirective -
|
||||
CSharpCode -
|
||||
IntermediateToken - - CSharp - private static System.Object __o = null;
|
||||
MethodDeclaration - - public - async - System.Threading.Tasks.Task - ExecuteAsync
|
||||
MethodDeclaration - - public async - System.Threading.Tasks.Task - ExecuteAsync
|
||||
CSharpCode - (2:0,2 [6] EmptyImplicitExpressionInCode.cshtml)
|
||||
IntermediateToken - (2:0,2 [6] EmptyImplicitExpressionInCode.cshtml) - CSharp - \n
|
||||
CSharpExpression - (9:1,5 [0] EmptyImplicitExpressionInCode.cshtml)
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
Document -
|
||||
NamespaceDeclaration - - Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles
|
||||
ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_EmptyImplicitExpressionInCode_Runtime - -
|
||||
MethodDeclaration - - public - async - System.Threading.Tasks.Task - ExecuteAsync
|
||||
MethodDeclaration - - public async - System.Threading.Tasks.Task - ExecuteAsync
|
||||
CSharpCode - (2:0,2 [6] EmptyImplicitExpressionInCode.cshtml)
|
||||
IntermediateToken - (2:0,2 [6] EmptyImplicitExpressionInCode.cshtml) - CSharp - \n
|
||||
CSharpExpression - (9:1,5 [0] EmptyImplicitExpressionInCode.cshtml)
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ Document -
|
|||
DesignTimeDirective -
|
||||
CSharpCode -
|
||||
IntermediateToken - - CSharp - private static System.Object __o = null;
|
||||
MethodDeclaration - - public - async - System.Threading.Tasks.Task - ExecuteAsync
|
||||
MethodDeclaration - - public async - System.Threading.Tasks.Task - ExecuteAsync
|
||||
HtmlContent - (0:0,0 [18] EmptyImplicitExpression.cshtml)
|
||||
IntermediateToken - (0:0,0 [18] EmptyImplicitExpression.cshtml) - Html - This is markup\n\n
|
||||
CSharpExpression - (19:2,1 [0] EmptyImplicitExpression.cshtml)
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
Document -
|
||||
NamespaceDeclaration - - Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles
|
||||
ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_EmptyImplicitExpression_Runtime - -
|
||||
MethodDeclaration - - public - async - System.Threading.Tasks.Task - ExecuteAsync
|
||||
MethodDeclaration - - public async - System.Threading.Tasks.Task - ExecuteAsync
|
||||
HtmlContent - (0:0,0 [18] EmptyImplicitExpression.cshtml)
|
||||
IntermediateToken - (0:0,0 [18] EmptyImplicitExpression.cshtml) - Html - This is markup\n\n
|
||||
CSharpExpression - (19:2,1 [0] EmptyImplicitExpression.cshtml)
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ Document -
|
|||
CSharpCode -
|
||||
IntermediateToken - - CSharp - private static System.Object __o = null;
|
||||
DeclareTagHelperFields - - TestNamespace.InputTagHelper - TestNamespace.CatchAllTagHelper
|
||||
MethodDeclaration - - public - async - System.Threading.Tasks.Task - ExecuteAsync
|
||||
MethodDeclaration - - public async - System.Threading.Tasks.Task - ExecuteAsync
|
||||
HtmlContent - (31:0,31 [4] EnumTagHelpers.cshtml)
|
||||
IntermediateToken - (31:0,31 [4] EnumTagHelpers.cshtml) - Html - \n\n
|
||||
CSharpCode - (37:2,2 [39] EnumTagHelpers.cshtml)
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue