Merge branch 'release/3.1' into merge/release/3.0-to-release/3.1\n\nCommit migrated from 7e480a52e3
This commit is contained in:
commit
9328e4723e
|
|
@ -8,7 +8,7 @@ namespace __GeneratedComponent
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Microsoft.AspNetCore.Components;
|
using Microsoft.AspNetCore.Components;
|
||||||
public class AspNetCore_d3c3d6059615673cb46fc4974164d61eabadb890 : Microsoft.AspNetCore.Components.ComponentBase, IDisposable
|
public partial class AspNetCore_d3c3d6059615673cb46fc4974164d61eabadb890 : Microsoft.AspNetCore.Components.ComponentBase, IDisposable
|
||||||
{
|
{
|
||||||
#pragma warning disable 219
|
#pragma warning disable 219
|
||||||
private void __RazorDirectiveTokenHelpers__() {
|
private void __RazorDirectiveTokenHelpers__() {
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@ Document -
|
||||||
UsingDirective - (51:2,1 [17] ) - System.Linq
|
UsingDirective - (51:2,1 [17] ) - System.Linq
|
||||||
UsingDirective - (71:3,1 [28] ) - System.Threading.Tasks
|
UsingDirective - (71:3,1 [28] ) - System.Threading.Tasks
|
||||||
UsingDirective - (102:4,1 [37] ) - Microsoft.AspNetCore.Components
|
UsingDirective - (102:4,1 [37] ) - Microsoft.AspNetCore.Components
|
||||||
ClassDeclaration - - public - AspNetCore_d3c3d6059615673cb46fc4974164d61eabadb890 - Microsoft.AspNetCore.Components.ComponentBase - IDisposable
|
ClassDeclaration - - public partial - AspNetCore_d3c3d6059615673cb46fc4974164d61eabadb890 - Microsoft.AspNetCore.Components.ComponentBase - IDisposable
|
||||||
DesignTimeDirective -
|
DesignTimeDirective -
|
||||||
DirectiveToken - (12:0,12 [11] BasicComponent.cshtml) - IDisposable
|
DirectiveToken - (12:0,12 [11] BasicComponent.cshtml) - IDisposable
|
||||||
CSharpCode -
|
CSharpCode -
|
||||||
|
|
|
||||||
|
|
@ -1,23 +1,23 @@
|
||||||
Source Location: (12:0,12 [11] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/BasicComponent.cshtml)
|
Source Location: (12:0,12 [11] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/BasicComponent.cshtml)
|
||||||
|IDisposable|
|
|IDisposable|
|
||||||
Generated Location: (641:17,0 [11] )
|
Generated Location: (649:17,0 [11] )
|
||||||
|IDisposable|
|
|IDisposable|
|
||||||
|
|
||||||
Source Location: (38:1,13 [15] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/BasicComponent.cshtml)
|
Source Location: (38:1,13 [15] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/BasicComponent.cshtml)
|
||||||
|this.ToString()|
|
|this.ToString()|
|
||||||
Generated Location: (1240:35,13 [15] )
|
Generated Location: (1248:35,13 [15] )
|
||||||
|this.ToString()|
|
|this.ToString()|
|
||||||
|
|
||||||
Source Location: (79:3,5 [29] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/BasicComponent.cshtml)
|
Source Location: (79:3,5 [29] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/BasicComponent.cshtml)
|
||||||
|string.Format("{0}", "Hello")|
|
|string.Format("{0}", "Hello")|
|
||||||
Generated Location: (1437:43,6 [29] )
|
Generated Location: (1445:43,6 [29] )
|
||||||
|string.Format("{0}", "Hello")|
|
|string.Format("{0}", "Hello")|
|
||||||
|
|
||||||
Source Location: (132:6,12 [37] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/BasicComponent.cshtml)
|
Source Location: (132:6,12 [37] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/BasicComponent.cshtml)
|
||||||
|
|
|
|
||||||
void IDisposable.Dispose(){ }
|
void IDisposable.Dispose(){ }
|
||||||
|
|
|
|
||||||
Generated Location: (1689:52,12 [37] )
|
Generated Location: (1697:52,12 [37] )
|
||||||
|
|
|
|
||||||
void IDisposable.Dispose(){ }
|
void IDisposable.Dispose(){ }
|
||||||
|
|
|
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@ namespace __GeneratedComponent
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Microsoft.AspNetCore.Components;
|
using Microsoft.AspNetCore.Components;
|
||||||
public class AspNetCore_d3c3d6059615673cb46fc4974164d61eabadb890 : Microsoft.AspNetCore.Components.ComponentBase, IDisposable
|
public partial class AspNetCore_d3c3d6059615673cb46fc4974164d61eabadb890 : Microsoft.AspNetCore.Components.ComponentBase, IDisposable
|
||||||
{
|
{
|
||||||
#pragma warning disable 1998
|
#pragma warning disable 1998
|
||||||
protected override void BuildRenderTree(Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder __builder)
|
protected override void BuildRenderTree(Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder __builder)
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@ Document -
|
||||||
UsingDirective - (51:2,1 [19] ) - System.Linq
|
UsingDirective - (51:2,1 [19] ) - System.Linq
|
||||||
UsingDirective - (71:3,1 [30] ) - System.Threading.Tasks
|
UsingDirective - (71:3,1 [30] ) - System.Threading.Tasks
|
||||||
UsingDirective - (102:4,1 [37] ) - Microsoft.AspNetCore.Components
|
UsingDirective - (102:4,1 [37] ) - Microsoft.AspNetCore.Components
|
||||||
ClassDeclaration - - public - AspNetCore_d3c3d6059615673cb46fc4974164d61eabadb890 - Microsoft.AspNetCore.Components.ComponentBase - IDisposable
|
ClassDeclaration - - public partial - AspNetCore_d3c3d6059615673cb46fc4974164d61eabadb890 - Microsoft.AspNetCore.Components.ComponentBase - IDisposable
|
||||||
MethodDeclaration - - protected override - void - BuildRenderTree
|
MethodDeclaration - - protected override - void - BuildRenderTree
|
||||||
MarkupElement - (25:1,0 [91] BasicComponent.cshtml) - div
|
MarkupElement - (25:1,0 [91] BasicComponent.cshtml) - div
|
||||||
HtmlAttribute - (29:1,4 [25] BasicComponent.cshtml) - class=" - "
|
HtmlAttribute - (29:1,4 [25] BasicComponent.cshtml) - class=" - "
|
||||||
|
|
|
||||||
|
|
@ -162,6 +162,12 @@
|
||||||
<data name="EventHandlerTagHelper_Documentation" xml:space="preserve">
|
<data name="EventHandlerTagHelper_Documentation" xml:space="preserve">
|
||||||
<value>Sets the '{0}' attribute to the provided string or delegate value. A delegate value should be of type '{1}'.</value>
|
<value>Sets the '{0}' attribute to the provided string or delegate value. A delegate value should be of type '{1}'.</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="EventHandlerTagHelper_PreventDefault_Documentation" xml:space="preserve">
|
||||||
|
<value>Specifies whether to cancel (if cancelable) the default action that belongs to the '{0}' event.</value>
|
||||||
|
</data>
|
||||||
|
<data name="EventHandlerTagHelper_StopPropagation_Documentation" xml:space="preserve">
|
||||||
|
<value>Specifies whether to prevent further propagation of the '{0}' event in the capturing and bubbling phases.</value>
|
||||||
|
</data>
|
||||||
<data name="ImplementsDirective_Description" xml:space="preserve">
|
<data name="ImplementsDirective_Description" xml:space="preserve">
|
||||||
<value>Declares an interface implementation for the current class.</value>
|
<value>Declares an interface implementation for the current class.</value>
|
||||||
</data>
|
</data>
|
||||||
|
|
|
||||||
|
|
@ -275,6 +275,7 @@ namespace Microsoft.AspNetCore.Razor.Language.Components
|
||||||
out var valueAttributeName,
|
out var valueAttributeName,
|
||||||
out var changeAttributeName,
|
out var changeAttributeName,
|
||||||
out var expressionAttributeName,
|
out var expressionAttributeName,
|
||||||
|
out var changeAttributeNode,
|
||||||
out var valueAttribute,
|
out var valueAttribute,
|
||||||
out var changeAttribute,
|
out var changeAttribute,
|
||||||
out var expressionAttribute))
|
out var expressionAttribute))
|
||||||
|
|
@ -393,12 +394,13 @@ namespace Microsoft.AspNetCore.Razor.Language.Components
|
||||||
[ComponentMetadata.Common.OriginalAttributeName] = node.OriginalAttributeName,
|
[ComponentMetadata.Common.OriginalAttributeName] = node.OriginalAttributeName,
|
||||||
},
|
},
|
||||||
AttributeName = changeAttributeName,
|
AttributeName = changeAttributeName,
|
||||||
|
AttributeNameExpression = changeAttributeNode,
|
||||||
Source = node.Source,
|
Source = node.Source,
|
||||||
|
|
||||||
Prefix = changeAttributeName + "=\"",
|
Prefix = changeAttributeName + "=\"",
|
||||||
Suffix = "\"",
|
Suffix = "\"",
|
||||||
|
|
||||||
EventUpdatesAttributeName = valueNode.AttributeName,
|
EventUpdatesAttributeName = valueAttributeName,
|
||||||
};
|
};
|
||||||
|
|
||||||
changeNode.Children.Add(new CSharpExpressionAttributeValueIntermediateNode());
|
changeNode.Children.Add(new CSharpExpressionAttributeValueIntermediateNode());
|
||||||
|
|
@ -510,6 +512,7 @@ namespace Microsoft.AspNetCore.Razor.Language.Components
|
||||||
out string valueAttributeName,
|
out string valueAttributeName,
|
||||||
out string changeAttributeName,
|
out string changeAttributeName,
|
||||||
out string expressionAttributeName,
|
out string expressionAttributeName,
|
||||||
|
out CSharpExpressionIntermediateNode changeAttributeNode,
|
||||||
out BoundAttributeDescriptor valueAttribute,
|
out BoundAttributeDescriptor valueAttribute,
|
||||||
out BoundAttributeDescriptor changeAttribute,
|
out BoundAttributeDescriptor changeAttribute,
|
||||||
out BoundAttributeDescriptor expressionAttribute)
|
out BoundAttributeDescriptor expressionAttribute)
|
||||||
|
|
@ -517,22 +520,11 @@ namespace Microsoft.AspNetCore.Razor.Language.Components
|
||||||
valueAttributeName = null;
|
valueAttributeName = null;
|
||||||
changeAttributeName = null;
|
changeAttributeName = null;
|
||||||
expressionAttributeName = null;
|
expressionAttributeName = null;
|
||||||
|
changeAttributeNode = null;
|
||||||
valueAttribute = null;
|
valueAttribute = null;
|
||||||
changeAttribute = null;
|
changeAttribute = null;
|
||||||
expressionAttribute = null;
|
expressionAttribute = null;
|
||||||
|
|
||||||
// Even though some of our 'bind' tag helpers specify the attribute names, they
|
|
||||||
// should still satisfy one of the valid syntaxes.
|
|
||||||
if (!TryParseBindAttribute(bindEntry, out valueAttributeName))
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (bindEntry.BindEventNode != null)
|
|
||||||
{
|
|
||||||
changeAttributeName = GetAttributeContent(bindEntry.BindEventNode)?.Content?.Trim('"');
|
|
||||||
}
|
|
||||||
|
|
||||||
// The tag helper specifies attribute names, they should win.
|
// The tag helper specifies attribute names, they should win.
|
||||||
//
|
//
|
||||||
// This handles cases like <input type="text" bind="@Foo" /> where the tag helper is
|
// This handles cases like <input type="text" bind="@Foo" /> where the tag helper is
|
||||||
|
|
@ -541,11 +533,33 @@ namespace Microsoft.AspNetCore.Razor.Language.Components
|
||||||
// We expect 1 bind tag helper per-node.
|
// We expect 1 bind tag helper per-node.
|
||||||
var node = bindEntry.BindNode;
|
var node = bindEntry.BindNode;
|
||||||
var attributeName = node.AttributeName;
|
var attributeName = node.AttributeName;
|
||||||
|
|
||||||
|
// Even though some of our 'bind' tag helpers specify the attribute names, they
|
||||||
|
// should still satisfy one of the valid syntaxes.
|
||||||
|
if (!TryParseBindAttribute(bindEntry, out valueAttributeName))
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
valueAttributeName = node.TagHelper.GetValueAttributeName() ?? valueAttributeName;
|
valueAttributeName = node.TagHelper.GetValueAttributeName() ?? valueAttributeName;
|
||||||
|
|
||||||
// If there an attribute that specifies the event like @bind:event="oninput",
|
// If there an attribute that specifies the event like @bind:event="oninput",
|
||||||
// that should be preferred. Otherwise, use the one from the tag helper.
|
// that should be preferred. Otherwise, use the one from the tag helper.
|
||||||
changeAttributeName ??= node.TagHelper.GetChangeAttributeName();
|
if (bindEntry.BindEventNode == null)
|
||||||
|
{
|
||||||
|
// @bind:event not specified
|
||||||
|
changeAttributeName ??= node.TagHelper.GetChangeAttributeName();
|
||||||
|
}
|
||||||
|
else if (TryExtractEventNodeStaticText(bindEntry.BindEventNode, out var text))
|
||||||
|
{
|
||||||
|
// @bind:event="oninput" - change attribute is static
|
||||||
|
changeAttributeName = text;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// @bind:event="@someExpr" - we can't know the name of the change attribute, it's dynamic
|
||||||
|
changeAttributeNode = ExtractEventNodeExpression(bindEntry.BindEventNode);
|
||||||
|
}
|
||||||
|
|
||||||
expressionAttributeName = node.TagHelper.GetExpressionAttributeName();
|
expressionAttributeName = node.TagHelper.GetExpressionAttributeName();
|
||||||
|
|
||||||
|
|
@ -554,7 +568,7 @@ namespace Microsoft.AspNetCore.Razor.Language.Components
|
||||||
if (componentTagHelper == null)
|
if (componentTagHelper == null)
|
||||||
{
|
{
|
||||||
// If it's not a component node then there isn't too much else to figure out.
|
// If it's not a component node then there isn't too much else to figure out.
|
||||||
return attributeName != null && changeAttributeName != null;
|
return attributeName != null && (changeAttributeName != null || changeAttributeNode != null);
|
||||||
}
|
}
|
||||||
|
|
||||||
// If this is a component, we need an attribute name for the value.
|
// If this is a component, we need an attribute name for the value.
|
||||||
|
|
@ -597,6 +611,28 @@ namespace Microsoft.AspNetCore.Razor.Language.Components
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
|
static bool TryExtractEventNodeStaticText(TagHelperDirectiveAttributeParameterIntermediateNode node, out string text)
|
||||||
|
{
|
||||||
|
if (node.Children[0] is HtmlContentIntermediateNode html)
|
||||||
|
{
|
||||||
|
text = GetAttributeContent(html).Content;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
text = null;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
static CSharpExpressionIntermediateNode ExtractEventNodeExpression(TagHelperDirectiveAttributeParameterIntermediateNode node)
|
||||||
|
{
|
||||||
|
if (node.Children[0] is CSharpExpressionIntermediateNode expression)
|
||||||
|
{
|
||||||
|
return expression;
|
||||||
|
}
|
||||||
|
|
||||||
|
return null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void RewriteNodesForComponentDelegateBind(
|
private void RewriteNodesForComponentDelegateBind(
|
||||||
|
|
|
||||||
|
|
@ -85,6 +85,11 @@ namespace Microsoft.AspNetCore.Razor.Language.Components
|
||||||
throw new ArgumentNullException(nameof(node));
|
throw new ArgumentNullException(nameof(node));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
WriteCSharpExpressionInnards(context, node);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void WriteCSharpExpressionInnards(CodeRenderingContext context, CSharpExpressionIntermediateNode node, string type = null)
|
||||||
|
{
|
||||||
if (node.Children.Count == 0)
|
if (node.Children.Count == 0)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
|
|
@ -95,9 +100,22 @@ namespace Microsoft.AspNetCore.Razor.Language.Components
|
||||||
using (context.CodeWriter.BuildLinePragma(node.Source.Value, context))
|
using (context.CodeWriter.BuildLinePragma(node.Source.Value, context))
|
||||||
{
|
{
|
||||||
var offset = DesignTimeVariable.Length + " = ".Length;
|
var offset = DesignTimeVariable.Length + " = ".Length;
|
||||||
|
|
||||||
|
if (type != null)
|
||||||
|
{
|
||||||
|
offset += type.Length + 2; // two parenthesis
|
||||||
|
}
|
||||||
|
|
||||||
context.CodeWriter.WritePadding(offset, node.Source, context);
|
context.CodeWriter.WritePadding(offset, node.Source, context);
|
||||||
context.CodeWriter.WriteStartAssignment(DesignTimeVariable);
|
context.CodeWriter.WriteStartAssignment(DesignTimeVariable);
|
||||||
|
|
||||||
|
if (type != null)
|
||||||
|
{
|
||||||
|
context.CodeWriter.Write("(");
|
||||||
|
context.CodeWriter.Write(type);
|
||||||
|
context.CodeWriter.Write(")");
|
||||||
|
}
|
||||||
|
|
||||||
for (var i = 0; i < node.Children.Count; i++)
|
for (var i = 0; i < node.Children.Count; i++)
|
||||||
{
|
{
|
||||||
if (node.Children[i] is IntermediateToken token && token.IsCSharp)
|
if (node.Children[i] is IntermediateToken token && token.IsCSharp)
|
||||||
|
|
@ -209,6 +227,13 @@ namespace Microsoft.AspNetCore.Razor.Language.Components
|
||||||
throw new ArgumentNullException(nameof(node));
|
throw new ArgumentNullException(nameof(node));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// This expression may contain code so we have to render it or else the design-time
|
||||||
|
// exprience is broken.
|
||||||
|
if (node.AttributeNameExpression is CSharpExpressionIntermediateNode expression)
|
||||||
|
{
|
||||||
|
WriteCSharpExpressionInnards(context, expression, "string");
|
||||||
|
}
|
||||||
|
|
||||||
context.RenderChildren(node);
|
context.RenderChildren(node);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -275,11 +300,11 @@ namespace Microsoft.AspNetCore.Razor.Language.Components
|
||||||
// Do nothing
|
// Do nothing
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void BeginWriteAttribute(CodeWriter codeWriter, string key)
|
protected override void BeginWriteAttribute(CodeRenderingContext context, string key)
|
||||||
{
|
{
|
||||||
if (codeWriter == null)
|
if (context == null)
|
||||||
{
|
{
|
||||||
throw new ArgumentNullException(nameof(codeWriter));
|
throw new ArgumentNullException(nameof(context));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (key == null)
|
if (key == null)
|
||||||
|
|
@ -287,7 +312,7 @@ namespace Microsoft.AspNetCore.Razor.Language.Components
|
||||||
throw new ArgumentNullException(nameof(key));
|
throw new ArgumentNullException(nameof(key));
|
||||||
}
|
}
|
||||||
|
|
||||||
codeWriter
|
context.CodeWriter
|
||||||
.WriteStartMethodInvocation($"{_scopeStack.BuilderVarName}.{nameof(ComponentsApi.RenderTreeBuilder.AddAttribute)}")
|
.WriteStartMethodInvocation($"{_scopeStack.BuilderVarName}.{nameof(ComponentsApi.RenderTreeBuilder.AddAttribute)}")
|
||||||
.Write("-1")
|
.Write("-1")
|
||||||
.WriteParameterSeparator()
|
.WriteParameterSeparator()
|
||||||
|
|
@ -295,6 +320,31 @@ namespace Microsoft.AspNetCore.Razor.Language.Components
|
||||||
.WriteParameterSeparator();
|
.WriteParameterSeparator();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected override void BeginWriteAttribute(CodeRenderingContext context, IntermediateNode expression)
|
||||||
|
{
|
||||||
|
if (context == null)
|
||||||
|
{
|
||||||
|
throw new ArgumentNullException(nameof(context));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (expression == null)
|
||||||
|
{
|
||||||
|
throw new ArgumentNullException(nameof(expression));
|
||||||
|
}
|
||||||
|
|
||||||
|
context.CodeWriter.WriteStartMethodInvocation($"{_scopeStack.BuilderVarName}.{ComponentsApi.RenderTreeBuilder.AddAttribute}");
|
||||||
|
context.CodeWriter.Write("-1");
|
||||||
|
context.CodeWriter.WriteParameterSeparator();
|
||||||
|
|
||||||
|
var tokens = GetCSharpTokens(expression);
|
||||||
|
for (var i = 0; i < tokens.Count; i++)
|
||||||
|
{
|
||||||
|
context.CodeWriter.Write(tokens[i].Content);
|
||||||
|
}
|
||||||
|
|
||||||
|
context.CodeWriter.WriteParameterSeparator();
|
||||||
|
}
|
||||||
|
|
||||||
public override void WriteComponent(CodeRenderingContext context, ComponentIntermediateNode node)
|
public override void WriteComponent(CodeRenderingContext context, ComponentIntermediateNode node)
|
||||||
{
|
{
|
||||||
if (context == null)
|
if (context == null)
|
||||||
|
|
@ -650,9 +700,10 @@ namespace Microsoft.AspNetCore.Razor.Language.Components
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool NeedsTypeCheck(ComponentAttributeIntermediateNode n)
|
static bool NeedsTypeCheck(ComponentAttributeIntermediateNode n)
|
||||||
{
|
{
|
||||||
return n.BoundAttribute != null && !n.BoundAttribute.IsWeaklyTyped();
|
// Weakly typed attributes will have their TypeName set to null.
|
||||||
|
return n.BoundAttribute != null && n.TypeName != null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -679,7 +730,7 @@ namespace Microsoft.AspNetCore.Razor.Language.Components
|
||||||
// __builder.AddAttribute(1, "ChildContent", (RenderFragment)((__builder73) => { ... }));
|
// __builder.AddAttribute(1, "ChildContent", (RenderFragment)((__builder73) => { ... }));
|
||||||
// OR
|
// OR
|
||||||
// __builder.AddAttribute(1, "ChildContent", (RenderFragment<Person>)((person) => (__builder73) => { ... }));
|
// __builder.AddAttribute(1, "ChildContent", (RenderFragment<Person>)((person) => (__builder73) => { ... }));
|
||||||
BeginWriteAttribute(context.CodeWriter, node.AttributeName);
|
BeginWriteAttribute(context, node.AttributeName);
|
||||||
context.CodeWriter.Write($"({node.TypeName})(");
|
context.CodeWriter.Write($"({node.TypeName})(");
|
||||||
|
|
||||||
WriteComponentChildContentInnards(context, node);
|
WriteComponentChildContentInnards(context, node);
|
||||||
|
|
|
||||||
|
|
@ -149,7 +149,7 @@ namespace Microsoft.AspNetCore.Razor.Language.Components
|
||||||
public static readonly RazorDiagnosticDescriptor EventHandler_Duplicates =
|
public static readonly RazorDiagnosticDescriptor EventHandler_Duplicates =
|
||||||
new RazorDiagnosticDescriptor(
|
new RazorDiagnosticDescriptor(
|
||||||
$"{DiagnosticPrefix}9990",
|
$"{DiagnosticPrefix}9990",
|
||||||
() => "The attribute '{0}' was matched by multiple event handlers attributes. Duplicates:{1}",
|
() => "The attribute '{0}' was matched by multiple event handler attributes. Duplicates:{1}",
|
||||||
RazorDiagnosticSeverity.Error);
|
RazorDiagnosticSeverity.Error);
|
||||||
|
|
||||||
public static RazorDiagnostic CreateEventHandler_Duplicates(SourceSpan? source, string attribute, TagHelperDirectiveAttributeIntermediateNode[] attributes)
|
public static RazorDiagnostic CreateEventHandler_Duplicates(SourceSpan? source, string attribute, TagHelperDirectiveAttributeIntermediateNode[] attributes)
|
||||||
|
|
@ -438,5 +438,21 @@ namespace Microsoft.AspNetCore.Razor.Language.Components
|
||||||
startTagName,
|
startTagName,
|
||||||
endTagName);
|
endTagName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static readonly RazorDiagnosticDescriptor EventHandlerParameter_Duplicates =
|
||||||
|
new RazorDiagnosticDescriptor(
|
||||||
|
$"{DiagnosticPrefix}10014",
|
||||||
|
() => "The attribute '{0}' was matched by multiple event handlers parameter attributes. Duplicates:{1}",
|
||||||
|
RazorDiagnosticSeverity.Error);
|
||||||
|
|
||||||
|
public static RazorDiagnostic CreateEventHandlerParameter_Duplicates(SourceSpan? source, string attribute, TagHelperDirectiveAttributeParameterIntermediateNode[] attributes)
|
||||||
|
{
|
||||||
|
var diagnostic = RazorDiagnostic.Create(
|
||||||
|
EventHandlerParameter_Duplicates,
|
||||||
|
source ?? SourceSpan.Undefined,
|
||||||
|
attribute,
|
||||||
|
Environment.NewLine + string.Join(Environment.NewLine, attributes.Select(p => p.TagHelper.DisplayName)));
|
||||||
|
return diagnostic;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -81,6 +81,7 @@ namespace Microsoft.AspNetCore.Razor.Language.Components
|
||||||
@class.ClassName = computedClass;
|
@class.ClassName = computedClass;
|
||||||
@class.Modifiers.Clear();
|
@class.Modifiers.Clear();
|
||||||
@class.Modifiers.Add("public");
|
@class.Modifiers.Add("public");
|
||||||
|
@class.Modifiers.Add("partial");
|
||||||
|
|
||||||
if (FileKinds.IsComponentImport(codeDocument.GetFileKind()))
|
if (FileKinds.IsComponentImport(codeDocument.GetFileKind()))
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
// 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.
|
// 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.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using Microsoft.AspNetCore.Razor.Language.Extensions;
|
using Microsoft.AspNetCore.Razor.Language.Extensions;
|
||||||
|
|
@ -31,13 +32,19 @@ namespace Microsoft.AspNetCore.Razor.Language.Components
|
||||||
// Each usage will be represented by a tag helper property that is a descendant of either
|
// Each usage will be represented by a tag helper property that is a descendant of either
|
||||||
// a component or element.
|
// a component or element.
|
||||||
var references = documentNode.FindDescendantReferences<TagHelperDirectiveAttributeIntermediateNode>();
|
var references = documentNode.FindDescendantReferences<TagHelperDirectiveAttributeIntermediateNode>();
|
||||||
|
|
||||||
var parents = new HashSet<IntermediateNode>();
|
var parents = new HashSet<IntermediateNode>();
|
||||||
for (var i = 0; i < references.Count; i++)
|
for (var i = 0; i < references.Count; i++)
|
||||||
{
|
{
|
||||||
parents.Add(references[i].Parent);
|
parents.Add(references[i].Parent);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// We need to do something similar for directive attribute parameters like @onclick:preventDefault.
|
||||||
|
var parameterReferences = documentNode.FindDescendantReferences<TagHelperDirectiveAttributeParameterIntermediateNode>();
|
||||||
|
for (var i = 0; i < parameterReferences.Count; i++)
|
||||||
|
{
|
||||||
|
parents.Add(parameterReferences[i].Parent);
|
||||||
|
}
|
||||||
|
|
||||||
foreach (var parent in parents)
|
foreach (var parent in parents)
|
||||||
{
|
{
|
||||||
ProcessDuplicates(parent);
|
ProcessDuplicates(parent);
|
||||||
|
|
@ -59,6 +66,23 @@ namespace Microsoft.AspNetCore.Razor.Language.Components
|
||||||
reference.Replace(RewriteUsage(reference.Parent, node));
|
reference.Replace(RewriteUsage(reference.Parent, node));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
for (var i = 0; i < parameterReferences.Count; i++)
|
||||||
|
{
|
||||||
|
var reference = parameterReferences[i];
|
||||||
|
var node = (TagHelperDirectiveAttributeParameterIntermediateNode)reference.Node;
|
||||||
|
|
||||||
|
if (!reference.Parent.Children.Contains(node))
|
||||||
|
{
|
||||||
|
// This node was removed as a duplicate, skip it.
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (node.TagHelper.IsEventHandlerTagHelper())
|
||||||
|
{
|
||||||
|
reference.Replace(RewriteParameterUsage(reference.Parent, node));
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void ProcessDuplicates(IntermediateNode parent)
|
private void ProcessDuplicates(IntermediateNode parent)
|
||||||
|
|
@ -109,6 +133,24 @@ namespace Microsoft.AspNetCore.Razor.Language.Components
|
||||||
parent.Children.Remove(property);
|
parent.Children.Remove(property);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var parameterDuplicates = parent.Children
|
||||||
|
.OfType<TagHelperDirectiveAttributeParameterIntermediateNode>()
|
||||||
|
.Where(p => p.TagHelper?.IsEventHandlerTagHelper() ?? false)
|
||||||
|
.GroupBy(p => p.AttributeName)
|
||||||
|
.Where(g => g.Count() > 1);
|
||||||
|
|
||||||
|
foreach (var duplicate in parameterDuplicates)
|
||||||
|
{
|
||||||
|
parent.Diagnostics.Add(ComponentDiagnosticFactory.CreateEventHandlerParameter_Duplicates(
|
||||||
|
parent.Source,
|
||||||
|
duplicate.Key,
|
||||||
|
duplicate.ToArray()));
|
||||||
|
foreach (var property in duplicate)
|
||||||
|
{
|
||||||
|
parent.Children.Remove(property);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private IntermediateNode RewriteUsage(IntermediateNode parent, TagHelperDirectiveAttributeIntermediateNode node)
|
private IntermediateNode RewriteUsage(IntermediateNode parent, TagHelperDirectiveAttributeIntermediateNode node)
|
||||||
|
|
@ -198,7 +240,7 @@ namespace Microsoft.AspNetCore.Razor.Language.Components
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private static IReadOnlyList<IntermediateToken> GetAttributeContent(TagHelperDirectiveAttributeIntermediateNode node)
|
private static IReadOnlyList<IntermediateToken> GetAttributeContent(IntermediateNode node)
|
||||||
{
|
{
|
||||||
var template = node.FindDescendantNodes<TemplateIntermediateNode>().FirstOrDefault();
|
var template = node.FindDescendantNodes<TemplateIntermediateNode>().FirstOrDefault();
|
||||||
if (template != null)
|
if (template != null)
|
||||||
|
|
@ -222,5 +264,49 @@ namespace Microsoft.AspNetCore.Razor.Language.Components
|
||||||
return node.FindDescendantNodes<IntermediateToken>();
|
return node.FindDescendantNodes<IntermediateToken>();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private IntermediateNode RewriteParameterUsage(IntermediateNode parent, TagHelperDirectiveAttributeParameterIntermediateNode node)
|
||||||
|
{
|
||||||
|
// Now rewrite the node to look like:
|
||||||
|
//
|
||||||
|
// builder.AddEventPreventDefaultAttribute(2, "onclick", true); // If minimized.
|
||||||
|
// or
|
||||||
|
// builder.AddEventPreventDefaultAttribute(2, "onclick", someBoolExpression); // If a bool expression is provided in the value.
|
||||||
|
|
||||||
|
string eventHandlerMethod;
|
||||||
|
if (node.BoundAttributeParameter.Name == "preventDefault")
|
||||||
|
{
|
||||||
|
eventHandlerMethod = ComponentsApi.RenderTreeBuilder.AddEventPreventDefaultAttribute;
|
||||||
|
}
|
||||||
|
else if (node.BoundAttributeParameter.Name == "stopPropagation")
|
||||||
|
{
|
||||||
|
eventHandlerMethod = ComponentsApi.RenderTreeBuilder.AddEventStopPropagationAttribute;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// Unsupported event handler attribute parameter. This can only happen if bound attribute descriptor
|
||||||
|
// is configured to expect a parameter other than 'preventDefault' and 'stopPropagation'.
|
||||||
|
return node;
|
||||||
|
}
|
||||||
|
|
||||||
|
var result = new ComponentAttributeIntermediateNode(node)
|
||||||
|
{
|
||||||
|
Annotations =
|
||||||
|
{
|
||||||
|
[ComponentMetadata.Common.OriginalAttributeName] = node.OriginalAttributeName,
|
||||||
|
[ComponentMetadata.Common.AddAttributeMethodName] = eventHandlerMethod,
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
|
result.Children.Clear();
|
||||||
|
if (node.AttributeStructure != AttributeStructure.Minimized)
|
||||||
|
{
|
||||||
|
var tokens = GetAttributeContent(node);
|
||||||
|
result.Children.Add(new CSharpExpressionIntermediateNode());
|
||||||
|
result.Children[0].Children.AddRange(tokens);
|
||||||
|
}
|
||||||
|
|
||||||
|
return result;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -34,7 +34,13 @@ namespace Microsoft.AspNetCore.Razor.Language.Components
|
||||||
{
|
{
|
||||||
var reference = references[i];
|
var reference = references[i];
|
||||||
var node = (TagHelperIntermediateNode)reference.Node;
|
var node = (TagHelperIntermediateNode)reference.Node;
|
||||||
|
if (node.TagHelpers.Any(t => t.IsChildContentTagHelper()))
|
||||||
|
{
|
||||||
|
// This is a child content tag helper. This will be rewritten when we visit its parent.
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
// The element didn't match any child content descriptors. Look for any matching component descriptors.
|
||||||
var count = 0;
|
var count = 0;
|
||||||
for (var j = 0; j < node.TagHelpers.Count; j++)
|
for (var j = 0; j < node.TagHelpers.Count; j++)
|
||||||
{
|
{
|
||||||
|
|
@ -42,7 +48,7 @@ namespace Microsoft.AspNetCore.Razor.Language.Components
|
||||||
{
|
{
|
||||||
// Only allow a single component tag helper per element. If there are multiple, we'll just consider
|
// Only allow a single component tag helper per element. If there are multiple, we'll just consider
|
||||||
// the first one and ignore the others.
|
// the first one and ignore the others.
|
||||||
if (count++ > 1)
|
if (++count > 1)
|
||||||
{
|
{
|
||||||
node.Diagnostics.Add(ComponentDiagnosticFactory.Create_MultipleComponents(node.Source, node.TagName, node.TagHelpers));
|
node.Diagnostics.Add(ComponentDiagnosticFactory.Create_MultipleComponents(node.Source, node.TagName, node.TagHelpers));
|
||||||
break;
|
break;
|
||||||
|
|
@ -54,10 +60,6 @@ namespace Microsoft.AspNetCore.Razor.Language.Components
|
||||||
{
|
{
|
||||||
reference.Replace(RewriteAsComponent(node, node.TagHelpers.First(t => t.IsComponentTagHelper())));
|
reference.Replace(RewriteAsComponent(node, node.TagHelpers.First(t => t.IsComponentTagHelper())));
|
||||||
}
|
}
|
||||||
else if (node.TagHelpers.Any(t => t.IsChildContentTagHelper()))
|
|
||||||
{
|
|
||||||
// Ignore, this will be handled when we rewrite the parent.
|
|
||||||
}
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
reference.Replace(RewriteAsElement(node));
|
reference.Replace(RewriteAsElement(node));
|
||||||
|
|
|
||||||
|
|
@ -42,6 +42,8 @@ namespace Microsoft.AspNetCore.Razor.Language.Components
|
||||||
public static readonly string OriginalAttributeName = "Common.OriginalAttributeName";
|
public static readonly string OriginalAttributeName = "Common.OriginalAttributeName";
|
||||||
|
|
||||||
public static readonly string DirectiveAttribute = "Common.DirectiveAttribute";
|
public static readonly string DirectiveAttribute = "Common.DirectiveAttribute";
|
||||||
|
|
||||||
|
public static readonly string AddAttributeMethodName = "Common.AddAttributeMethodName";
|
||||||
}
|
}
|
||||||
|
|
||||||
public static class Bind
|
public static class Bind
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,9 @@ namespace Microsoft.AspNetCore.Razor.Language.Components
|
||||||
{
|
{
|
||||||
internal abstract class ComponentNodeWriter : IntermediateNodeWriter, ITemplateTargetExtension
|
internal abstract class ComponentNodeWriter : IntermediateNodeWriter, ITemplateTargetExtension
|
||||||
{
|
{
|
||||||
protected abstract void BeginWriteAttribute(CodeWriter codeWriter, string key);
|
protected abstract void BeginWriteAttribute(CodeRenderingContext context, string key);
|
||||||
|
|
||||||
|
protected abstract void BeginWriteAttribute(CodeRenderingContext context, IntermediateNode expression);
|
||||||
|
|
||||||
protected abstract void WriteReferenceCaptureInnards(CodeRenderingContext context, ReferenceCaptureIntermediateNode node, bool shouldTypeCheck);
|
protected abstract void WriteReferenceCaptureInnards(CodeRenderingContext context, ReferenceCaptureIntermediateNode node, bool shouldTypeCheck);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -191,6 +191,10 @@ namespace Microsoft.AspNetCore.Razor.Language.Components
|
||||||
{
|
{
|
||||||
context.RenderNode(attribute);
|
context.RenderNode(attribute);
|
||||||
}
|
}
|
||||||
|
else if (child is ComponentAttributeIntermediateNode componentAttribute)
|
||||||
|
{
|
||||||
|
context.RenderNode(componentAttribute);
|
||||||
|
}
|
||||||
else if (child is SplatIntermediateNode splat)
|
else if (child is SplatIntermediateNode splat)
|
||||||
{
|
{
|
||||||
context.RenderNode(splat);
|
context.RenderNode(splat);
|
||||||
|
|
@ -233,7 +237,14 @@ namespace Microsoft.AspNetCore.Razor.Language.Components
|
||||||
Debug.Assert(_currentAttributeValues.Count == 0);
|
Debug.Assert(_currentAttributeValues.Count == 0);
|
||||||
context.RenderChildren(node);
|
context.RenderChildren(node);
|
||||||
|
|
||||||
WriteAttribute(context, node.AttributeName, _currentAttributeValues);
|
if (node.AttributeNameExpression == null)
|
||||||
|
{
|
||||||
|
WriteAttribute(context, node.AttributeName, _currentAttributeValues);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
WriteAttribute(context, node.AttributeNameExpression, _currentAttributeValues);
|
||||||
|
}
|
||||||
_currentAttributeValues.Clear();
|
_currentAttributeValues.Clear();
|
||||||
|
|
||||||
if (!string.IsNullOrEmpty(node.EventUpdatesAttributeName))
|
if (!string.IsNullOrEmpty(node.EventUpdatesAttributeName))
|
||||||
|
|
@ -502,10 +513,12 @@ namespace Microsoft.AspNetCore.Razor.Language.Components
|
||||||
throw new ArgumentNullException(nameof(node));
|
throw new ArgumentNullException(nameof(node));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var addAttributeMethod = node.Annotations[ComponentMetadata.Common.AddAttributeMethodName] as string ?? ComponentsApi.RenderTreeBuilder.AddAttribute;
|
||||||
|
|
||||||
// _builder.AddAttribute(1, "Foo", 42);
|
// _builder.AddAttribute(1, "Foo", 42);
|
||||||
context.CodeWriter.Write(_scopeStack.BuilderVarName);
|
context.CodeWriter.Write(_scopeStack.BuilderVarName);
|
||||||
context.CodeWriter.Write(".");
|
context.CodeWriter.Write(".");
|
||||||
context.CodeWriter.Write(ComponentsApi.RenderTreeBuilder.AddAttribute);
|
context.CodeWriter.Write(addAttributeMethod);
|
||||||
context.CodeWriter.Write("(");
|
context.CodeWriter.Write("(");
|
||||||
context.CodeWriter.Write((_sourceSequence++).ToString());
|
context.CodeWriter.Write((_sourceSequence++).ToString());
|
||||||
context.CodeWriter.Write(", ");
|
context.CodeWriter.Write(", ");
|
||||||
|
|
@ -659,7 +672,7 @@ namespace Microsoft.AspNetCore.Razor.Language.Components
|
||||||
// _builder.AddAttribute(1, "ChildContent", (RenderFragment)((__builder73) => { ... }));
|
// _builder.AddAttribute(1, "ChildContent", (RenderFragment)((__builder73) => { ... }));
|
||||||
// OR
|
// OR
|
||||||
// _builder.AddAttribute(1, "ChildContent", (RenderFragment<Person>)((person) => (__builder73) => { ... }));
|
// _builder.AddAttribute(1, "ChildContent", (RenderFragment<Person>)((person) => (__builder73) => { ... }));
|
||||||
BeginWriteAttribute(context.CodeWriter, node.AttributeName);
|
BeginWriteAttribute(context, node.AttributeName);
|
||||||
context.CodeWriter.Write($"({node.TypeName})(");
|
context.CodeWriter.Write($"({node.TypeName})(");
|
||||||
|
|
||||||
WriteComponentChildContentInnards(context, node);
|
WriteComponentChildContentInnards(context, node);
|
||||||
|
|
@ -837,14 +850,21 @@ namespace Microsoft.AspNetCore.Razor.Language.Components
|
||||||
|
|
||||||
private void WriteAttribute(CodeRenderingContext context, string key, IList<IntermediateToken> value)
|
private void WriteAttribute(CodeRenderingContext context, string key, IList<IntermediateToken> value)
|
||||||
{
|
{
|
||||||
BeginWriteAttribute(context.CodeWriter, key);
|
BeginWriteAttribute(context, key);
|
||||||
WriteAttributeValue(context, value);
|
WriteAttributeValue(context, value);
|
||||||
context.CodeWriter.WriteEndMethodInvocation();
|
context.CodeWriter.WriteEndMethodInvocation();
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void BeginWriteAttribute(CodeWriter codeWriter, string key)
|
private void WriteAttribute(CodeRenderingContext context, IntermediateNode nameExpression, IList<IntermediateToken> value)
|
||||||
{
|
{
|
||||||
codeWriter
|
BeginWriteAttribute(context, nameExpression);
|
||||||
|
WriteAttributeValue(context, value);
|
||||||
|
context.CodeWriter.WriteEndMethodInvocation();
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override void BeginWriteAttribute(CodeRenderingContext context, string key)
|
||||||
|
{
|
||||||
|
context.CodeWriter
|
||||||
.WriteStartMethodInvocation($"{_scopeStack.BuilderVarName}.{ComponentsApi.RenderTreeBuilder.AddAttribute}")
|
.WriteStartMethodInvocation($"{_scopeStack.BuilderVarName}.{ComponentsApi.RenderTreeBuilder.AddAttribute}")
|
||||||
.Write((_sourceSequence++).ToString())
|
.Write((_sourceSequence++).ToString())
|
||||||
.WriteParameterSeparator()
|
.WriteParameterSeparator()
|
||||||
|
|
@ -852,6 +872,21 @@ namespace Microsoft.AspNetCore.Razor.Language.Components
|
||||||
.WriteParameterSeparator();
|
.WriteParameterSeparator();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected override void BeginWriteAttribute(CodeRenderingContext context, IntermediateNode nameExpression)
|
||||||
|
{
|
||||||
|
context.CodeWriter.WriteStartMethodInvocation($"{_scopeStack.BuilderVarName}.{ComponentsApi.RenderTreeBuilder.AddAttribute}");
|
||||||
|
context.CodeWriter.Write((_sourceSequence++).ToString());
|
||||||
|
context.CodeWriter.WriteParameterSeparator();
|
||||||
|
|
||||||
|
var tokens = GetCSharpTokens(nameExpression);
|
||||||
|
for (var i = 0; i < tokens.Count; i++)
|
||||||
|
{
|
||||||
|
WriteCSharpToken(context, tokens[i]);
|
||||||
|
}
|
||||||
|
|
||||||
|
context.CodeWriter.WriteParameterSeparator();
|
||||||
|
}
|
||||||
|
|
||||||
private static string GetHtmlContent(HtmlContentIntermediateNode node)
|
private static string GetHtmlContent(HtmlContentIntermediateNode node)
|
||||||
{
|
{
|
||||||
var builder = new StringBuilder();
|
var builder = new StringBuilder();
|
||||||
|
|
|
||||||
|
|
@ -97,6 +97,10 @@ namespace Microsoft.AspNetCore.Razor.Language.Components
|
||||||
public static readonly string SetKey = nameof(SetKey);
|
public static readonly string SetKey = nameof(SetKey);
|
||||||
|
|
||||||
public static readonly string SetUpdatesAttributeName = nameof(SetUpdatesAttributeName);
|
public static readonly string SetUpdatesAttributeName = nameof(SetUpdatesAttributeName);
|
||||||
|
|
||||||
|
public static readonly string AddEventPreventDefaultAttribute = nameof(AddEventPreventDefaultAttribute);
|
||||||
|
|
||||||
|
public static readonly string AddEventStopPropagationAttribute = nameof(AddEventStopPropagationAttribute);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static class RuntimeHelpers
|
public static class RuntimeHelpers
|
||||||
|
|
|
||||||
|
|
@ -1099,8 +1099,6 @@ namespace Microsoft.AspNetCore.Razor.Language
|
||||||
|
|
||||||
if (node.Source != null)
|
if (node.Source != null)
|
||||||
{
|
{
|
||||||
Debug.Assert(node.Source.Value.FilePath != null);
|
|
||||||
|
|
||||||
node.Source = new SourceSpan(
|
node.Source = new SourceSpan(
|
||||||
node.Source.Value.FilePath,
|
node.Source.Value.FilePath,
|
||||||
node.Source.Value.AbsoluteIndex,
|
node.Source.Value.AbsoluteIndex,
|
||||||
|
|
|
||||||
|
|
@ -88,6 +88,32 @@ namespace Microsoft.AspNetCore.Razor.Language.Intermediate
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public ComponentAttributeIntermediateNode(TagHelperDirectiveAttributeParameterIntermediateNode directiveAttributeParameterNode)
|
||||||
|
{
|
||||||
|
if (directiveAttributeParameterNode == null)
|
||||||
|
{
|
||||||
|
throw new ArgumentNullException(nameof(directiveAttributeParameterNode));
|
||||||
|
}
|
||||||
|
|
||||||
|
AttributeName = directiveAttributeParameterNode.AttributeNameWithoutParameter;
|
||||||
|
AttributeStructure = directiveAttributeParameterNode.AttributeStructure;
|
||||||
|
BoundAttribute = directiveAttributeParameterNode.BoundAttribute;
|
||||||
|
PropertyName = directiveAttributeParameterNode.BoundAttributeParameter.GetPropertyName();
|
||||||
|
Source = directiveAttributeParameterNode.Source;
|
||||||
|
TagHelper = directiveAttributeParameterNode.TagHelper;
|
||||||
|
TypeName = directiveAttributeParameterNode.BoundAttributeParameter.TypeName;
|
||||||
|
|
||||||
|
for (var i = 0; i < directiveAttributeParameterNode.Children.Count; i++)
|
||||||
|
{
|
||||||
|
Children.Add(directiveAttributeParameterNode.Children[i]);
|
||||||
|
}
|
||||||
|
|
||||||
|
for (var i = 0; i < directiveAttributeParameterNode.Diagnostics.Count; i++)
|
||||||
|
{
|
||||||
|
Diagnostics.Add(directiveAttributeParameterNode.Diagnostics[i]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public override IntermediateNodeCollection Children { get; } = new IntermediateNodeCollection();
|
public override IntermediateNodeCollection Children { get; } = new IntermediateNodeCollection();
|
||||||
|
|
||||||
public string AttributeName { get; set; }
|
public string AttributeName { get; set; }
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,7 @@
|
||||||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
|
using System.Linq;
|
||||||
|
|
||||||
namespace Microsoft.AspNetCore.Razor.Language.Intermediate
|
namespace Microsoft.AspNetCore.Razor.Language.Intermediate
|
||||||
{
|
{
|
||||||
|
|
@ -9,6 +10,8 @@ namespace Microsoft.AspNetCore.Razor.Language.Intermediate
|
||||||
{
|
{
|
||||||
public override IntermediateNodeCollection Children { get; } = new IntermediateNodeCollection();
|
public override IntermediateNodeCollection Children { get; } = new IntermediateNodeCollection();
|
||||||
|
|
||||||
|
public CSharpExpressionIntermediateNode AttributeNameExpression { get; set; }
|
||||||
|
|
||||||
public string AttributeName { get; set; }
|
public string AttributeName { get; set; }
|
||||||
|
|
||||||
public string Prefix { get; set; }
|
public string Prefix { get; set; }
|
||||||
|
|
@ -32,6 +35,7 @@ namespace Microsoft.AspNetCore.Razor.Language.Intermediate
|
||||||
formatter.WriteContent(AttributeName);
|
formatter.WriteContent(AttributeName);
|
||||||
|
|
||||||
formatter.WriteProperty(nameof(AttributeName), AttributeName);
|
formatter.WriteProperty(nameof(AttributeName), AttributeName);
|
||||||
|
formatter.WriteProperty(nameof(AttributeNameExpression), string.Join(string.Empty, AttributeNameExpression?.FindDescendantNodes<IntermediateToken>().Select(n => n.Content) ?? Array.Empty<string>()));
|
||||||
formatter.WriteProperty(nameof(Prefix), Prefix);
|
formatter.WriteProperty(nameof(Prefix), Prefix);
|
||||||
formatter.WriteProperty(nameof(Suffix), Suffix);
|
formatter.WriteProperty(nameof(Suffix), Suffix);
|
||||||
formatter.WriteProperty(nameof(EventUpdatesAttributeName), EventUpdatesAttributeName);
|
formatter.WriteProperty(nameof(EventUpdatesAttributeName), EventUpdatesAttributeName);
|
||||||
|
|
|
||||||
|
|
@ -19,6 +19,7 @@ namespace Microsoft.AspNetCore.Razor.Language.Intermediate
|
||||||
public IEnumerable<IntermediateNode> Body => Children.Where(c =>
|
public IEnumerable<IntermediateNode> Body => Children.Where(c =>
|
||||||
{
|
{
|
||||||
return
|
return
|
||||||
|
c as ComponentAttributeIntermediateNode == null &&
|
||||||
c as HtmlAttributeIntermediateNode == null &&
|
c as HtmlAttributeIntermediateNode == null &&
|
||||||
c as SplatIntermediateNode == null &&
|
c as SplatIntermediateNode == null &&
|
||||||
c as SetKeyIntermediateNode == null &&
|
c as SetKeyIntermediateNode == null &&
|
||||||
|
|
|
||||||
|
|
@ -1149,8 +1149,6 @@ namespace Microsoft.AspNetCore.Razor.Language.Legacy
|
||||||
var nameContent = string.Concat(name.LiteralTokens.Nodes.Select(s => s.Content));
|
var nameContent = string.Concat(name.LiteralTokens.Nodes.Select(s => s.Content));
|
||||||
if (IsConditionalAttributeName(nameContent))
|
if (IsConditionalAttributeName(nameContent))
|
||||||
{
|
{
|
||||||
SpanContext.ChunkGenerator = SpanChunkGenerator.Null; // The block chunk generator will render the prefix
|
|
||||||
|
|
||||||
// We now have the value prefix which is usually whitespace and/or a quote
|
// We now have the value prefix which is usually whitespace and/or a quote
|
||||||
valuePrefix = OutputAsMarkupLiteral();
|
valuePrefix = OutputAsMarkupLiteral();
|
||||||
|
|
||||||
|
|
@ -1178,8 +1176,6 @@ namespace Microsoft.AspNetCore.Razor.Language.Legacy
|
||||||
if (quote != SyntaxKind.Marker && At(quote))
|
if (quote != SyntaxKind.Marker && At(quote))
|
||||||
{
|
{
|
||||||
AcceptAndMoveNext();
|
AcceptAndMoveNext();
|
||||||
// Again, block chunk generator will render the suffix
|
|
||||||
SpanContext.ChunkGenerator = SpanChunkGenerator.Null;
|
|
||||||
valueSuffix = OutputAsMarkupLiteral();
|
valueSuffix = OutputAsMarkupLiteral();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,7 @@
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
using Microsoft.AspNetCore.Razor.Language.Components;
|
||||||
using Microsoft.AspNetCore.Razor.Language.Syntax;
|
using Microsoft.AspNetCore.Razor.Language.Syntax;
|
||||||
|
|
||||||
namespace Microsoft.AspNetCore.Razor.Language.Legacy
|
namespace Microsoft.AspNetCore.Razor.Language.Legacy
|
||||||
|
|
@ -11,11 +12,11 @@ namespace Microsoft.AspNetCore.Razor.Language.Legacy
|
||||||
internal static class TagHelperBlockRewriter
|
internal static class TagHelperBlockRewriter
|
||||||
{
|
{
|
||||||
public static TagMode GetTagMode(
|
public static TagMode GetTagMode(
|
||||||
MarkupStartTagSyntax tagBlock,
|
MarkupStartTagSyntax startTag,
|
||||||
TagHelperBinding bindingResult,
|
MarkupEndTagSyntax endTag,
|
||||||
ErrorSink errorSink)
|
TagHelperBinding bindingResult)
|
||||||
{
|
{
|
||||||
var childSpan = tagBlock.GetLastToken()?.Parent;
|
var childSpan = startTag.GetLastToken()?.Parent;
|
||||||
|
|
||||||
// Self-closing tags are always valid despite descriptors[X].TagStructure.
|
// Self-closing tags are always valid despite descriptors[X].TagStructure.
|
||||||
if (childSpan?.GetContent().EndsWith("/>", StringComparison.Ordinal) ?? false)
|
if (childSpan?.GetContent().EndsWith("/>", StringComparison.Ordinal) ?? false)
|
||||||
|
|
@ -23,6 +24,7 @@ namespace Microsoft.AspNetCore.Razor.Language.Legacy
|
||||||
return TagMode.SelfClosing;
|
return TagMode.SelfClosing;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var hasDirectiveAttribute = false;
|
||||||
foreach (var descriptor in bindingResult.Descriptors)
|
foreach (var descriptor in bindingResult.Descriptors)
|
||||||
{
|
{
|
||||||
var boundRules = bindingResult.Mappings[descriptor];
|
var boundRules = bindingResult.Mappings[descriptor];
|
||||||
|
|
@ -32,6 +34,21 @@ namespace Microsoft.AspNetCore.Razor.Language.Legacy
|
||||||
{
|
{
|
||||||
return TagMode.StartTagOnly;
|
return TagMode.StartTagOnly;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Directive attribute will tolerate forms that don't work for tag helpers. For instance:
|
||||||
|
//
|
||||||
|
// <input @onclick="..."> vs <input onclick="..." />
|
||||||
|
//
|
||||||
|
// We don't want this to become an error just because you added a directive attribute.
|
||||||
|
if (descriptor.IsAnyComponentDocumentTagHelper() && !descriptor.IsComponentOrChildContentTagHelper())
|
||||||
|
{
|
||||||
|
hasDirectiveAttribute = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (hasDirectiveAttribute && startTag.IsVoidElement() && endTag == null)
|
||||||
|
{
|
||||||
|
return TagMode.StartTagOnly;
|
||||||
}
|
}
|
||||||
|
|
||||||
return TagMode.StartTagAndEndTag;
|
return TagMode.StartTagAndEndTag;
|
||||||
|
|
|
||||||
|
|
@ -104,7 +104,7 @@ namespace Microsoft.AspNetCore.Razor.Language.Legacy
|
||||||
if (startTag != null)
|
if (startTag != null)
|
||||||
{
|
{
|
||||||
var tagName = startTag.GetTagNameWithOptionalBang();
|
var tagName = startTag.GetTagNameWithOptionalBang();
|
||||||
if (TryRewriteTagHelperStart(startTag, out tagHelperStart, out tagHelperInfo))
|
if (TryRewriteTagHelperStart(startTag, node.EndTag, out tagHelperStart, out tagHelperInfo))
|
||||||
{
|
{
|
||||||
// This is a tag helper.
|
// This is a tag helper.
|
||||||
if (tagHelperInfo.TagMode == TagMode.SelfClosing || tagHelperInfo.TagMode == TagMode.StartTagOnly)
|
if (tagHelperInfo.TagMode == TagMode.SelfClosing || tagHelperInfo.TagMode == TagMode.StartTagOnly)
|
||||||
|
|
@ -215,7 +215,11 @@ namespace Microsoft.AspNetCore.Razor.Language.Legacy
|
||||||
return base.VisitMarkupTextLiteral(node);
|
return base.VisitMarkupTextLiteral(node);
|
||||||
}
|
}
|
||||||
|
|
||||||
private bool TryRewriteTagHelperStart(MarkupStartTagSyntax startTag, out MarkupTagHelperStartTagSyntax rewritten, out TagHelperInfo tagHelperInfo)
|
private bool TryRewriteTagHelperStart(
|
||||||
|
MarkupStartTagSyntax startTag,
|
||||||
|
MarkupEndTagSyntax endTag,
|
||||||
|
out MarkupTagHelperStartTagSyntax rewritten,
|
||||||
|
out TagHelperInfo tagHelperInfo)
|
||||||
{
|
{
|
||||||
rewritten = null;
|
rewritten = null;
|
||||||
tagHelperInfo = null;
|
tagHelperInfo = null;
|
||||||
|
|
@ -278,7 +282,7 @@ namespace Microsoft.AspNetCore.Razor.Language.Legacy
|
||||||
_errorSink,
|
_errorSink,
|
||||||
_source);
|
_source);
|
||||||
|
|
||||||
var tagMode = TagHelperBlockRewriter.GetTagMode(startTag, tagHelperBinding, _errorSink);
|
var tagMode = TagHelperBlockRewriter.GetTagMode(startTag, endTag, tagHelperBinding);
|
||||||
tagHelperInfo = new TagHelperInfo(tagName, tagMode, tagHelperBinding);
|
tagHelperInfo = new TagHelperInfo(tagName, tagMode, tagHelperBinding);
|
||||||
rewritten = rewrittenStartTag;
|
rewritten = rewrittenStartTag;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -85,7 +85,7 @@ namespace Microsoft.AspNetCore.Razor.Language.Components
|
||||||
|
|
||||||
// Assert
|
// Assert
|
||||||
Assert.Equal($"{ComponentsApi.ComponentBase.FullTypeName}", visitor.Class.BaseType);
|
Assert.Equal($"{ComponentsApi.ComponentBase.FullTypeName}", visitor.Class.BaseType);
|
||||||
Assert.Equal(new[] { "public", }, visitor.Class.Modifiers);
|
Assert.Equal(new[] { "public", "partial" }, visitor.Class.Modifiers);
|
||||||
Assert.Equal("Test", visitor.Class.ClassName);
|
Assert.Equal("Test", visitor.Class.ClassName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -896,6 +896,37 @@ namespace Test
|
||||||
CompileToAssembly(generated);
|
CompileToAssembly(generated);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[Fact]
|
||||||
|
public void BindToElement_WithoutCloseTag()
|
||||||
|
{
|
||||||
|
// Arrange
|
||||||
|
AdditionalSyntaxTrees.Add(Parse(@"
|
||||||
|
using System;
|
||||||
|
using Microsoft.AspNetCore.Components;
|
||||||
|
|
||||||
|
namespace Test
|
||||||
|
{
|
||||||
|
[BindElement(""div"", null, ""myvalue"", ""myevent"")]
|
||||||
|
public static class BindAttributes
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}"));
|
||||||
|
|
||||||
|
// Act
|
||||||
|
var generated = CompileToCSharp(@"
|
||||||
|
<div>
|
||||||
|
<input @bind=""@ParentValue"">
|
||||||
|
</div>
|
||||||
|
@code {
|
||||||
|
public string ParentValue { get; set; } = ""hi"";
|
||||||
|
}");
|
||||||
|
|
||||||
|
// Assert
|
||||||
|
AssertDocumentNodeMatchesBaseline(generated.CodeDocument);
|
||||||
|
AssertCSharpDocumentMatchesBaseline(generated.CodeDocument);
|
||||||
|
CompileToAssembly(generated);
|
||||||
|
}
|
||||||
|
|
||||||
[Fact]
|
[Fact]
|
||||||
public void BindToElement_WithStringAttribute_WritesAttributes()
|
public void BindToElement_WithStringAttribute_WritesAttributes()
|
||||||
{
|
{
|
||||||
|
|
@ -980,6 +1011,64 @@ namespace Test
|
||||||
CompileToAssembly(generated);
|
CompileToAssembly(generated);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[Fact]
|
||||||
|
public void BindToElement_WithEventAsExpression()
|
||||||
|
{
|
||||||
|
// Arrange
|
||||||
|
AdditionalSyntaxTrees.Add(Parse(@"
|
||||||
|
using System;
|
||||||
|
using Microsoft.AspNetCore.Components;
|
||||||
|
|
||||||
|
namespace Test
|
||||||
|
{
|
||||||
|
[BindElement(""div"", ""value"", ""myvalue"", ""myevent"")]
|
||||||
|
public static class BindAttributes
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}"));
|
||||||
|
// Act
|
||||||
|
var generated = CompileToCSharp(@"
|
||||||
|
@{ var x = ""anotherevent""; }
|
||||||
|
<div @bind-value=""@ParentValue"" @bind-value:event=""@x"" />
|
||||||
|
@code {
|
||||||
|
public string ParentValue { get; set; } = ""hi"";
|
||||||
|
}");
|
||||||
|
|
||||||
|
// Assert
|
||||||
|
AssertDocumentNodeMatchesBaseline(generated.CodeDocument);
|
||||||
|
AssertCSharpDocumentMatchesBaseline(generated.CodeDocument);
|
||||||
|
CompileToAssembly(generated);
|
||||||
|
}
|
||||||
|
|
||||||
|
[Fact]
|
||||||
|
public void BindToElement_WithEventAsExplicitExpression()
|
||||||
|
{
|
||||||
|
// Arrange
|
||||||
|
AdditionalSyntaxTrees.Add(Parse(@"
|
||||||
|
using System;
|
||||||
|
using Microsoft.AspNetCore.Components;
|
||||||
|
|
||||||
|
namespace Test
|
||||||
|
{
|
||||||
|
[BindElement(""div"", ""value"", ""myvalue"", ""myevent"")]
|
||||||
|
public static class BindAttributes
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}"));
|
||||||
|
// Act
|
||||||
|
var generated = CompileToCSharp(@"
|
||||||
|
@{ var x = ""anotherevent""; }
|
||||||
|
<div @bind-value=""@ParentValue"" @bind-value:event=""@(x.ToString())"" />
|
||||||
|
@code {
|
||||||
|
public string ParentValue { get; set; } = ""hi"";
|
||||||
|
}");
|
||||||
|
|
||||||
|
// Assert
|
||||||
|
AssertDocumentNodeMatchesBaseline(generated.CodeDocument);
|
||||||
|
AssertCSharpDocumentMatchesBaseline(generated.CodeDocument);
|
||||||
|
CompileToAssembly(generated);
|
||||||
|
}
|
||||||
|
|
||||||
[Fact]
|
[Fact]
|
||||||
public void BuiltIn_BindToInputWithoutType_WritesAttributes()
|
public void BuiltIn_BindToInputWithoutType_WritesAttributes()
|
||||||
{
|
{
|
||||||
|
|
@ -1698,6 +1787,44 @@ namespace Test
|
||||||
CompileToAssembly(generated);
|
CompileToAssembly(generated);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[Fact]
|
||||||
|
public void MultipleChildContentMatchingComponentName()
|
||||||
|
{
|
||||||
|
// Arrange
|
||||||
|
AdditionalSyntaxTrees.Add(Parse(@"
|
||||||
|
using Microsoft.AspNetCore.Components;
|
||||||
|
|
||||||
|
namespace Test
|
||||||
|
{
|
||||||
|
public class MyComponent : ComponentBase
|
||||||
|
{
|
||||||
|
[Parameter]
|
||||||
|
public RenderFragment Header { get; set; }
|
||||||
|
|
||||||
|
[Parameter]
|
||||||
|
public RenderFragment Footer { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
|
public class Header : ComponentBase
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
"));
|
||||||
|
|
||||||
|
// Act
|
||||||
|
var generated = CompileToCSharp(@"
|
||||||
|
<MyComponent>
|
||||||
|
<Header>Hi!</Header>
|
||||||
|
<Footer>Bye!</Footer>
|
||||||
|
</MyComponent>
|
||||||
|
<Header>Hello!</Header>");
|
||||||
|
|
||||||
|
// Assert
|
||||||
|
AssertDocumentNodeMatchesBaseline(generated.CodeDocument);
|
||||||
|
AssertCSharpDocumentMatchesBaseline(generated.CodeDocument);
|
||||||
|
CompileToAssembly(generated);
|
||||||
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Directives
|
#region Directives
|
||||||
|
|
@ -1804,7 +1931,7 @@ namespace Test3
|
||||||
// Assert
|
// Assert
|
||||||
AssertDocumentNodeMatchesBaseline(generated.CodeDocument);
|
AssertDocumentNodeMatchesBaseline(generated.CodeDocument);
|
||||||
AssertCSharpDocumentMatchesBaseline(generated.CodeDocument);
|
AssertCSharpDocumentMatchesBaseline(generated.CodeDocument);
|
||||||
var result = CompileToAssembly(generated, throwOnFailure: !DesignTime);
|
var result = CompileToAssembly(generated, throwOnFailure: false);
|
||||||
|
|
||||||
if (DesignTime)
|
if (DesignTime)
|
||||||
{
|
{
|
||||||
|
|
@ -2570,6 +2697,28 @@ namespace Test
|
||||||
CompileToAssembly(generated);
|
CompileToAssembly(generated);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[Fact]
|
||||||
|
public void EventHandler_OnElement_WithoutCloseTag()
|
||||||
|
{
|
||||||
|
// Arrange
|
||||||
|
|
||||||
|
// Act
|
||||||
|
var generated = CompileToCSharp(@"
|
||||||
|
@using Microsoft.AspNetCore.Components.Web
|
||||||
|
<div>
|
||||||
|
<input @onclick=""OnClick"">
|
||||||
|
</div>
|
||||||
|
@code {
|
||||||
|
void OnClick() {
|
||||||
|
}
|
||||||
|
}");
|
||||||
|
|
||||||
|
// Assert
|
||||||
|
AssertDocumentNodeMatchesBaseline(generated.CodeDocument);
|
||||||
|
AssertCSharpDocumentMatchesBaseline(generated.CodeDocument);
|
||||||
|
CompileToAssembly(generated);
|
||||||
|
}
|
||||||
|
|
||||||
[Fact]
|
[Fact]
|
||||||
public void EventHandler_OnElement_WithEventArgsMethodGroup()
|
public void EventHandler_OnElement_WithEventArgsMethodGroup()
|
||||||
{
|
{
|
||||||
|
|
@ -2699,6 +2848,7 @@ namespace Test
|
||||||
|
|
||||||
// Act
|
// Act
|
||||||
var generated = CompileToCSharp(@"
|
var generated = CompileToCSharp(@"
|
||||||
|
@using Microsoft.AspNetCore.Components.Web
|
||||||
<input @onclick=""x => { }"" />");
|
<input @onclick=""x => { }"" />");
|
||||||
|
|
||||||
// Assert
|
// Assert
|
||||||
|
|
@ -2747,6 +2897,78 @@ namespace Test
|
||||||
CompileToAssembly(generated);
|
CompileToAssembly(generated);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[Fact]
|
||||||
|
public void EventHandler_PreventDefault_StopPropagation_Minimized()
|
||||||
|
{
|
||||||
|
// Arrange
|
||||||
|
|
||||||
|
// Act
|
||||||
|
var generated = CompileToCSharp(@"
|
||||||
|
@using Microsoft.AspNetCore.Components.Web
|
||||||
|
<button @onclick:preventDefault @onclick:stopPropagation>Click Me</button>");
|
||||||
|
|
||||||
|
// Assert
|
||||||
|
AssertDocumentNodeMatchesBaseline(generated.CodeDocument);
|
||||||
|
AssertCSharpDocumentMatchesBaseline(generated.CodeDocument);
|
||||||
|
CompileToAssembly(generated);
|
||||||
|
}
|
||||||
|
|
||||||
|
[Fact]
|
||||||
|
public void EventHandler_PreventDefault_StopPropagation()
|
||||||
|
{
|
||||||
|
// Arrange
|
||||||
|
|
||||||
|
// Act
|
||||||
|
var generated = CompileToCSharp(@"
|
||||||
|
@using Microsoft.AspNetCore.Components.Web
|
||||||
|
<button @onclick=""() => Foo = false"" @onfocus:preventDefault=""true"" @onclick:stopPropagation=""Foo"" @onfocus:stopPropagation=""false"">Click Me</button>
|
||||||
|
@code {
|
||||||
|
bool Foo { get; set; }
|
||||||
|
}");
|
||||||
|
|
||||||
|
// Assert
|
||||||
|
AssertDocumentNodeMatchesBaseline(generated.CodeDocument);
|
||||||
|
AssertCSharpDocumentMatchesBaseline(generated.CodeDocument);
|
||||||
|
CompileToAssembly(generated);
|
||||||
|
}
|
||||||
|
|
||||||
|
[Fact]
|
||||||
|
public void EventHandler_WithDelegate_PreventDefault()
|
||||||
|
{
|
||||||
|
// Arrange
|
||||||
|
|
||||||
|
// Act
|
||||||
|
var generated = CompileToCSharp(@"
|
||||||
|
@using Microsoft.AspNetCore.Components.Web
|
||||||
|
<input @onfocus=""OnFocus"" @onfocus:preventDefault=""ShouldPreventDefault()"" />
|
||||||
|
@code {
|
||||||
|
void OnFocus(FocusEventArgs e) { }
|
||||||
|
|
||||||
|
bool ShouldPreventDefault() { return false; }
|
||||||
|
}");
|
||||||
|
|
||||||
|
// Assert
|
||||||
|
AssertDocumentNodeMatchesBaseline(generated.CodeDocument);
|
||||||
|
AssertCSharpDocumentMatchesBaseline(generated.CodeDocument);
|
||||||
|
CompileToAssembly(generated);
|
||||||
|
}
|
||||||
|
|
||||||
|
[Fact]
|
||||||
|
public void EventHandler_PreventDefault_Duplicates()
|
||||||
|
{
|
||||||
|
// Arrange
|
||||||
|
|
||||||
|
// Act
|
||||||
|
var generated = CompileToCSharp(@"
|
||||||
|
@using Microsoft.AspNetCore.Components.Web
|
||||||
|
<input @onclick:preventDefault=""true"" @onclick:preventDefault />");
|
||||||
|
|
||||||
|
// Assert
|
||||||
|
AssertDocumentNodeMatchesBaseline(generated.CodeDocument);
|
||||||
|
AssertCSharpDocumentMatchesBaseline(generated.CodeDocument);
|
||||||
|
CompileToAssembly(generated);
|
||||||
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Generics
|
#region Generics
|
||||||
|
|
|
||||||
|
|
@ -121,7 +121,7 @@ namespace Test
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Microsoft.AspNetCore.Components;
|
using Microsoft.AspNetCore.Components;
|
||||||
public class TestComponent : Microsoft.AspNetCore.Components.ComponentBase
|
public partial class TestComponent : Microsoft.AspNetCore.Components.ComponentBase
|
||||||
{
|
{
|
||||||
#pragma warning disable 1998
|
#pragma warning disable 1998
|
||||||
protected override void BuildRenderTree(Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder __builder)
|
protected override void BuildRenderTree(Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder __builder)
|
||||||
|
|
|
||||||
|
|
@ -233,6 +233,57 @@ namespace Microsoft.AspNetCore.Razor.Language.Legacy
|
||||||
EvaluateData(descriptors, "<input></input>");
|
EvaluateData(descriptors, "<input></input>");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[Fact]
|
||||||
|
public void AllowsCompatibleTagStructures_DirectiveAttribute_SelfClosing()
|
||||||
|
{
|
||||||
|
// Arrange
|
||||||
|
var descriptors = new TagHelperDescriptor[]
|
||||||
|
{
|
||||||
|
TagHelperDescriptorBuilder.Create("InputTagHelper1", "SomeAssembly")
|
||||||
|
.TagMatchingRuleDescriptor(rule =>
|
||||||
|
{
|
||||||
|
rule
|
||||||
|
.RequireTagName("*")
|
||||||
|
.RequireAttributeDescriptor(b =>
|
||||||
|
{
|
||||||
|
b.Name = "@onclick";
|
||||||
|
b.Metadata.Add(ComponentMetadata.Common.DirectiveAttribute, bool.TrueString);
|
||||||
|
});
|
||||||
|
})
|
||||||
|
.AddMetadata(ComponentMetadata.SpecialKindKey, ComponentMetadata.EventHandler.TagHelperKind)
|
||||||
|
.Build(),
|
||||||
|
};
|
||||||
|
|
||||||
|
// Act & Assert
|
||||||
|
EvaluateData(descriptors, "<input @onclick=\"@test\"/>");
|
||||||
|
}
|
||||||
|
|
||||||
|
[Fact]
|
||||||
|
public void AllowsCompatibleTagStructures_DirectiveAttribute_Void()
|
||||||
|
{
|
||||||
|
// Arrange
|
||||||
|
var descriptors = new TagHelperDescriptor[]
|
||||||
|
{
|
||||||
|
TagHelperDescriptorBuilder.Create("InputTagHelper1", "SomeAssembly")
|
||||||
|
.TagMatchingRuleDescriptor(rule =>
|
||||||
|
{
|
||||||
|
rule
|
||||||
|
.RequireTagName("*")
|
||||||
|
.RequireAttributeDescriptor(b =>
|
||||||
|
{
|
||||||
|
b.Name = "@onclick";
|
||||||
|
b.Metadata.Add(ComponentMetadata.Common.DirectiveAttribute, bool.TrueString);
|
||||||
|
});
|
||||||
|
|
||||||
|
})
|
||||||
|
.AddMetadata(ComponentMetadata.SpecialKindKey, ComponentMetadata.EventHandler.TagHelperKind)
|
||||||
|
.Build(),
|
||||||
|
};
|
||||||
|
|
||||||
|
// Act & Assert
|
||||||
|
EvaluateData(descriptors, "<input @onclick=\"@test\">");
|
||||||
|
}
|
||||||
|
|
||||||
[Fact]
|
[Fact]
|
||||||
public void CreatesErrorForMalformedTagHelpersWithAttributes1()
|
public void CreatesErrorForMalformedTagHelpersWithAttributes1()
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -2,4 +2,8 @@
|
||||||
<script type="text/javascript" @{} ></script @foo >
|
<script type="text/javascript" @{} ></script @foo >
|
||||||
}
|
}
|
||||||
|
|
||||||
|
<script type="text/html">
|
||||||
|
<%var x = window == null%>
|
||||||
|
</script>
|
||||||
|
|
||||||
<script></script @
|
<script></script @
|
||||||
|
|
@ -1 +1 @@
|
||||||
TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Tags.cshtml(5,11): Error RZ1024: End of file or an unexpected character was reached before the "script" tag could be parsed. Elements inside markup blocks must be complete. They must either be self-closing ("<br />") or have matching end tags ("<p>Hello</p>"). If you intended to display a "<" character, use the "<" HTML entity.
|
TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Tags.cshtml(9,11): Error RZ1024: End of file or an unexpected character was reached before the "script" tag could be parsed. Elements inside markup blocks must be complete. They must either be self-closing ("<br />") or have matching end tags ("<p>Hello</p>"). If you intended to display a "<" character, use the "<" HTML entity.
|
||||||
|
|
|
||||||
|
|
@ -23,8 +23,21 @@ Document -
|
||||||
IntermediateToken - (44:1,40 [15] Tags.cshtml) - Html - </script @foo >
|
IntermediateToken - (44:1,40 [15] Tags.cshtml) - Html - </script @foo >
|
||||||
CSharpCode - (59:1,55 [2] Tags.cshtml)
|
CSharpCode - (59:1,55 [2] Tags.cshtml)
|
||||||
IntermediateToken - (59:1,55 [2] Tags.cshtml) - CSharp - \n
|
IntermediateToken - (59:1,55 [2] Tags.cshtml) - CSharp - \n
|
||||||
HtmlContent - (64:3,0 [20] Tags.cshtml)
|
HtmlContent - (64:3,0 [38] Tags.cshtml)
|
||||||
IntermediateToken - (64:3,0 [2] Tags.cshtml) - Html - \n
|
IntermediateToken - (64:3,0 [2] Tags.cshtml) - Html - \n
|
||||||
IntermediateToken - (66:4,0 [7] Tags.cshtml) - Html - <script
|
IntermediateToken - (66:4,0 [7] Tags.cshtml) - Html - <script
|
||||||
IntermediateToken - (73:4,7 [1] Tags.cshtml) - Html - >
|
IntermediateToken - (73:4,7 [17] Tags.cshtml) - Html - type="text/html"
|
||||||
IntermediateToken - (74:4,8 [10] Tags.cshtml) - Html - </script @
|
IntermediateToken - (90:4,24 [1] Tags.cshtml) - Html - >
|
||||||
|
IntermediateToken - (91:4,25 [6] Tags.cshtml) - Html - \n
|
||||||
|
IntermediateToken - (97:5,4 [5] Tags.cshtml) - Html - <%var
|
||||||
|
HtmlAttribute - (102:5,9 [4] Tags.cshtml) - x = -
|
||||||
|
HtmlAttribute - (106:5,13 [9] Tags.cshtml) - window = -
|
||||||
|
HtmlContent - (115:5,22 [41] Tags.cshtml)
|
||||||
|
IntermediateToken - (115:5,22 [7] Tags.cshtml) - Html - = null%
|
||||||
|
IntermediateToken - (122:5,29 [1] Tags.cshtml) - Html - >
|
||||||
|
IntermediateToken - (123:5,30 [2] Tags.cshtml) - Html - \n
|
||||||
|
IntermediateToken - (125:6,0 [9] Tags.cshtml) - Html - </script>
|
||||||
|
IntermediateToken - (134:6,9 [4] Tags.cshtml) - Html - \n\n
|
||||||
|
IntermediateToken - (138:8,0 [7] Tags.cshtml) - Html - <script
|
||||||
|
IntermediateToken - (145:8,7 [1] Tags.cshtml) - Html - >
|
||||||
|
IntermediateToken - (146:8,8 [10] Tags.cshtml) - Html - </script @
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,11 @@
|
||||||
#pragma checksum "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Tags.cshtml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "42fb758ed87c3709cfb3f3aeff7a9cf8d242b74c"
|
#pragma checksum "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Tags.cshtml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "75edd5542ddb6f78ab6a4d309bb3525a99ecfa55"
|
||||||
// <auto-generated/>
|
// <auto-generated/>
|
||||||
#pragma warning disable 1591
|
#pragma warning disable 1591
|
||||||
[assembly: global::Microsoft.AspNetCore.Razor.Hosting.RazorCompiledItemAttribute(typeof(Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles.TestFiles_IntegrationTests_CodeGenerationIntegrationTest_Tags_Runtime), @"default", @"/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Tags.cshtml")]
|
[assembly: global::Microsoft.AspNetCore.Razor.Hosting.RazorCompiledItemAttribute(typeof(Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles.TestFiles_IntegrationTests_CodeGenerationIntegrationTest_Tags_Runtime), @"default", @"/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Tags.cshtml")]
|
||||||
namespace Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles
|
namespace Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles
|
||||||
{
|
{
|
||||||
#line hidden
|
#line hidden
|
||||||
[global::Microsoft.AspNetCore.Razor.Hosting.RazorSourceChecksumAttribute(@"SHA1", @"42fb758ed87c3709cfb3f3aeff7a9cf8d242b74c", @"/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Tags.cshtml")]
|
[global::Microsoft.AspNetCore.Razor.Hosting.RazorSourceChecksumAttribute(@"SHA1", @"75edd5542ddb6f78ab6a4d309bb3525a99ecfa55", @"/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Tags.cshtml")]
|
||||||
public class TestFiles_IntegrationTests_CodeGenerationIntegrationTest_Tags_Runtime
|
public class TestFiles_IntegrationTests_CodeGenerationIntegrationTest_Tags_Runtime
|
||||||
{
|
{
|
||||||
#pragma warning disable 1998
|
#pragma warning disable 1998
|
||||||
|
|
@ -13,7 +13,12 @@ namespace Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles
|
||||||
{
|
{
|
||||||
WriteLiteral(" <script type=\"text/javascript\" ");
|
WriteLiteral(" <script type=\"text/javascript\" ");
|
||||||
WriteLiteral(" ></script @foo >\r\n");
|
WriteLiteral(" ></script @foo >\r\n");
|
||||||
WriteLiteral("\r\n<script></script @");
|
WriteLiteral("\r\n<script type=\"text/html\">\r\n <%var");
|
||||||
|
BeginWriteAttribute("x", " x =", 102, "", 106, 0);
|
||||||
|
EndWriteAttribute();
|
||||||
|
BeginWriteAttribute("window", " window =", 106, "", 115, 0);
|
||||||
|
EndWriteAttribute();
|
||||||
|
WriteLiteral("= null%>\r\n</script>\r\n\r\n<script></script @");
|
||||||
}
|
}
|
||||||
#pragma warning restore 1998
|
#pragma warning restore 1998
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1 +1 @@
|
||||||
TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Tags.cshtml(5,11): Error RZ1024: End of file or an unexpected character was reached before the "script" tag could be parsed. Elements inside markup blocks must be complete. They must either be self-closing ("<br />") or have matching end tags ("<p>Hello</p>"). If you intended to display a "<" character, use the "<" HTML entity.
|
TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Tags.cshtml(9,11): Error RZ1024: End of file or an unexpected character was reached before the "script" tag could be parsed. Elements inside markup blocks must be complete. They must either be self-closing ("<br />") or have matching end tags ("<p>Hello</p>"). If you intended to display a "<" character, use the "<" HTML entity.
|
||||||
|
|
|
||||||
|
|
@ -20,8 +20,21 @@ Document -
|
||||||
IntermediateToken - (59:1,55 [2] Tags.cshtml) - Html - \n
|
IntermediateToken - (59:1,55 [2] Tags.cshtml) - Html - \n
|
||||||
CSharpCode - (61:2,0 [0] Tags.cshtml)
|
CSharpCode - (61:2,0 [0] Tags.cshtml)
|
||||||
IntermediateToken - (61:2,0 [0] Tags.cshtml) - CSharp -
|
IntermediateToken - (61:2,0 [0] Tags.cshtml) - CSharp -
|
||||||
HtmlContent - (64:3,0 [20] Tags.cshtml)
|
HtmlContent - (64:3,0 [38] Tags.cshtml)
|
||||||
IntermediateToken - (64:3,0 [2] Tags.cshtml) - Html - \n
|
IntermediateToken - (64:3,0 [2] Tags.cshtml) - Html - \n
|
||||||
IntermediateToken - (66:4,0 [7] Tags.cshtml) - Html - <script
|
IntermediateToken - (66:4,0 [7] Tags.cshtml) - Html - <script
|
||||||
IntermediateToken - (73:4,7 [1] Tags.cshtml) - Html - >
|
IntermediateToken - (73:4,7 [17] Tags.cshtml) - Html - type="text/html"
|
||||||
IntermediateToken - (74:4,8 [10] Tags.cshtml) - Html - </script @
|
IntermediateToken - (90:4,24 [1] Tags.cshtml) - Html - >
|
||||||
|
IntermediateToken - (91:4,25 [6] Tags.cshtml) - Html - \n
|
||||||
|
IntermediateToken - (97:5,4 [5] Tags.cshtml) - Html - <%var
|
||||||
|
HtmlAttribute - (102:5,9 [4] Tags.cshtml) - x = -
|
||||||
|
HtmlAttribute - (106:5,13 [9] Tags.cshtml) - window = -
|
||||||
|
HtmlContent - (115:5,22 [41] Tags.cshtml)
|
||||||
|
IntermediateToken - (115:5,22 [7] Tags.cshtml) - Html - = null%
|
||||||
|
IntermediateToken - (122:5,29 [1] Tags.cshtml) - Html - >
|
||||||
|
IntermediateToken - (123:5,30 [2] Tags.cshtml) - Html - \n
|
||||||
|
IntermediateToken - (125:6,0 [9] Tags.cshtml) - Html - </script>
|
||||||
|
IntermediateToken - (134:6,9 [4] Tags.cshtml) - Html - \n\n
|
||||||
|
IntermediateToken - (138:8,0 [7] Tags.cshtml) - Html - <script
|
||||||
|
IntermediateToken - (145:8,7 [1] Tags.cshtml) - Html - >
|
||||||
|
IntermediateToken - (146:8,8 [10] Tags.cshtml) - Html - </script @
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,7 @@ using Microsoft.AspNetCore.Components.Web;
|
||||||
#line default
|
#line default
|
||||||
#line hidden
|
#line hidden
|
||||||
#nullable disable
|
#nullable disable
|
||||||
public class TestComponent : Microsoft.AspNetCore.Components.ComponentBase
|
public partial class TestComponent : Microsoft.AspNetCore.Components.ComponentBase
|
||||||
{
|
{
|
||||||
#pragma warning disable 219
|
#pragma warning disable 219
|
||||||
private void __RazorDirectiveTokenHelpers__() {
|
private void __RazorDirectiveTokenHelpers__() {
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@ Document -
|
||||||
UsingDirective - (104:5,1 [37] ) - Microsoft.AspNetCore.Components
|
UsingDirective - (104:5,1 [37] ) - Microsoft.AspNetCore.Components
|
||||||
UsingDirective - (1:0,1 [28] x:\dir\subdir\Test\TestComponent.cshtml) - System.Threading.Tasks
|
UsingDirective - (1:0,1 [28] x:\dir\subdir\Test\TestComponent.cshtml) - System.Threading.Tasks
|
||||||
UsingDirective - (32:1,1 [41] x:\dir\subdir\Test\TestComponent.cshtml) - Microsoft.AspNetCore.Components.Web
|
UsingDirective - (32:1,1 [41] x:\dir\subdir\Test\TestComponent.cshtml) - Microsoft.AspNetCore.Components.Web
|
||||||
ClassDeclaration - - public - TestComponent - Microsoft.AspNetCore.Components.ComponentBase -
|
ClassDeclaration - - public partial - TestComponent - Microsoft.AspNetCore.Components.ComponentBase -
|
||||||
DesignTimeDirective -
|
DesignTimeDirective -
|
||||||
CSharpCode -
|
CSharpCode -
|
||||||
IntermediateToken - - CSharp - #pragma warning disable 0414
|
IntermediateToken - - CSharp - #pragma warning disable 0414
|
||||||
|
|
|
||||||
|
|
@ -10,6 +10,6 @@ Generated Location: (436:18,0 [41] )
|
||||||
|
|
||||||
Source Location: (94:2,19 [33] x:\dir\subdir\Test\TestComponent.cshtml)
|
Source Location: (94:2,19 [33] x:\dir\subdir\Test\TestComponent.cshtml)
|
||||||
|async (e) => await Task.Delay(10)|
|
|async (e) => await Task.Delay(10)|
|
||||||
Generated Location: (1282:38,19 [33] )
|
Generated Location: (1290:38,19 [33] )
|
||||||
|async (e) => await Task.Delay(10)|
|
|async (e) => await Task.Delay(10)|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,7 @@ using Microsoft.AspNetCore.Components.Web;
|
||||||
#line default
|
#line default
|
||||||
#line hidden
|
#line hidden
|
||||||
#nullable disable
|
#nullable disable
|
||||||
public class TestComponent : Microsoft.AspNetCore.Components.ComponentBase
|
public partial class TestComponent : Microsoft.AspNetCore.Components.ComponentBase
|
||||||
{
|
{
|
||||||
#pragma warning disable 219
|
#pragma warning disable 219
|
||||||
private void __RazorDirectiveTokenHelpers__() {
|
private void __RazorDirectiveTokenHelpers__() {
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@ Document -
|
||||||
UsingDirective - (104:5,1 [37] ) - Microsoft.AspNetCore.Components
|
UsingDirective - (104:5,1 [37] ) - Microsoft.AspNetCore.Components
|
||||||
UsingDirective - (1:0,1 [28] x:\dir\subdir\Test\TestComponent.cshtml) - System.Threading.Tasks
|
UsingDirective - (1:0,1 [28] x:\dir\subdir\Test\TestComponent.cshtml) - System.Threading.Tasks
|
||||||
UsingDirective - (32:1,1 [41] x:\dir\subdir\Test\TestComponent.cshtml) - Microsoft.AspNetCore.Components.Web
|
UsingDirective - (32:1,1 [41] x:\dir\subdir\Test\TestComponent.cshtml) - Microsoft.AspNetCore.Components.Web
|
||||||
ClassDeclaration - - public - TestComponent - Microsoft.AspNetCore.Components.ComponentBase -
|
ClassDeclaration - - public partial - TestComponent - Microsoft.AspNetCore.Components.ComponentBase -
|
||||||
DesignTimeDirective -
|
DesignTimeDirective -
|
||||||
CSharpCode -
|
CSharpCode -
|
||||||
IntermediateToken - - CSharp - #pragma warning disable 0414
|
IntermediateToken - - CSharp - #pragma warning disable 0414
|
||||||
|
|
@ -27,5 +27,5 @@ Document -
|
||||||
IntermediateToken - - CSharp - )
|
IntermediateToken - - CSharp - )
|
||||||
HtmlContent - (103:2,28 [2] x:\dir\subdir\Test\TestComponent.cshtml)
|
HtmlContent - (103:2,28 [2] x:\dir\subdir\Test\TestComponent.cshtml)
|
||||||
IntermediateToken - (103:2,28 [2] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n
|
IntermediateToken - (103:2,28 [2] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n
|
||||||
CSharpCode - (112:3,7 [89] x:\dir\subdir\Test\TestComponent.cshtml)
|
CSharpCode - (112:3,7 [88] x:\dir\subdir\Test\TestComponent.cshtml)
|
||||||
IntermediateToken - (112:3,7 [89] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n Task OnClick(MouseEventArgs e) \n {\n return Task.CompletedTask;\n }\n
|
IntermediateToken - (112:3,7 [88] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n Task OnClick(MouseEventArgs e)\n {\n return Task.CompletedTask;\n }\n
|
||||||
|
|
|
||||||
|
|
@ -10,17 +10,17 @@ Generated Location: (436:18,0 [41] )
|
||||||
|
|
||||||
Source Location: (92:2,17 [7] x:\dir\subdir\Test\TestComponent.cshtml)
|
Source Location: (92:2,17 [7] x:\dir\subdir\Test\TestComponent.cshtml)
|
||||||
|OnClick|
|
|OnClick|
|
||||||
Generated Location: (1280:38,17 [7] )
|
Generated Location: (1288:38,17 [7] )
|
||||||
|OnClick|
|
|OnClick|
|
||||||
|
|
||||||
Source Location: (112:3,7 [89] x:\dir\subdir\Test\TestComponent.cshtml)
|
Source Location: (112:3,7 [88] x:\dir\subdir\Test\TestComponent.cshtml)
|
||||||
|
|
|
|
||||||
Task OnClick(MouseEventArgs e)
|
Task OnClick(MouseEventArgs e)
|
||||||
{
|
{
|
||||||
return Task.CompletedTask;
|
return Task.CompletedTask;
|
||||||
}
|
}
|
||||||
|
|
|
|
||||||
Generated Location: (1481:48,7 [89] )
|
Generated Location: (1489:48,7 [88] )
|
||||||
|
|
|
|
||||||
Task OnClick(MouseEventArgs e)
|
Task OnClick(MouseEventArgs e)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,7 @@ using Microsoft.AspNetCore.Components.Web;
|
||||||
#line default
|
#line default
|
||||||
#line hidden
|
#line hidden
|
||||||
#nullable disable
|
#nullable disable
|
||||||
public class TestComponent : Microsoft.AspNetCore.Components.ComponentBase
|
public partial class TestComponent : Microsoft.AspNetCore.Components.ComponentBase
|
||||||
{
|
{
|
||||||
#pragma warning disable 219
|
#pragma warning disable 219
|
||||||
private void __RazorDirectiveTokenHelpers__() {
|
private void __RazorDirectiveTokenHelpers__() {
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@ Document -
|
||||||
UsingDirective - (104:5,1 [37] ) - Microsoft.AspNetCore.Components
|
UsingDirective - (104:5,1 [37] ) - Microsoft.AspNetCore.Components
|
||||||
UsingDirective - (1:0,1 [28] x:\dir\subdir\Test\TestComponent.cshtml) - System.Threading.Tasks
|
UsingDirective - (1:0,1 [28] x:\dir\subdir\Test\TestComponent.cshtml) - System.Threading.Tasks
|
||||||
UsingDirective - (32:1,1 [41] x:\dir\subdir\Test\TestComponent.cshtml) - Microsoft.AspNetCore.Components.Web
|
UsingDirective - (32:1,1 [41] x:\dir\subdir\Test\TestComponent.cshtml) - Microsoft.AspNetCore.Components.Web
|
||||||
ClassDeclaration - - public - TestComponent - Microsoft.AspNetCore.Components.ComponentBase -
|
ClassDeclaration - - public partial - TestComponent - Microsoft.AspNetCore.Components.ComponentBase -
|
||||||
DesignTimeDirective -
|
DesignTimeDirective -
|
||||||
CSharpCode -
|
CSharpCode -
|
||||||
IntermediateToken - - CSharp - #pragma warning disable 0414
|
IntermediateToken - - CSharp - #pragma warning disable 0414
|
||||||
|
|
|
||||||
|
|
@ -10,6 +10,6 @@ Generated Location: (436:18,0 [41] )
|
||||||
|
|
||||||
Source Location: (94:2,19 [32] x:\dir\subdir\Test\TestComponent.cshtml)
|
Source Location: (94:2,19 [32] x:\dir\subdir\Test\TestComponent.cshtml)
|
||||||
|async () => await Task.Delay(10)|
|
|async () => await Task.Delay(10)|
|
||||||
Generated Location: (1282:38,19 [32] )
|
Generated Location: (1290:38,19 [32] )
|
||||||
|async () => await Task.Delay(10)|
|
|async () => await Task.Delay(10)|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,7 @@ using Microsoft.AspNetCore.Components.Web;
|
||||||
#line default
|
#line default
|
||||||
#line hidden
|
#line hidden
|
||||||
#nullable disable
|
#nullable disable
|
||||||
public class TestComponent : Microsoft.AspNetCore.Components.ComponentBase
|
public partial class TestComponent : Microsoft.AspNetCore.Components.ComponentBase
|
||||||
{
|
{
|
||||||
#pragma warning disable 219
|
#pragma warning disable 219
|
||||||
private void __RazorDirectiveTokenHelpers__() {
|
private void __RazorDirectiveTokenHelpers__() {
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@ Document -
|
||||||
UsingDirective - (104:5,1 [37] ) - Microsoft.AspNetCore.Components
|
UsingDirective - (104:5,1 [37] ) - Microsoft.AspNetCore.Components
|
||||||
UsingDirective - (1:0,1 [28] x:\dir\subdir\Test\TestComponent.cshtml) - System.Threading.Tasks
|
UsingDirective - (1:0,1 [28] x:\dir\subdir\Test\TestComponent.cshtml) - System.Threading.Tasks
|
||||||
UsingDirective - (32:1,1 [41] x:\dir\subdir\Test\TestComponent.cshtml) - Microsoft.AspNetCore.Components.Web
|
UsingDirective - (32:1,1 [41] x:\dir\subdir\Test\TestComponent.cshtml) - Microsoft.AspNetCore.Components.Web
|
||||||
ClassDeclaration - - public - TestComponent - Microsoft.AspNetCore.Components.ComponentBase -
|
ClassDeclaration - - public partial - TestComponent - Microsoft.AspNetCore.Components.ComponentBase -
|
||||||
DesignTimeDirective -
|
DesignTimeDirective -
|
||||||
CSharpCode -
|
CSharpCode -
|
||||||
IntermediateToken - - CSharp - #pragma warning disable 0414
|
IntermediateToken - - CSharp - #pragma warning disable 0414
|
||||||
|
|
@ -27,5 +27,5 @@ Document -
|
||||||
IntermediateToken - - CSharp - )
|
IntermediateToken - - CSharp - )
|
||||||
HtmlContent - (103:2,28 [2] x:\dir\subdir\Test\TestComponent.cshtml)
|
HtmlContent - (103:2,28 [2] x:\dir\subdir\Test\TestComponent.cshtml)
|
||||||
IntermediateToken - (103:2,28 [2] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n
|
IntermediateToken - (103:2,28 [2] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n
|
||||||
CSharpCode - (112:3,7 [73] x:\dir\subdir\Test\TestComponent.cshtml)
|
CSharpCode - (112:3,7 [72] x:\dir\subdir\Test\TestComponent.cshtml)
|
||||||
IntermediateToken - (112:3,7 [73] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n Task OnClick() \n {\n return Task.CompletedTask;\n }\n
|
IntermediateToken - (112:3,7 [72] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n Task OnClick()\n {\n return Task.CompletedTask;\n }\n
|
||||||
|
|
|
||||||
|
|
@ -10,17 +10,17 @@ Generated Location: (436:18,0 [41] )
|
||||||
|
|
||||||
Source Location: (92:2,17 [7] x:\dir\subdir\Test\TestComponent.cshtml)
|
Source Location: (92:2,17 [7] x:\dir\subdir\Test\TestComponent.cshtml)
|
||||||
|OnClick|
|
|OnClick|
|
||||||
Generated Location: (1280:38,17 [7] )
|
Generated Location: (1288:38,17 [7] )
|
||||||
|OnClick|
|
|OnClick|
|
||||||
|
|
||||||
Source Location: (112:3,7 [73] x:\dir\subdir\Test\TestComponent.cshtml)
|
Source Location: (112:3,7 [72] x:\dir\subdir\Test\TestComponent.cshtml)
|
||||||
|
|
|
|
||||||
Task OnClick()
|
Task OnClick()
|
||||||
{
|
{
|
||||||
return Task.CompletedTask;
|
return Task.CompletedTask;
|
||||||
}
|
}
|
||||||
|
|
|
|
||||||
Generated Location: (1481:48,7 [73] )
|
Generated Location: (1489:48,7 [72] )
|
||||||
|
|
|
|
||||||
Task OnClick()
|
Task OnClick()
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@ namespace Test
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Microsoft.AspNetCore.Components;
|
using Microsoft.AspNetCore.Components;
|
||||||
public class TestComponent : Microsoft.AspNetCore.Components.ComponentBase
|
public partial class TestComponent : Microsoft.AspNetCore.Components.ComponentBase
|
||||||
{
|
{
|
||||||
#pragma warning disable 219
|
#pragma warning disable 219
|
||||||
private void __RazorDirectiveTokenHelpers__() {
|
private void __RazorDirectiveTokenHelpers__() {
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@ Document -
|
||||||
UsingDirective - (53:3,1 [17] ) - System.Linq
|
UsingDirective - (53:3,1 [17] ) - System.Linq
|
||||||
UsingDirective - (73:4,1 [28] ) - System.Threading.Tasks
|
UsingDirective - (73:4,1 [28] ) - System.Threading.Tasks
|
||||||
UsingDirective - (104:5,1 [37] ) - Microsoft.AspNetCore.Components
|
UsingDirective - (104:5,1 [37] ) - Microsoft.AspNetCore.Components
|
||||||
ClassDeclaration - - public - TestComponent - Microsoft.AspNetCore.Components.ComponentBase -
|
ClassDeclaration - - public partial - TestComponent - Microsoft.AspNetCore.Components.ComponentBase -
|
||||||
DesignTimeDirective -
|
DesignTimeDirective -
|
||||||
CSharpCode -
|
CSharpCode -
|
||||||
IntermediateToken - - CSharp - #pragma warning disable 0414
|
IntermediateToken - - CSharp - #pragma warning disable 0414
|
||||||
|
|
@ -15,13 +15,13 @@ Document -
|
||||||
IntermediateToken - - CSharp - #pragma warning restore 0414
|
IntermediateToken - - CSharp - #pragma warning restore 0414
|
||||||
MethodDeclaration - - protected override - void - BuildRenderTree
|
MethodDeclaration - - protected override - void - BuildRenderTree
|
||||||
Component - (0:0,0 [41] x:\dir\subdir\Test\TestComponent.cshtml) - MyComponent
|
Component - (0:0,0 [41] x:\dir\subdir\Test\TestComponent.cshtml) - MyComponent
|
||||||
ComponentAttribute - (26:0,26 [11] x:\dir\subdir\Test\TestComponent.cshtml) - Value - AttributeStructure.DoubleQuotes
|
ComponentAttribute - (26:0,26 [11] x:\dir\subdir\Test\TestComponent.cshtml) - Value - Value - AttributeStructure.DoubleQuotes
|
||||||
CSharpExpression -
|
CSharpExpression -
|
||||||
IntermediateToken - (26:0,26 [11] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - ParentValue
|
IntermediateToken - (26:0,26 [11] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - ParentValue
|
||||||
ComponentAttribute - (26:0,26 [11] x:\dir\subdir\Test\TestComponent.cshtml) - ValueChanged - AttributeStructure.DoubleQuotes
|
ComponentAttribute - (26:0,26 [11] x:\dir\subdir\Test\TestComponent.cshtml) - ValueChanged - ValueChanged - AttributeStructure.DoubleQuotes
|
||||||
CSharpExpression -
|
CSharpExpression -
|
||||||
IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.CompilerServices.RuntimeHelpers.CreateInferredEventCallback(this, __value => ParentValue = __value, ParentValue)
|
IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.CompilerServices.RuntimeHelpers.CreateInferredEventCallback(this, __value => ParentValue = __value, ParentValue)
|
||||||
ComponentAttribute - (26:0,26 [11] x:\dir\subdir\Test\TestComponent.cshtml) - ValueExpression - AttributeStructure.DoubleQuotes
|
ComponentAttribute - (26:0,26 [11] x:\dir\subdir\Test\TestComponent.cshtml) - ValueExpression - ValueExpression - AttributeStructure.DoubleQuotes
|
||||||
CSharpExpression -
|
CSharpExpression -
|
||||||
IntermediateToken - - CSharp - () => ParentValue
|
IntermediateToken - - CSharp - () => ParentValue
|
||||||
HtmlContent - (41:0,41 [2] x:\dir\subdir\Test\TestComponent.cshtml)
|
HtmlContent - (41:0,41 [2] x:\dir\subdir\Test\TestComponent.cshtml)
|
||||||
|
|
|
||||||
|
|
@ -1,13 +1,13 @@
|
||||||
Source Location: (26:0,26 [11] x:\dir\subdir\Test\TestComponent.cshtml)
|
Source Location: (26:0,26 [11] x:\dir\subdir\Test\TestComponent.cshtml)
|
||||||
|ParentValue|
|
|ParentValue|
|
||||||
Generated Location: (978:25,26 [11] )
|
Generated Location: (986:25,26 [11] )
|
||||||
|ParentValue|
|
|ParentValue|
|
||||||
|
|
||||||
Source Location: (50:1,7 [50] x:\dir\subdir\Test\TestComponent.cshtml)
|
Source Location: (50:1,7 [50] x:\dir\subdir\Test\TestComponent.cshtml)
|
||||||
|
|
|
|
||||||
public int ParentValue { get; set; } = 42;
|
public int ParentValue { get; set; } = 42;
|
||||||
|
|
|
|
||||||
Generated Location: (2059:48,7 [50] )
|
Generated Location: (2067:48,7 [50] )
|
||||||
|
|
|
|
||||||
public int ParentValue { get; set; } = 42;
|
public int ParentValue { get; set; } = 42;
|
||||||
|
|
|
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@ namespace Test
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Microsoft.AspNetCore.Components;
|
using Microsoft.AspNetCore.Components;
|
||||||
public class TestComponent : Microsoft.AspNetCore.Components.ComponentBase
|
public partial class TestComponent : Microsoft.AspNetCore.Components.ComponentBase
|
||||||
{
|
{
|
||||||
#pragma warning disable 219
|
#pragma warning disable 219
|
||||||
private void __RazorDirectiveTokenHelpers__() {
|
private void __RazorDirectiveTokenHelpers__() {
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@ Document -
|
||||||
UsingDirective - (53:3,1 [17] ) - System.Linq
|
UsingDirective - (53:3,1 [17] ) - System.Linq
|
||||||
UsingDirective - (73:4,1 [28] ) - System.Threading.Tasks
|
UsingDirective - (73:4,1 [28] ) - System.Threading.Tasks
|
||||||
UsingDirective - (104:5,1 [37] ) - Microsoft.AspNetCore.Components
|
UsingDirective - (104:5,1 [37] ) - Microsoft.AspNetCore.Components
|
||||||
ClassDeclaration - - public - TestComponent - Microsoft.AspNetCore.Components.ComponentBase -
|
ClassDeclaration - - public partial - TestComponent - Microsoft.AspNetCore.Components.ComponentBase -
|
||||||
DesignTimeDirective -
|
DesignTimeDirective -
|
||||||
CSharpCode -
|
CSharpCode -
|
||||||
IntermediateToken - - CSharp - #pragma warning disable 0414
|
IntermediateToken - - CSharp - #pragma warning disable 0414
|
||||||
|
|
@ -15,13 +15,13 @@ Document -
|
||||||
IntermediateToken - - CSharp - #pragma warning restore 0414
|
IntermediateToken - - CSharp - #pragma warning restore 0414
|
||||||
MethodDeclaration - - protected override - void - BuildRenderTree
|
MethodDeclaration - - protected override - void - BuildRenderTree
|
||||||
Component - (0:0,0 [45] x:\dir\subdir\Test\TestComponent.cshtml) - MyComponent
|
Component - (0:0,0 [45] x:\dir\subdir\Test\TestComponent.cshtml) - MyComponent
|
||||||
ComponentAttribute - (30:0,30 [11] x:\dir\subdir\Test\TestComponent.cshtml) - SomeParam - AttributeStructure.DoubleQuotes
|
ComponentAttribute - (30:0,30 [11] x:\dir\subdir\Test\TestComponent.cshtml) - SomeParam - SomeParam - AttributeStructure.DoubleQuotes
|
||||||
CSharpExpression -
|
CSharpExpression -
|
||||||
IntermediateToken - (30:0,30 [11] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - ParentValue
|
IntermediateToken - (30:0,30 [11] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - ParentValue
|
||||||
ComponentAttribute - (30:0,30 [11] x:\dir\subdir\Test\TestComponent.cshtml) - SomeParamChanged - AttributeStructure.DoubleQuotes
|
ComponentAttribute - (30:0,30 [11] x:\dir\subdir\Test\TestComponent.cshtml) - SomeParamChanged - SomeParamChanged - AttributeStructure.DoubleQuotes
|
||||||
CSharpExpression -
|
CSharpExpression -
|
||||||
IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.CompilerServices.RuntimeHelpers.CreateInferredEventCallback(this, __value => ParentValue = __value, ParentValue)
|
IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.CompilerServices.RuntimeHelpers.CreateInferredEventCallback(this, __value => ParentValue = __value, ParentValue)
|
||||||
ComponentAttribute - (30:0,30 [11] x:\dir\subdir\Test\TestComponent.cshtml) - SomeParamExpression - AttributeStructure.DoubleQuotes
|
ComponentAttribute - (30:0,30 [11] x:\dir\subdir\Test\TestComponent.cshtml) - SomeParamExpression - SomeParamExpression - AttributeStructure.DoubleQuotes
|
||||||
CSharpExpression -
|
CSharpExpression -
|
||||||
IntermediateToken - - CSharp - () => ParentValue
|
IntermediateToken - - CSharp - () => ParentValue
|
||||||
HtmlContent - (45:0,45 [2] x:\dir\subdir\Test\TestComponent.cshtml)
|
HtmlContent - (45:0,45 [2] x:\dir\subdir\Test\TestComponent.cshtml)
|
||||||
|
|
|
||||||
|
|
@ -1,13 +1,13 @@
|
||||||
Source Location: (30:0,30 [11] x:\dir\subdir\Test\TestComponent.cshtml)
|
Source Location: (30:0,30 [11] x:\dir\subdir\Test\TestComponent.cshtml)
|
||||||
|ParentValue|
|
|ParentValue|
|
||||||
Generated Location: (969:25,30 [11] )
|
Generated Location: (977:25,30 [11] )
|
||||||
|ParentValue|
|
|ParentValue|
|
||||||
|
|
||||||
Source Location: (54:1,7 [65] x:\dir\subdir\Test\TestComponent.cshtml)
|
Source Location: (54:1,7 [65] x:\dir\subdir\Test\TestComponent.cshtml)
|
||||||
|
|
|
|
||||||
public DateTime ParentValue { get; set; } = DateTime.Now;
|
public DateTime ParentValue { get; set; } = DateTime.Now;
|
||||||
|
|
|
|
||||||
Generated Location: (1579:43,7 [65] )
|
Generated Location: (1587:43,7 [65] )
|
||||||
|
|
|
|
||||||
public DateTime ParentValue { get; set; } = DateTime.Now;
|
public DateTime ParentValue { get; set; } = DateTime.Now;
|
||||||
|
|
|
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@ namespace Test
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Microsoft.AspNetCore.Components;
|
using Microsoft.AspNetCore.Components;
|
||||||
public class TestComponent : Microsoft.AspNetCore.Components.ComponentBase
|
public partial class TestComponent : Microsoft.AspNetCore.Components.ComponentBase
|
||||||
{
|
{
|
||||||
#pragma warning disable 219
|
#pragma warning disable 219
|
||||||
private void __RazorDirectiveTokenHelpers__() {
|
private void __RazorDirectiveTokenHelpers__() {
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@ Document -
|
||||||
UsingDirective - (53:3,1 [17] ) - System.Linq
|
UsingDirective - (53:3,1 [17] ) - System.Linq
|
||||||
UsingDirective - (73:4,1 [28] ) - System.Threading.Tasks
|
UsingDirective - (73:4,1 [28] ) - System.Threading.Tasks
|
||||||
UsingDirective - (104:5,1 [37] ) - Microsoft.AspNetCore.Components
|
UsingDirective - (104:5,1 [37] ) - Microsoft.AspNetCore.Components
|
||||||
ClassDeclaration - - public - TestComponent - Microsoft.AspNetCore.Components.ComponentBase -
|
ClassDeclaration - - public partial - TestComponent - Microsoft.AspNetCore.Components.ComponentBase -
|
||||||
DesignTimeDirective -
|
DesignTimeDirective -
|
||||||
CSharpCode -
|
CSharpCode -
|
||||||
IntermediateToken - - CSharp - #pragma warning disable 0414
|
IntermediateToken - - CSharp - #pragma warning disable 0414
|
||||||
|
|
@ -15,10 +15,10 @@ Document -
|
||||||
IntermediateToken - - CSharp - #pragma warning restore 0414
|
IntermediateToken - - CSharp - #pragma warning restore 0414
|
||||||
MethodDeclaration - - protected override - void - BuildRenderTree
|
MethodDeclaration - - protected override - void - BuildRenderTree
|
||||||
Component - (0:0,0 [41] x:\dir\subdir\Test\TestComponent.cshtml) - MyComponent
|
Component - (0:0,0 [41] x:\dir\subdir\Test\TestComponent.cshtml) - MyComponent
|
||||||
ComponentAttribute - (26:0,26 [11] x:\dir\subdir\Test\TestComponent.cshtml) - Value - AttributeStructure.DoubleQuotes
|
ComponentAttribute - (26:0,26 [11] x:\dir\subdir\Test\TestComponent.cshtml) - Value - Value - AttributeStructure.DoubleQuotes
|
||||||
CSharpExpression -
|
CSharpExpression -
|
||||||
IntermediateToken - (26:0,26 [11] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - ParentValue
|
IntermediateToken - (26:0,26 [11] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - ParentValue
|
||||||
ComponentAttribute - (26:0,26 [11] x:\dir\subdir\Test\TestComponent.cshtml) - ValueChanged - AttributeStructure.DoubleQuotes
|
ComponentAttribute - (26:0,26 [11] x:\dir\subdir\Test\TestComponent.cshtml) - ValueChanged - ValueChanged - AttributeStructure.DoubleQuotes
|
||||||
CSharpExpression -
|
CSharpExpression -
|
||||||
IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.CompilerServices.RuntimeHelpers.CreateInferredEventCallback(this, __value => ParentValue = __value, ParentValue)
|
IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.CompilerServices.RuntimeHelpers.CreateInferredEventCallback(this, __value => ParentValue = __value, ParentValue)
|
||||||
HtmlContent - (41:0,41 [2] x:\dir\subdir\Test\TestComponent.cshtml)
|
HtmlContent - (41:0,41 [2] x:\dir\subdir\Test\TestComponent.cshtml)
|
||||||
|
|
|
||||||
|
|
@ -1,13 +1,13 @@
|
||||||
Source Location: (26:0,26 [11] x:\dir\subdir\Test\TestComponent.cshtml)
|
Source Location: (26:0,26 [11] x:\dir\subdir\Test\TestComponent.cshtml)
|
||||||
|ParentValue|
|
|ParentValue|
|
||||||
Generated Location: (978:25,26 [11] )
|
Generated Location: (986:25,26 [11] )
|
||||||
|ParentValue|
|
|ParentValue|
|
||||||
|
|
||||||
Source Location: (50:1,7 [50] x:\dir\subdir\Test\TestComponent.cshtml)
|
Source Location: (50:1,7 [50] x:\dir\subdir\Test\TestComponent.cshtml)
|
||||||
|
|
|
|
||||||
public int ParentValue { get; set; } = 42;
|
public int ParentValue { get; set; } = 42;
|
||||||
|
|
|
|
||||||
Generated Location: (1883:47,7 [50] )
|
Generated Location: (1891:47,7 [50] )
|
||||||
|
|
|
|
||||||
public int ParentValue { get; set; } = 42;
|
public int ParentValue { get; set; } = 42;
|
||||||
|
|
|
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@ namespace Test
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Microsoft.AspNetCore.Components;
|
using Microsoft.AspNetCore.Components;
|
||||||
public class TestComponent : Microsoft.AspNetCore.Components.ComponentBase
|
public partial class TestComponent : Microsoft.AspNetCore.Components.ComponentBase
|
||||||
{
|
{
|
||||||
#pragma warning disable 219
|
#pragma warning disable 219
|
||||||
private void __RazorDirectiveTokenHelpers__() {
|
private void __RazorDirectiveTokenHelpers__() {
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@ Document -
|
||||||
UsingDirective - (53:3,1 [17] ) - System.Linq
|
UsingDirective - (53:3,1 [17] ) - System.Linq
|
||||||
UsingDirective - (73:4,1 [28] ) - System.Threading.Tasks
|
UsingDirective - (73:4,1 [28] ) - System.Threading.Tasks
|
||||||
UsingDirective - (104:5,1 [37] ) - Microsoft.AspNetCore.Components
|
UsingDirective - (104:5,1 [37] ) - Microsoft.AspNetCore.Components
|
||||||
ClassDeclaration - - public - TestComponent - Microsoft.AspNetCore.Components.ComponentBase -
|
ClassDeclaration - - public partial - TestComponent - Microsoft.AspNetCore.Components.ComponentBase -
|
||||||
DesignTimeDirective -
|
DesignTimeDirective -
|
||||||
CSharpCode -
|
CSharpCode -
|
||||||
IntermediateToken - - CSharp - #pragma warning disable 0414
|
IntermediateToken - - CSharp - #pragma warning disable 0414
|
||||||
|
|
@ -15,10 +15,10 @@ Document -
|
||||||
IntermediateToken - - CSharp - #pragma warning restore 0414
|
IntermediateToken - - CSharp - #pragma warning restore 0414
|
||||||
MethodDeclaration - - protected override - void - BuildRenderTree
|
MethodDeclaration - - protected override - void - BuildRenderTree
|
||||||
Component - (0:0,0 [41] x:\dir\subdir\Test\TestComponent.cshtml) - MyComponent
|
Component - (0:0,0 [41] x:\dir\subdir\Test\TestComponent.cshtml) - MyComponent
|
||||||
ComponentAttribute - (26:0,26 [11] x:\dir\subdir\Test\TestComponent.cshtml) - Value - AttributeStructure.DoubleQuotes
|
ComponentAttribute - (26:0,26 [11] x:\dir\subdir\Test\TestComponent.cshtml) - Value - Value - AttributeStructure.DoubleQuotes
|
||||||
CSharpExpression -
|
CSharpExpression -
|
||||||
IntermediateToken - (26:0,26 [11] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - ParentValue
|
IntermediateToken - (26:0,26 [11] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - ParentValue
|
||||||
ComponentAttribute - (26:0,26 [11] x:\dir\subdir\Test\TestComponent.cshtml) - ValueChanged - AttributeStructure.DoubleQuotes
|
ComponentAttribute - (26:0,26 [11] x:\dir\subdir\Test\TestComponent.cshtml) - ValueChanged - ValueChanged - AttributeStructure.DoubleQuotes
|
||||||
CSharpExpression -
|
CSharpExpression -
|
||||||
IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.CompilerServices.RuntimeHelpers.CreateInferredEventCallback(this, __value => ParentValue = __value, ParentValue)
|
IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.CompilerServices.RuntimeHelpers.CreateInferredEventCallback(this, __value => ParentValue = __value, ParentValue)
|
||||||
HtmlContent - (41:0,41 [2] x:\dir\subdir\Test\TestComponent.cshtml)
|
HtmlContent - (41:0,41 [2] x:\dir\subdir\Test\TestComponent.cshtml)
|
||||||
|
|
|
||||||
|
|
@ -1,13 +1,13 @@
|
||||||
Source Location: (26:0,26 [11] x:\dir\subdir\Test\TestComponent.cshtml)
|
Source Location: (26:0,26 [11] x:\dir\subdir\Test\TestComponent.cshtml)
|
||||||
|ParentValue|
|
|ParentValue|
|
||||||
Generated Location: (978:25,26 [11] )
|
Generated Location: (986:25,26 [11] )
|
||||||
|ParentValue|
|
|ParentValue|
|
||||||
|
|
||||||
Source Location: (50:1,7 [55] x:\dir\subdir\Test\TestComponent.cshtml)
|
Source Location: (50:1,7 [55] x:\dir\subdir\Test\TestComponent.cshtml)
|
||||||
|
|
|
|
||||||
public string ParentValue { get; set; } = "42";
|
public string ParentValue { get; set; } = "42";
|
||||||
|
|
|
|
||||||
Generated Location: (1883:47,7 [55] )
|
Generated Location: (1891:47,7 [55] )
|
||||||
|
|
|
|
||||||
public string ParentValue { get; set; } = "42";
|
public string ParentValue { get; set; } = "42";
|
||||||
|
|
|
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@ namespace Test
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Microsoft.AspNetCore.Components;
|
using Microsoft.AspNetCore.Components;
|
||||||
public class TestComponent : Microsoft.AspNetCore.Components.ComponentBase
|
public partial class TestComponent : Microsoft.AspNetCore.Components.ComponentBase
|
||||||
{
|
{
|
||||||
#pragma warning disable 219
|
#pragma warning disable 219
|
||||||
private void __RazorDirectiveTokenHelpers__() {
|
private void __RazorDirectiveTokenHelpers__() {
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@ Document -
|
||||||
UsingDirective - (53:3,1 [17] ) - System.Linq
|
UsingDirective - (53:3,1 [17] ) - System.Linq
|
||||||
UsingDirective - (73:4,1 [28] ) - System.Threading.Tasks
|
UsingDirective - (73:4,1 [28] ) - System.Threading.Tasks
|
||||||
UsingDirective - (104:5,1 [37] ) - Microsoft.AspNetCore.Components
|
UsingDirective - (104:5,1 [37] ) - Microsoft.AspNetCore.Components
|
||||||
ClassDeclaration - - public - TestComponent - Microsoft.AspNetCore.Components.ComponentBase -
|
ClassDeclaration - - public partial - TestComponent - Microsoft.AspNetCore.Components.ComponentBase -
|
||||||
DesignTimeDirective -
|
DesignTimeDirective -
|
||||||
CSharpCode -
|
CSharpCode -
|
||||||
IntermediateToken - - CSharp - #pragma warning disable 0414
|
IntermediateToken - - CSharp - #pragma warning disable 0414
|
||||||
|
|
@ -15,10 +15,10 @@ Document -
|
||||||
IntermediateToken - - CSharp - #pragma warning restore 0414
|
IntermediateToken - - CSharp - #pragma warning restore 0414
|
||||||
MethodDeclaration - - protected override - void - BuildRenderTree
|
MethodDeclaration - - protected override - void - BuildRenderTree
|
||||||
Component - (0:0,0 [71] x:\dir\subdir\Test\TestComponent.cshtml) - MyComponent
|
Component - (0:0,0 [71] x:\dir\subdir\Test\TestComponent.cshtml) - MyComponent
|
||||||
ComponentAttribute - (26:0,26 [11] x:\dir\subdir\Test\TestComponent.cshtml) - Value - AttributeStructure.DoubleQuotes
|
ComponentAttribute - (26:0,26 [11] x:\dir\subdir\Test\TestComponent.cshtml) - Value - Value - AttributeStructure.DoubleQuotes
|
||||||
CSharpExpression -
|
CSharpExpression -
|
||||||
IntermediateToken - (26:0,26 [11] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - ParentValue
|
IntermediateToken - (26:0,26 [11] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - ParentValue
|
||||||
ComponentAttribute - (26:0,26 [11] x:\dir\subdir\Test\TestComponent.cshtml) - OnChanged - AttributeStructure.DoubleQuotes
|
ComponentAttribute - (26:0,26 [11] x:\dir\subdir\Test\TestComponent.cshtml) - OnChanged - OnChanged - AttributeStructure.DoubleQuotes
|
||||||
CSharpExpression -
|
CSharpExpression -
|
||||||
IntermediateToken - - CSharp - __value => ParentValue = __value
|
IntermediateToken - - CSharp - __value => ParentValue = __value
|
||||||
HtmlContent - (71:0,71 [2] x:\dir\subdir\Test\TestComponent.cshtml)
|
HtmlContent - (71:0,71 [2] x:\dir\subdir\Test\TestComponent.cshtml)
|
||||||
|
|
|
||||||
|
|
@ -1,13 +1,13 @@
|
||||||
Source Location: (26:0,26 [11] x:\dir\subdir\Test\TestComponent.cshtml)
|
Source Location: (26:0,26 [11] x:\dir\subdir\Test\TestComponent.cshtml)
|
||||||
|ParentValue|
|
|ParentValue|
|
||||||
Generated Location: (978:25,26 [11] )
|
Generated Location: (986:25,26 [11] )
|
||||||
|ParentValue|
|
|ParentValue|
|
||||||
|
|
||||||
Source Location: (80:1,7 [50] x:\dir\subdir\Test\TestComponent.cshtml)
|
Source Location: (80:1,7 [50] x:\dir\subdir\Test\TestComponent.cshtml)
|
||||||
|
|
|
|
||||||
public int ParentValue { get; set; } = 42;
|
public int ParentValue { get; set; } = 42;
|
||||||
|
|
|
|
||||||
Generated Location: (1586:47,7 [50] )
|
Generated Location: (1594:47,7 [50] )
|
||||||
|
|
|
|
||||||
public int ParentValue { get; set; } = 42;
|
public int ParentValue { get; set; } = 42;
|
||||||
|
|
|
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@ namespace Test
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Microsoft.AspNetCore.Components;
|
using Microsoft.AspNetCore.Components;
|
||||||
public class TestComponent : Microsoft.AspNetCore.Components.ComponentBase
|
public partial class TestComponent : Microsoft.AspNetCore.Components.ComponentBase
|
||||||
{
|
{
|
||||||
#pragma warning disable 219
|
#pragma warning disable 219
|
||||||
private void __RazorDirectiveTokenHelpers__() {
|
private void __RazorDirectiveTokenHelpers__() {
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@ Document -
|
||||||
UsingDirective - (53:3,1 [17] ) - System.Linq
|
UsingDirective - (53:3,1 [17] ) - System.Linq
|
||||||
UsingDirective - (73:4,1 [28] ) - System.Threading.Tasks
|
UsingDirective - (73:4,1 [28] ) - System.Threading.Tasks
|
||||||
UsingDirective - (104:5,1 [37] ) - Microsoft.AspNetCore.Components
|
UsingDirective - (104:5,1 [37] ) - Microsoft.AspNetCore.Components
|
||||||
ClassDeclaration - - public - TestComponent - Microsoft.AspNetCore.Components.ComponentBase -
|
ClassDeclaration - - public partial - TestComponent - Microsoft.AspNetCore.Components.ComponentBase -
|
||||||
DesignTimeDirective -
|
DesignTimeDirective -
|
||||||
CSharpCode -
|
CSharpCode -
|
||||||
IntermediateToken - - CSharp - #pragma warning disable 0414
|
IntermediateToken - - CSharp - #pragma warning disable 0414
|
||||||
|
|
@ -15,10 +15,10 @@ Document -
|
||||||
IntermediateToken - - CSharp - #pragma warning restore 0414
|
IntermediateToken - - CSharp - #pragma warning restore 0414
|
||||||
MethodDeclaration - - protected override - void - BuildRenderTree
|
MethodDeclaration - - protected override - void - BuildRenderTree
|
||||||
Component - (0:0,0 [71] x:\dir\subdir\Test\TestComponent.cshtml) - MyComponent
|
Component - (0:0,0 [71] x:\dir\subdir\Test\TestComponent.cshtml) - MyComponent
|
||||||
ComponentAttribute - (26:0,26 [11] x:\dir\subdir\Test\TestComponent.cshtml) - Value - AttributeStructure.DoubleQuotes
|
ComponentAttribute - (26:0,26 [11] x:\dir\subdir\Test\TestComponent.cshtml) - Value - - AttributeStructure.DoubleQuotes
|
||||||
CSharpExpression -
|
CSharpExpression -
|
||||||
IntermediateToken - (26:0,26 [11] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - ParentValue
|
IntermediateToken - (26:0,26 [11] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - ParentValue
|
||||||
ComponentAttribute - (26:0,26 [11] x:\dir\subdir\Test\TestComponent.cshtml) - OnChanged - AttributeStructure.DoubleQuotes
|
ComponentAttribute - (26:0,26 [11] x:\dir\subdir\Test\TestComponent.cshtml) - OnChanged - - AttributeStructure.DoubleQuotes
|
||||||
CSharpExpression -
|
CSharpExpression -
|
||||||
IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.CompilerServices.RuntimeHelpers.CreateInferredEventCallback(this, __value => ParentValue = __value, ParentValue)
|
IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.CompilerServices.RuntimeHelpers.CreateInferredEventCallback(this, __value => ParentValue = __value, ParentValue)
|
||||||
HtmlContent - (71:0,71 [2] x:\dir\subdir\Test\TestComponent.cshtml)
|
HtmlContent - (71:0,71 [2] x:\dir\subdir\Test\TestComponent.cshtml)
|
||||||
|
|
|
||||||
|
|
@ -1,13 +1,13 @@
|
||||||
Source Location: (26:0,26 [11] x:\dir\subdir\Test\TestComponent.cshtml)
|
Source Location: (26:0,26 [11] x:\dir\subdir\Test\TestComponent.cshtml)
|
||||||
|ParentValue|
|
|ParentValue|
|
||||||
Generated Location: (890:25,26 [11] )
|
Generated Location: (898:25,26 [11] )
|
||||||
|ParentValue|
|
|ParentValue|
|
||||||
|
|
||||||
Source Location: (80:1,7 [50] x:\dir\subdir\Test\TestComponent.cshtml)
|
Source Location: (80:1,7 [50] x:\dir\subdir\Test\TestComponent.cshtml)
|
||||||
|
|
|
|
||||||
public int ParentValue { get; set; } = 42;
|
public int ParentValue { get; set; } = 42;
|
||||||
|
|
|
|
||||||
Generated Location: (1562:46,7 [50] )
|
Generated Location: (1570:46,7 [50] )
|
||||||
|
|
|
|
||||||
public int ParentValue { get; set; } = 42;
|
public int ParentValue { get; set; } = 42;
|
||||||
|
|
|
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@ namespace Test
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Microsoft.AspNetCore.Components;
|
using Microsoft.AspNetCore.Components;
|
||||||
public class TestComponent : Microsoft.AspNetCore.Components.ComponentBase
|
public partial class TestComponent : Microsoft.AspNetCore.Components.ComponentBase
|
||||||
{
|
{
|
||||||
#pragma warning disable 219
|
#pragma warning disable 219
|
||||||
private void __RazorDirectiveTokenHelpers__() {
|
private void __RazorDirectiveTokenHelpers__() {
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@ Document -
|
||||||
UsingDirective - (53:3,1 [17] ) - System.Linq
|
UsingDirective - (53:3,1 [17] ) - System.Linq
|
||||||
UsingDirective - (73:4,1 [28] ) - System.Threading.Tasks
|
UsingDirective - (73:4,1 [28] ) - System.Threading.Tasks
|
||||||
UsingDirective - (104:5,1 [37] ) - Microsoft.AspNetCore.Components
|
UsingDirective - (104:5,1 [37] ) - Microsoft.AspNetCore.Components
|
||||||
ClassDeclaration - - public - TestComponent - Microsoft.AspNetCore.Components.ComponentBase -
|
ClassDeclaration - - public partial - TestComponent - Microsoft.AspNetCore.Components.ComponentBase -
|
||||||
DesignTimeDirective -
|
DesignTimeDirective -
|
||||||
CSharpCode -
|
CSharpCode -
|
||||||
IntermediateToken - - CSharp - #pragma warning disable 0414
|
IntermediateToken - - CSharp - #pragma warning disable 0414
|
||||||
|
|
@ -15,13 +15,13 @@ Document -
|
||||||
IntermediateToken - - CSharp - #pragma warning restore 0414
|
IntermediateToken - - CSharp - #pragma warning restore 0414
|
||||||
MethodDeclaration - - protected override - void - BuildRenderTree
|
MethodDeclaration - - protected override - void - BuildRenderTree
|
||||||
Component - (0:0,0 [41] x:\dir\subdir\Test\TestComponent.cshtml) - MyComponent
|
Component - (0:0,0 [41] x:\dir\subdir\Test\TestComponent.cshtml) - MyComponent
|
||||||
ComponentAttribute - (26:0,26 [11] x:\dir\subdir\Test\TestComponent.cshtml) - Value - AttributeStructure.DoubleQuotes
|
ComponentAttribute - (26:0,26 [11] x:\dir\subdir\Test\TestComponent.cshtml) - Value - Value - AttributeStructure.DoubleQuotes
|
||||||
CSharpExpression -
|
CSharpExpression -
|
||||||
IntermediateToken - (26:0,26 [11] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - ParentValue
|
IntermediateToken - (26:0,26 [11] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - ParentValue
|
||||||
ComponentAttribute - (26:0,26 [11] x:\dir\subdir\Test\TestComponent.cshtml) - ValueChanged - AttributeStructure.DoubleQuotes
|
ComponentAttribute - (26:0,26 [11] x:\dir\subdir\Test\TestComponent.cshtml) - ValueChanged - ValueChanged - AttributeStructure.DoubleQuotes
|
||||||
CSharpExpression -
|
CSharpExpression -
|
||||||
IntermediateToken - - CSharp - __value => ParentValue = __value
|
IntermediateToken - - CSharp - __value => ParentValue = __value
|
||||||
ComponentAttribute - (26:0,26 [11] x:\dir\subdir\Test\TestComponent.cshtml) - ValueExpression - AttributeStructure.DoubleQuotes
|
ComponentAttribute - (26:0,26 [11] x:\dir\subdir\Test\TestComponent.cshtml) - ValueExpression - ValueExpression - AttributeStructure.DoubleQuotes
|
||||||
CSharpExpression -
|
CSharpExpression -
|
||||||
IntermediateToken - - CSharp - () => ParentValue
|
IntermediateToken - - CSharp - () => ParentValue
|
||||||
HtmlContent - (41:0,41 [2] x:\dir\subdir\Test\TestComponent.cshtml)
|
HtmlContent - (41:0,41 [2] x:\dir\subdir\Test\TestComponent.cshtml)
|
||||||
|
|
|
||||||
|
|
@ -1,13 +1,13 @@
|
||||||
Source Location: (26:0,26 [11] x:\dir\subdir\Test\TestComponent.cshtml)
|
Source Location: (26:0,26 [11] x:\dir\subdir\Test\TestComponent.cshtml)
|
||||||
|ParentValue|
|
|ParentValue|
|
||||||
Generated Location: (978:25,26 [11] )
|
Generated Location: (986:25,26 [11] )
|
||||||
|ParentValue|
|
|ParentValue|
|
||||||
|
|
||||||
Source Location: (50:1,7 [50] x:\dir\subdir\Test\TestComponent.cshtml)
|
Source Location: (50:1,7 [50] x:\dir\subdir\Test\TestComponent.cshtml)
|
||||||
|
|
|
|
||||||
public int ParentValue { get; set; } = 42;
|
public int ParentValue { get; set; } = 42;
|
||||||
|
|
|
|
||||||
Generated Location: (1762:48,7 [50] )
|
Generated Location: (1770:48,7 [50] )
|
||||||
|
|
|
|
||||||
public int ParentValue { get; set; } = 42;
|
public int ParentValue { get; set; } = 42;
|
||||||
|
|
|
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@ namespace Test
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Microsoft.AspNetCore.Components;
|
using Microsoft.AspNetCore.Components;
|
||||||
public class TestComponent : Microsoft.AspNetCore.Components.ComponentBase
|
public partial class TestComponent : Microsoft.AspNetCore.Components.ComponentBase
|
||||||
{
|
{
|
||||||
#pragma warning disable 219
|
#pragma warning disable 219
|
||||||
private void __RazorDirectiveTokenHelpers__() {
|
private void __RazorDirectiveTokenHelpers__() {
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@ Document -
|
||||||
UsingDirective - (53:3,1 [17] ) - System.Linq
|
UsingDirective - (53:3,1 [17] ) - System.Linq
|
||||||
UsingDirective - (73:4,1 [28] ) - System.Threading.Tasks
|
UsingDirective - (73:4,1 [28] ) - System.Threading.Tasks
|
||||||
UsingDirective - (104:5,1 [37] ) - Microsoft.AspNetCore.Components
|
UsingDirective - (104:5,1 [37] ) - Microsoft.AspNetCore.Components
|
||||||
ClassDeclaration - - public - TestComponent - Microsoft.AspNetCore.Components.ComponentBase -
|
ClassDeclaration - - public partial - TestComponent - Microsoft.AspNetCore.Components.ComponentBase -
|
||||||
DesignTimeDirective -
|
DesignTimeDirective -
|
||||||
CSharpCode -
|
CSharpCode -
|
||||||
IntermediateToken - - CSharp - #pragma warning disable 0414
|
IntermediateToken - - CSharp - #pragma warning disable 0414
|
||||||
|
|
@ -15,13 +15,13 @@ Document -
|
||||||
IntermediateToken - - CSharp - #pragma warning restore 0414
|
IntermediateToken - - CSharp - #pragma warning restore 0414
|
||||||
MethodDeclaration - - protected override - void - BuildRenderTree
|
MethodDeclaration - - protected override - void - BuildRenderTree
|
||||||
Component - (0:0,0 [45] x:\dir\subdir\Test\TestComponent.cshtml) - MyComponent
|
Component - (0:0,0 [45] x:\dir\subdir\Test\TestComponent.cshtml) - MyComponent
|
||||||
ComponentAttribute - (30:0,30 [11] x:\dir\subdir\Test\TestComponent.cshtml) - SomeParam - AttributeStructure.DoubleQuotes
|
ComponentAttribute - (30:0,30 [11] x:\dir\subdir\Test\TestComponent.cshtml) - SomeParam - SomeParam - AttributeStructure.DoubleQuotes
|
||||||
CSharpExpression -
|
CSharpExpression -
|
||||||
IntermediateToken - (30:0,30 [11] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - ParentValue
|
IntermediateToken - (30:0,30 [11] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - ParentValue
|
||||||
ComponentAttribute - (30:0,30 [11] x:\dir\subdir\Test\TestComponent.cshtml) - SomeParamChanged - AttributeStructure.DoubleQuotes
|
ComponentAttribute - (30:0,30 [11] x:\dir\subdir\Test\TestComponent.cshtml) - SomeParamChanged - SomeParamChanged - AttributeStructure.DoubleQuotes
|
||||||
CSharpExpression -
|
CSharpExpression -
|
||||||
IntermediateToken - - CSharp - __value => ParentValue = __value
|
IntermediateToken - - CSharp - __value => ParentValue = __value
|
||||||
ComponentAttribute - (30:0,30 [11] x:\dir\subdir\Test\TestComponent.cshtml) - SomeParamExpression - AttributeStructure.DoubleQuotes
|
ComponentAttribute - (30:0,30 [11] x:\dir\subdir\Test\TestComponent.cshtml) - SomeParamExpression - SomeParamExpression - AttributeStructure.DoubleQuotes
|
||||||
CSharpExpression -
|
CSharpExpression -
|
||||||
IntermediateToken - - CSharp - () => ParentValue
|
IntermediateToken - - CSharp - () => ParentValue
|
||||||
HtmlContent - (45:0,45 [2] x:\dir\subdir\Test\TestComponent.cshtml)
|
HtmlContent - (45:0,45 [2] x:\dir\subdir\Test\TestComponent.cshtml)
|
||||||
|
|
|
||||||
|
|
@ -1,13 +1,13 @@
|
||||||
Source Location: (30:0,30 [11] x:\dir\subdir\Test\TestComponent.cshtml)
|
Source Location: (30:0,30 [11] x:\dir\subdir\Test\TestComponent.cshtml)
|
||||||
|ParentValue|
|
|ParentValue|
|
||||||
Generated Location: (969:25,30 [11] )
|
Generated Location: (977:25,30 [11] )
|
||||||
|ParentValue|
|
|ParentValue|
|
||||||
|
|
||||||
Source Location: (54:1,7 [65] x:\dir\subdir\Test\TestComponent.cshtml)
|
Source Location: (54:1,7 [65] x:\dir\subdir\Test\TestComponent.cshtml)
|
||||||
|
|
|
|
||||||
public DateTime ParentValue { get; set; } = DateTime.Now;
|
public DateTime ParentValue { get; set; } = DateTime.Now;
|
||||||
|
|
|
|
||||||
Generated Location: (1399:43,7 [65] )
|
Generated Location: (1407:43,7 [65] )
|
||||||
|
|
|
|
||||||
public DateTime ParentValue { get; set; } = DateTime.Now;
|
public DateTime ParentValue { get; set; } = DateTime.Now;
|
||||||
|
|
|
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@ namespace Test
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Microsoft.AspNetCore.Components;
|
using Microsoft.AspNetCore.Components;
|
||||||
public class TestComponent : Microsoft.AspNetCore.Components.ComponentBase
|
public partial class TestComponent : Microsoft.AspNetCore.Components.ComponentBase
|
||||||
{
|
{
|
||||||
#pragma warning disable 219
|
#pragma warning disable 219
|
||||||
private void __RazorDirectiveTokenHelpers__() {
|
private void __RazorDirectiveTokenHelpers__() {
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@ Document -
|
||||||
UsingDirective - (53:3,1 [17] ) - System.Linq
|
UsingDirective - (53:3,1 [17] ) - System.Linq
|
||||||
UsingDirective - (73:4,1 [28] ) - System.Threading.Tasks
|
UsingDirective - (73:4,1 [28] ) - System.Threading.Tasks
|
||||||
UsingDirective - (104:5,1 [37] ) - Microsoft.AspNetCore.Components
|
UsingDirective - (104:5,1 [37] ) - Microsoft.AspNetCore.Components
|
||||||
ClassDeclaration - - public - TestComponent - Microsoft.AspNetCore.Components.ComponentBase -
|
ClassDeclaration - - public partial - TestComponent - Microsoft.AspNetCore.Components.ComponentBase -
|
||||||
DesignTimeDirective -
|
DesignTimeDirective -
|
||||||
CSharpCode -
|
CSharpCode -
|
||||||
IntermediateToken - - CSharp - #pragma warning disable 0414
|
IntermediateToken - - CSharp - #pragma warning disable 0414
|
||||||
|
|
@ -15,10 +15,10 @@ Document -
|
||||||
IntermediateToken - - CSharp - #pragma warning restore 0414
|
IntermediateToken - - CSharp - #pragma warning restore 0414
|
||||||
MethodDeclaration - - protected override - void - BuildRenderTree
|
MethodDeclaration - - protected override - void - BuildRenderTree
|
||||||
Component - (0:0,0 [41] x:\dir\subdir\Test\TestComponent.cshtml) - MyComponent
|
Component - (0:0,0 [41] x:\dir\subdir\Test\TestComponent.cshtml) - MyComponent
|
||||||
ComponentAttribute - (26:0,26 [11] x:\dir\subdir\Test\TestComponent.cshtml) - Value - AttributeStructure.DoubleQuotes
|
ComponentAttribute - (26:0,26 [11] x:\dir\subdir\Test\TestComponent.cshtml) - Value - Value - AttributeStructure.DoubleQuotes
|
||||||
CSharpExpression -
|
CSharpExpression -
|
||||||
IntermediateToken - (26:0,26 [11] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - ParentValue
|
IntermediateToken - (26:0,26 [11] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - ParentValue
|
||||||
ComponentAttribute - (26:0,26 [11] x:\dir\subdir\Test\TestComponent.cshtml) - ValueChanged - AttributeStructure.DoubleQuotes
|
ComponentAttribute - (26:0,26 [11] x:\dir\subdir\Test\TestComponent.cshtml) - ValueChanged - ValueChanged - AttributeStructure.DoubleQuotes
|
||||||
CSharpExpression -
|
CSharpExpression -
|
||||||
IntermediateToken - - CSharp - __value => ParentValue = __value
|
IntermediateToken - - CSharp - __value => ParentValue = __value
|
||||||
HtmlContent - (41:0,41 [2] x:\dir\subdir\Test\TestComponent.cshtml)
|
HtmlContent - (41:0,41 [2] x:\dir\subdir\Test\TestComponent.cshtml)
|
||||||
|
|
|
||||||
|
|
@ -1,13 +1,13 @@
|
||||||
Source Location: (26:0,26 [11] x:\dir\subdir\Test\TestComponent.cshtml)
|
Source Location: (26:0,26 [11] x:\dir\subdir\Test\TestComponent.cshtml)
|
||||||
|ParentValue|
|
|ParentValue|
|
||||||
Generated Location: (978:25,26 [11] )
|
Generated Location: (986:25,26 [11] )
|
||||||
|ParentValue|
|
|ParentValue|
|
||||||
|
|
||||||
Source Location: (50:1,7 [50] x:\dir\subdir\Test\TestComponent.cshtml)
|
Source Location: (50:1,7 [50] x:\dir\subdir\Test\TestComponent.cshtml)
|
||||||
|
|
|
|
||||||
public int ParentValue { get; set; } = 42;
|
public int ParentValue { get; set; } = 42;
|
||||||
|
|
|
|
||||||
Generated Location: (1586:47,7 [50] )
|
Generated Location: (1594:47,7 [50] )
|
||||||
|
|
|
|
||||||
public int ParentValue { get; set; } = 42;
|
public int ParentValue { get; set; } = 42;
|
||||||
|
|
|
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@ namespace Test
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Microsoft.AspNetCore.Components;
|
using Microsoft.AspNetCore.Components;
|
||||||
public class TestComponent : Microsoft.AspNetCore.Components.ComponentBase
|
public partial class TestComponent : Microsoft.AspNetCore.Components.ComponentBase
|
||||||
{
|
{
|
||||||
#pragma warning disable 219
|
#pragma warning disable 219
|
||||||
private void __RazorDirectiveTokenHelpers__() {
|
private void __RazorDirectiveTokenHelpers__() {
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@ Document -
|
||||||
UsingDirective - (53:3,1 [17] ) - System.Linq
|
UsingDirective - (53:3,1 [17] ) - System.Linq
|
||||||
UsingDirective - (73:4,1 [28] ) - System.Threading.Tasks
|
UsingDirective - (73:4,1 [28] ) - System.Threading.Tasks
|
||||||
UsingDirective - (104:5,1 [37] ) - Microsoft.AspNetCore.Components
|
UsingDirective - (104:5,1 [37] ) - Microsoft.AspNetCore.Components
|
||||||
ClassDeclaration - - public - TestComponent - Microsoft.AspNetCore.Components.ComponentBase -
|
ClassDeclaration - - public partial - TestComponent - Microsoft.AspNetCore.Components.ComponentBase -
|
||||||
DesignTimeDirective -
|
DesignTimeDirective -
|
||||||
CSharpCode -
|
CSharpCode -
|
||||||
IntermediateToken - - CSharp - #pragma warning disable 0414
|
IntermediateToken - - CSharp - #pragma warning disable 0414
|
||||||
|
|
@ -15,10 +15,10 @@ Document -
|
||||||
IntermediateToken - - CSharp - #pragma warning restore 0414
|
IntermediateToken - - CSharp - #pragma warning restore 0414
|
||||||
MethodDeclaration - - protected override - void - BuildRenderTree
|
MethodDeclaration - - protected override - void - BuildRenderTree
|
||||||
Component - (0:0,0 [41] x:\dir\subdir\Test\TestComponent.cshtml) - MyComponent
|
Component - (0:0,0 [41] x:\dir\subdir\Test\TestComponent.cshtml) - MyComponent
|
||||||
ComponentAttribute - (26:0,26 [11] x:\dir\subdir\Test\TestComponent.cshtml) - Value - AttributeStructure.DoubleQuotes
|
ComponentAttribute - (26:0,26 [11] x:\dir\subdir\Test\TestComponent.cshtml) - Value - - AttributeStructure.DoubleQuotes
|
||||||
CSharpExpression -
|
CSharpExpression -
|
||||||
IntermediateToken - (26:0,26 [11] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - ParentValue
|
IntermediateToken - (26:0,26 [11] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - ParentValue
|
||||||
ComponentAttribute - (26:0,26 [11] x:\dir\subdir\Test\TestComponent.cshtml) - ValueChanged - AttributeStructure.DoubleQuotes
|
ComponentAttribute - (26:0,26 [11] x:\dir\subdir\Test\TestComponent.cshtml) - ValueChanged - - AttributeStructure.DoubleQuotes
|
||||||
CSharpExpression -
|
CSharpExpression -
|
||||||
IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.CompilerServices.RuntimeHelpers.CreateInferredEventCallback(this, __value => ParentValue = __value, ParentValue)
|
IntermediateToken - - CSharp - Microsoft.AspNetCore.Components.CompilerServices.RuntimeHelpers.CreateInferredEventCallback(this, __value => ParentValue = __value, ParentValue)
|
||||||
HtmlContent - (41:0,41 [2] x:\dir\subdir\Test\TestComponent.cshtml)
|
HtmlContent - (41:0,41 [2] x:\dir\subdir\Test\TestComponent.cshtml)
|
||||||
|
|
|
||||||
|
|
@ -1,13 +1,13 @@
|
||||||
Source Location: (26:0,26 [11] x:\dir\subdir\Test\TestComponent.cshtml)
|
Source Location: (26:0,26 [11] x:\dir\subdir\Test\TestComponent.cshtml)
|
||||||
|ParentValue|
|
|ParentValue|
|
||||||
Generated Location: (890:25,26 [11] )
|
Generated Location: (898:25,26 [11] )
|
||||||
|ParentValue|
|
|ParentValue|
|
||||||
|
|
||||||
Source Location: (50:1,7 [50] x:\dir\subdir\Test\TestComponent.cshtml)
|
Source Location: (50:1,7 [50] x:\dir\subdir\Test\TestComponent.cshtml)
|
||||||
|
|
|
|
||||||
public int ParentValue { get; set; } = 42;
|
public int ParentValue { get; set; } = 42;
|
||||||
|
|
|
|
||||||
Generated Location: (1562:46,7 [50] )
|
Generated Location: (1570:46,7 [50] )
|
||||||
|
|
|
|
||||||
public int ParentValue { get; set; } = 42;
|
public int ParentValue { get; set; } = 42;
|
||||||
|
|
|
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@ namespace Test
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Microsoft.AspNetCore.Components;
|
using Microsoft.AspNetCore.Components;
|
||||||
public class TestComponent : Microsoft.AspNetCore.Components.ComponentBase
|
public partial class TestComponent : Microsoft.AspNetCore.Components.ComponentBase
|
||||||
{
|
{
|
||||||
#pragma warning disable 219
|
#pragma warning disable 219
|
||||||
private void __RazorDirectiveTokenHelpers__() {
|
private void __RazorDirectiveTokenHelpers__() {
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@ Document -
|
||||||
UsingDirective - (53:3,1 [17] ) - System.Linq
|
UsingDirective - (53:3,1 [17] ) - System.Linq
|
||||||
UsingDirective - (73:4,1 [28] ) - System.Threading.Tasks
|
UsingDirective - (73:4,1 [28] ) - System.Threading.Tasks
|
||||||
UsingDirective - (104:5,1 [37] ) - Microsoft.AspNetCore.Components
|
UsingDirective - (104:5,1 [37] ) - Microsoft.AspNetCore.Components
|
||||||
ClassDeclaration - - public - TestComponent - Microsoft.AspNetCore.Components.ComponentBase -
|
ClassDeclaration - - public partial - TestComponent - Microsoft.AspNetCore.Components.ComponentBase -
|
||||||
DesignTimeDirective -
|
DesignTimeDirective -
|
||||||
CSharpCode -
|
CSharpCode -
|
||||||
IntermediateToken - - CSharp - #pragma warning disable 0414
|
IntermediateToken - - CSharp - #pragma warning disable 0414
|
||||||
|
|
@ -15,10 +15,10 @@ Document -
|
||||||
IntermediateToken - - CSharp - #pragma warning restore 0414
|
IntermediateToken - - CSharp - #pragma warning restore 0414
|
||||||
MethodDeclaration - - protected override - void - BuildRenderTree
|
MethodDeclaration - - protected override - void - BuildRenderTree
|
||||||
Component - (0:0,0 [41] x:\dir\subdir\Test\TestComponent.cshtml) - MyComponent
|
Component - (0:0,0 [41] x:\dir\subdir\Test\TestComponent.cshtml) - MyComponent
|
||||||
ComponentAttribute - (26:0,26 [11] x:\dir\subdir\Test\TestComponent.cshtml) - Value - AttributeStructure.DoubleQuotes
|
ComponentAttribute - (26:0,26 [11] x:\dir\subdir\Test\TestComponent.cshtml) - Value - Value - AttributeStructure.DoubleQuotes
|
||||||
CSharpExpression -
|
CSharpExpression -
|
||||||
IntermediateToken - (26:0,26 [11] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - ParentValue
|
IntermediateToken - (26:0,26 [11] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - ParentValue
|
||||||
ComponentAttribute - (26:0,26 [11] x:\dir\subdir\Test\TestComponent.cshtml) - ValueChanged - AttributeStructure.DoubleQuotes
|
ComponentAttribute - (26:0,26 [11] x:\dir\subdir\Test\TestComponent.cshtml) - ValueChanged - ValueChanged - AttributeStructure.DoubleQuotes
|
||||||
CSharpExpression -
|
CSharpExpression -
|
||||||
IntermediateToken - - CSharp - __value => ParentValue = __value
|
IntermediateToken - - CSharp - __value => ParentValue = __value
|
||||||
HtmlContent - (41:0,41 [2] x:\dir\subdir\Test\TestComponent.cshtml)
|
HtmlContent - (41:0,41 [2] x:\dir\subdir\Test\TestComponent.cshtml)
|
||||||
|
|
|
||||||
|
|
@ -1,13 +1,13 @@
|
||||||
Source Location: (26:0,26 [11] x:\dir\subdir\Test\TestComponent.cshtml)
|
Source Location: (26:0,26 [11] x:\dir\subdir\Test\TestComponent.cshtml)
|
||||||
|ParentValue|
|
|ParentValue|
|
||||||
Generated Location: (978:25,26 [11] )
|
Generated Location: (986:25,26 [11] )
|
||||||
|ParentValue|
|
|ParentValue|
|
||||||
|
|
||||||
Source Location: (50:1,7 [55] x:\dir\subdir\Test\TestComponent.cshtml)
|
Source Location: (50:1,7 [55] x:\dir\subdir\Test\TestComponent.cshtml)
|
||||||
|
|
|
|
||||||
public string ParentValue { get; set; } = "42";
|
public string ParentValue { get; set; } = "42";
|
||||||
|
|
|
|
||||||
Generated Location: (1586:47,7 [55] )
|
Generated Location: (1594:47,7 [55] )
|
||||||
|
|
|
|
||||||
public string ParentValue { get; set; } = "42";
|
public string ParentValue { get; set; } = "42";
|
||||||
|
|
|
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@ namespace Test
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Microsoft.AspNetCore.Components;
|
using Microsoft.AspNetCore.Components;
|
||||||
public class TestComponent : Microsoft.AspNetCore.Components.ComponentBase
|
public partial class TestComponent : Microsoft.AspNetCore.Components.ComponentBase
|
||||||
{
|
{
|
||||||
#pragma warning disable 219
|
#pragma warning disable 219
|
||||||
private void __RazorDirectiveTokenHelpers__() {
|
private void __RazorDirectiveTokenHelpers__() {
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@ Document -
|
||||||
UsingDirective - (53:3,1 [17] ) - System.Linq
|
UsingDirective - (53:3,1 [17] ) - System.Linq
|
||||||
UsingDirective - (73:4,1 [28] ) - System.Threading.Tasks
|
UsingDirective - (73:4,1 [28] ) - System.Threading.Tasks
|
||||||
UsingDirective - (104:5,1 [37] ) - Microsoft.AspNetCore.Components
|
UsingDirective - (104:5,1 [37] ) - Microsoft.AspNetCore.Components
|
||||||
ClassDeclaration - - public - TestComponent - Microsoft.AspNetCore.Components.ComponentBase -
|
ClassDeclaration - - public partial - TestComponent - Microsoft.AspNetCore.Components.ComponentBase -
|
||||||
DesignTimeDirective -
|
DesignTimeDirective -
|
||||||
CSharpCode -
|
CSharpCode -
|
||||||
IntermediateToken - - CSharp - #pragma warning disable 0414
|
IntermediateToken - - CSharp - #pragma warning disable 0414
|
||||||
|
|
@ -15,13 +15,13 @@ Document -
|
||||||
IntermediateToken - - CSharp - #pragma warning restore 0414
|
IntermediateToken - - CSharp - #pragma warning restore 0414
|
||||||
MethodDeclaration - - protected override - void - BuildRenderTree
|
MethodDeclaration - - protected override - void - BuildRenderTree
|
||||||
Component - (0:0,0 [39] x:\dir\subdir\Test\TestComponent.cshtml) - InputText
|
Component - (0:0,0 [39] x:\dir\subdir\Test\TestComponent.cshtml) - InputText
|
||||||
ComponentAttribute - (24:0,24 [11] x:\dir\subdir\Test\TestComponent.cshtml) - Value - AttributeStructure.DoubleQuotes
|
ComponentAttribute - (24:0,24 [11] x:\dir\subdir\Test\TestComponent.cshtml) - Value - Value - AttributeStructure.DoubleQuotes
|
||||||
CSharpExpression -
|
CSharpExpression -
|
||||||
IntermediateToken - (24:0,24 [11] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - person.Name
|
IntermediateToken - (24:0,24 [11] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - person.Name
|
||||||
ComponentAttribute - (24:0,24 [11] x:\dir\subdir\Test\TestComponent.cshtml) - ValueChanged - AttributeStructure.DoubleQuotes
|
ComponentAttribute - (24:0,24 [11] x:\dir\subdir\Test\TestComponent.cshtml) - ValueChanged - ValueChanged - AttributeStructure.DoubleQuotes
|
||||||
CSharpExpression -
|
CSharpExpression -
|
||||||
IntermediateToken - - CSharp - __value => person.Name = __value
|
IntermediateToken - - CSharp - __value => person.Name = __value
|
||||||
HtmlContent - (39:0,39 [4] x:\dir\subdir\Test\TestComponent.cshtml)
|
HtmlContent - (39:0,39 [4] x:\dir\subdir\Test\TestComponent.cshtml)
|
||||||
IntermediateToken - (39:0,39 [4] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n\n
|
IntermediateToken - (39:0,39 [4] x:\dir\subdir\Test\TestComponent.cshtml) - Html - \n\n
|
||||||
CSharpCode - (57:3,1 [37] x:\dir\subdir\Test\TestComponent.cshtml)
|
CSharpCode - (56:3,1 [37] x:\dir\subdir\Test\TestComponent.cshtml)
|
||||||
IntermediateToken - (57:3,1 [37] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n Person person = new Person();\n
|
IntermediateToken - (56:3,1 [37] x:\dir\subdir\Test\TestComponent.cshtml) - CSharp - \n Person person = new Person();\n
|
||||||
|
|
|
||||||
|
|
@ -1,13 +1,13 @@
|
||||||
Source Location: (24:0,24 [11] x:\dir\subdir\Test\TestComponent.cshtml)
|
Source Location: (24:0,24 [11] x:\dir\subdir\Test\TestComponent.cshtml)
|
||||||
|person.Name|
|
|person.Name|
|
||||||
Generated Location: (977:25,24 [11] )
|
Generated Location: (985:25,24 [11] )
|
||||||
|person.Name|
|
|person.Name|
|
||||||
|
|
||||||
Source Location: (57:3,1 [37] x:\dir\subdir\Test\TestComponent.cshtml)
|
Source Location: (56:3,1 [37] x:\dir\subdir\Test\TestComponent.cshtml)
|
||||||
|
|
|
|
||||||
Person person = new Person();
|
Person person = new Person();
|
||||||
|
|
|
|
||||||
Generated Location: (1578:47,1 [37] )
|
Generated Location: (1586:47,1 [37] )
|
||||||
|
|
|
|
||||||
Person person = new Person();
|
Person person = new Person();
|
||||||
|
|
|
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,7 @@ using System.Globalization;
|
||||||
#line default
|
#line default
|
||||||
#line hidden
|
#line hidden
|
||||||
#nullable disable
|
#nullable disable
|
||||||
public class TestComponent : Microsoft.AspNetCore.Components.ComponentBase
|
public partial class TestComponent : Microsoft.AspNetCore.Components.ComponentBase
|
||||||
{
|
{
|
||||||
#pragma warning disable 219
|
#pragma warning disable 219
|
||||||
private void __RazorDirectiveTokenHelpers__() {
|
private void __RazorDirectiveTokenHelpers__() {
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@ Document -
|
||||||
UsingDirective - (73:4,1 [28] ) - System.Threading.Tasks
|
UsingDirective - (73:4,1 [28] ) - System.Threading.Tasks
|
||||||
UsingDirective - (104:5,1 [37] ) - Microsoft.AspNetCore.Components
|
UsingDirective - (104:5,1 [37] ) - Microsoft.AspNetCore.Components
|
||||||
UsingDirective - (1:0,1 [26] x:\dir\subdir\Test\TestComponent.cshtml) - System.Globalization
|
UsingDirective - (1:0,1 [26] x:\dir\subdir\Test\TestComponent.cshtml) - System.Globalization
|
||||||
ClassDeclaration - - public - TestComponent - Microsoft.AspNetCore.Components.ComponentBase -
|
ClassDeclaration - - public partial - TestComponent - Microsoft.AspNetCore.Components.ComponentBase -
|
||||||
DesignTimeDirective -
|
DesignTimeDirective -
|
||||||
CSharpCode -
|
CSharpCode -
|
||||||
IntermediateToken - - CSharp - #pragma warning disable 0414
|
IntermediateToken - - CSharp - #pragma warning disable 0414
|
||||||
|
|
|
||||||
|
|
@ -5,19 +5,19 @@ Generated Location: (320:12,0 [26] )
|
||||||
|
|
||||||
Source Location: (48:1,19 [11] x:\dir\subdir\Test\TestComponent.cshtml)
|
Source Location: (48:1,19 [11] x:\dir\subdir\Test\TestComponent.cshtml)
|
||||||
|ParentValue|
|
|ParentValue|
|
||||||
Generated Location: (1090:32,19 [11] )
|
Generated Location: (1098:32,19 [11] )
|
||||||
|ParentValue|
|
|ParentValue|
|
||||||
|
|
||||||
Source Location: (111:1,82 [28] x:\dir\subdir\Test\TestComponent.cshtml)
|
Source Location: (111:1,82 [28] x:\dir\subdir\Test\TestComponent.cshtml)
|
||||||
|CultureInfo.InvariantCulture|
|
|CultureInfo.InvariantCulture|
|
||||||
Generated Location: (1330:40,82 [28] )
|
Generated Location: (1338:40,82 [28] )
|
||||||
|CultureInfo.InvariantCulture|
|
|CultureInfo.InvariantCulture|
|
||||||
|
|
||||||
Source Location: (152:2,7 [55] x:\dir\subdir\Test\TestComponent.cshtml)
|
Source Location: (152:2,7 [55] x:\dir\subdir\Test\TestComponent.cshtml)
|
||||||
|
|
|
|
||||||
public string ParentValue { get; set; } = "hi";
|
public string ParentValue { get; set; } = "hi";
|
||||||
|
|
|
|
||||||
Generated Location: (1731:51,7 [55] )
|
Generated Location: (1739:51,7 [55] )
|
||||||
|
|
|
|
||||||
public string ParentValue { get; set; } = "hi";
|
public string ParentValue { get; set; } = "hi";
|
||||||
|
|
|
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@ namespace Test
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Microsoft.AspNetCore.Components;
|
using Microsoft.AspNetCore.Components;
|
||||||
public class TestComponent : Microsoft.AspNetCore.Components.ComponentBase
|
public partial class TestComponent : Microsoft.AspNetCore.Components.ComponentBase
|
||||||
{
|
{
|
||||||
#pragma warning disable 219
|
#pragma warning disable 219
|
||||||
private void __RazorDirectiveTokenHelpers__() {
|
private void __RazorDirectiveTokenHelpers__() {
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@ Document -
|
||||||
UsingDirective - (53:3,1 [17] ) - System.Linq
|
UsingDirective - (53:3,1 [17] ) - System.Linq
|
||||||
UsingDirective - (73:4,1 [28] ) - System.Threading.Tasks
|
UsingDirective - (73:4,1 [28] ) - System.Threading.Tasks
|
||||||
UsingDirective - (104:5,1 [37] ) - Microsoft.AspNetCore.Components
|
UsingDirective - (104:5,1 [37] ) - Microsoft.AspNetCore.Components
|
||||||
ClassDeclaration - - public - TestComponent - Microsoft.AspNetCore.Components.ComponentBase -
|
ClassDeclaration - - public partial - TestComponent - Microsoft.AspNetCore.Components.ComponentBase -
|
||||||
DesignTimeDirective -
|
DesignTimeDirective -
|
||||||
CSharpCode -
|
CSharpCode -
|
||||||
IntermediateToken - - CSharp - #pragma warning disable 0414
|
IntermediateToken - - CSharp - #pragma warning disable 0414
|
||||||
|
|
|
||||||
|
|
@ -1,13 +1,13 @@
|
||||||
Source Location: (33:0,33 [11] x:\dir\subdir\Test\TestComponent.cshtml)
|
Source Location: (33:0,33 [11] x:\dir\subdir\Test\TestComponent.cshtml)
|
||||||
|CurrentDate|
|
|CurrentDate|
|
||||||
Generated Location: (955:25,33 [11] )
|
Generated Location: (963:25,33 [11] )
|
||||||
|CurrentDate|
|
|CurrentDate|
|
||||||
|
|
||||||
Source Location: (113:1,7 [77] x:\dir\subdir\Test\TestComponent.cshtml)
|
Source Location: (113:1,7 [77] x:\dir\subdir\Test\TestComponent.cshtml)
|
||||||
|
|
|
|
||||||
public DateTime CurrentDate { get; set; } = new DateTime(2018, 1, 1);
|
public DateTime CurrentDate { get; set; } = new DateTime(2018, 1, 1);
|
||||||
|
|
|
|
||||||
Generated Location: (1334:36,7 [77] )
|
Generated Location: (1342:36,7 [77] )
|
||||||
|
|
|
|
||||||
public DateTime CurrentDate { get; set; } = new DateTime(2018, 1, 1);
|
public DateTime CurrentDate { get; set; } = new DateTime(2018, 1, 1);
|
||||||
|
|
|
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@ namespace Test
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Microsoft.AspNetCore.Components;
|
using Microsoft.AspNetCore.Components;
|
||||||
public class TestComponent : Microsoft.AspNetCore.Components.ComponentBase
|
public partial class TestComponent : Microsoft.AspNetCore.Components.ComponentBase
|
||||||
{
|
{
|
||||||
#pragma warning disable 219
|
#pragma warning disable 219
|
||||||
private void __RazorDirectiveTokenHelpers__() {
|
private void __RazorDirectiveTokenHelpers__() {
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@ Document -
|
||||||
UsingDirective - (53:3,1 [17] ) - System.Linq
|
UsingDirective - (53:3,1 [17] ) - System.Linq
|
||||||
UsingDirective - (73:4,1 [28] ) - System.Threading.Tasks
|
UsingDirective - (73:4,1 [28] ) - System.Threading.Tasks
|
||||||
UsingDirective - (104:5,1 [37] ) - Microsoft.AspNetCore.Components
|
UsingDirective - (104:5,1 [37] ) - Microsoft.AspNetCore.Components
|
||||||
ClassDeclaration - - public - TestComponent - Microsoft.AspNetCore.Components.ComponentBase -
|
ClassDeclaration - - public partial - TestComponent - Microsoft.AspNetCore.Components.ComponentBase -
|
||||||
DesignTimeDirective -
|
DesignTimeDirective -
|
||||||
CSharpCode -
|
CSharpCode -
|
||||||
IntermediateToken - - CSharp - #pragma warning disable 0414
|
IntermediateToken - - CSharp - #pragma warning disable 0414
|
||||||
|
|
|
||||||
|
|
@ -1,13 +1,13 @@
|
||||||
Source Location: (33:0,33 [11] x:\dir\subdir\Test\TestComponent.cshtml)
|
Source Location: (33:0,33 [11] x:\dir\subdir\Test\TestComponent.cshtml)
|
||||||
|ParentValue|
|
|ParentValue|
|
||||||
Generated Location: (955:25,33 [11] )
|
Generated Location: (963:25,33 [11] )
|
||||||
|ParentValue|
|
|ParentValue|
|
||||||
|
|
||||||
Source Location: (86:1,7 [50] x:\dir\subdir\Test\TestComponent.cshtml)
|
Source Location: (86:1,7 [50] x:\dir\subdir\Test\TestComponent.cshtml)
|
||||||
|
|
|
|
||||||
public int ParentValue { get; set; } = 42;
|
public int ParentValue { get; set; } = 42;
|
||||||
|
|
|
|
||||||
Generated Location: (1300:36,7 [50] )
|
Generated Location: (1308:36,7 [50] )
|
||||||
|
|
|
|
||||||
public int ParentValue { get; set; } = 42;
|
public int ParentValue { get; set; } = 42;
|
||||||
|
|
|
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,7 @@ using System.Globalization;
|
||||||
#line default
|
#line default
|
||||||
#line hidden
|
#line hidden
|
||||||
#nullable disable
|
#nullable disable
|
||||||
public class TestComponent : Microsoft.AspNetCore.Components.ComponentBase
|
public partial class TestComponent : Microsoft.AspNetCore.Components.ComponentBase
|
||||||
{
|
{
|
||||||
#pragma warning disable 219
|
#pragma warning disable 219
|
||||||
private void __RazorDirectiveTokenHelpers__() {
|
private void __RazorDirectiveTokenHelpers__() {
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@ Document -
|
||||||
UsingDirective - (73:4,1 [28] ) - System.Threading.Tasks
|
UsingDirective - (73:4,1 [28] ) - System.Threading.Tasks
|
||||||
UsingDirective - (104:5,1 [37] ) - Microsoft.AspNetCore.Components
|
UsingDirective - (104:5,1 [37] ) - Microsoft.AspNetCore.Components
|
||||||
UsingDirective - (1:0,1 [26] x:\dir\subdir\Test\TestComponent.cshtml) - System.Globalization
|
UsingDirective - (1:0,1 [26] x:\dir\subdir\Test\TestComponent.cshtml) - System.Globalization
|
||||||
ClassDeclaration - - public - TestComponent - Microsoft.AspNetCore.Components.ComponentBase -
|
ClassDeclaration - - public partial - TestComponent - Microsoft.AspNetCore.Components.ComponentBase -
|
||||||
DesignTimeDirective -
|
DesignTimeDirective -
|
||||||
CSharpCode -
|
CSharpCode -
|
||||||
IntermediateToken - - CSharp - #pragma warning disable 0414
|
IntermediateToken - - CSharp - #pragma warning disable 0414
|
||||||
|
|
|
||||||
|
|
@ -5,19 +5,19 @@ Generated Location: (320:12,0 [26] )
|
||||||
|
|
||||||
Source Location: (48:1,19 [11] x:\dir\subdir\Test\TestComponent.cshtml)
|
Source Location: (48:1,19 [11] x:\dir\subdir\Test\TestComponent.cshtml)
|
||||||
|ParentValue|
|
|ParentValue|
|
||||||
Generated Location: (1090:32,19 [11] )
|
Generated Location: (1098:32,19 [11] )
|
||||||
|ParentValue|
|
|ParentValue|
|
||||||
|
|
||||||
Source Location: (115:1,86 [28] x:\dir\subdir\Test\TestComponent.cshtml)
|
Source Location: (115:1,86 [28] x:\dir\subdir\Test\TestComponent.cshtml)
|
||||||
|CultureInfo.InvariantCulture|
|
|CultureInfo.InvariantCulture|
|
||||||
Generated Location: (1334:40,86 [28] )
|
Generated Location: (1342:40,86 [28] )
|
||||||
|CultureInfo.InvariantCulture|
|
|CultureInfo.InvariantCulture|
|
||||||
|
|
||||||
Source Location: (156:2,7 [55] x:\dir\subdir\Test\TestComponent.cshtml)
|
Source Location: (156:2,7 [55] x:\dir\subdir\Test\TestComponent.cshtml)
|
||||||
|
|
|
|
||||||
public string ParentValue { get; set; } = "hi";
|
public string ParentValue { get; set; } = "hi";
|
||||||
|
|
|
|
||||||
Generated Location: (1735:51,7 [55] )
|
Generated Location: (1743:51,7 [55] )
|
||||||
|
|
|
|
||||||
public string ParentValue { get; set; } = "hi";
|
public string ParentValue { get; set; } = "hi";
|
||||||
|
|
|
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@ namespace Test
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Microsoft.AspNetCore.Components;
|
using Microsoft.AspNetCore.Components;
|
||||||
public class TestComponent : Microsoft.AspNetCore.Components.ComponentBase
|
public partial class TestComponent : Microsoft.AspNetCore.Components.ComponentBase
|
||||||
{
|
{
|
||||||
#pragma warning disable 219
|
#pragma warning disable 219
|
||||||
private void __RazorDirectiveTokenHelpers__() {
|
private void __RazorDirectiveTokenHelpers__() {
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@ Document -
|
||||||
UsingDirective - (53:3,1 [17] ) - System.Linq
|
UsingDirective - (53:3,1 [17] ) - System.Linq
|
||||||
UsingDirective - (73:4,1 [28] ) - System.Threading.Tasks
|
UsingDirective - (73:4,1 [28] ) - System.Threading.Tasks
|
||||||
UsingDirective - (104:5,1 [37] ) - Microsoft.AspNetCore.Components
|
UsingDirective - (104:5,1 [37] ) - Microsoft.AspNetCore.Components
|
||||||
ClassDeclaration - - public - TestComponent - Microsoft.AspNetCore.Components.ComponentBase -
|
ClassDeclaration - - public partial - TestComponent - Microsoft.AspNetCore.Components.ComponentBase -
|
||||||
DesignTimeDirective -
|
DesignTimeDirective -
|
||||||
CSharpCode -
|
CSharpCode -
|
||||||
IntermediateToken - - CSharp - #pragma warning disable 0414
|
IntermediateToken - - CSharp - #pragma warning disable 0414
|
||||||
|
|
|
||||||
|
|
@ -1,13 +1,13 @@
|
||||||
Source Location: (19:0,19 [11] x:\dir\subdir\Test\TestComponent.cshtml)
|
Source Location: (19:0,19 [11] x:\dir\subdir\Test\TestComponent.cshtml)
|
||||||
|ParentValue|
|
|ParentValue|
|
||||||
Generated Location: (941:25,19 [11] )
|
Generated Location: (949:25,19 [11] )
|
||||||
|ParentValue|
|
|ParentValue|
|
||||||
|
|
||||||
Source Location: (76:1,7 [55] x:\dir\subdir\Test\TestComponent.cshtml)
|
Source Location: (76:1,7 [55] x:\dir\subdir\Test\TestComponent.cshtml)
|
||||||
|
|
|
|
||||||
public string ParentValue { get; set; } = "hi";
|
public string ParentValue { get; set; } = "hi";
|
||||||
|
|
|
|
||||||
Generated Location: (1286:36,7 [55] )
|
Generated Location: (1294:36,7 [55] )
|
||||||
|
|
|
|
||||||
public string ParentValue { get; set; } = "hi";
|
public string ParentValue { get; set; } = "hi";
|
||||||
|
|
|
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@ namespace Test
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Microsoft.AspNetCore.Components;
|
using Microsoft.AspNetCore.Components;
|
||||||
public class TestComponent : Microsoft.AspNetCore.Components.ComponentBase
|
public partial class TestComponent : Microsoft.AspNetCore.Components.ComponentBase
|
||||||
{
|
{
|
||||||
#pragma warning disable 219
|
#pragma warning disable 219
|
||||||
private void __RazorDirectiveTokenHelpers__() {
|
private void __RazorDirectiveTokenHelpers__() {
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@ Document -
|
||||||
UsingDirective - (53:3,1 [17] ) - System.Linq
|
UsingDirective - (53:3,1 [17] ) - System.Linq
|
||||||
UsingDirective - (73:4,1 [28] ) - System.Threading.Tasks
|
UsingDirective - (73:4,1 [28] ) - System.Threading.Tasks
|
||||||
UsingDirective - (104:5,1 [37] ) - Microsoft.AspNetCore.Components
|
UsingDirective - (104:5,1 [37] ) - Microsoft.AspNetCore.Components
|
||||||
ClassDeclaration - - public - TestComponent - Microsoft.AspNetCore.Components.ComponentBase -
|
ClassDeclaration - - public partial - TestComponent - Microsoft.AspNetCore.Components.ComponentBase -
|
||||||
DesignTimeDirective -
|
DesignTimeDirective -
|
||||||
CSharpCode -
|
CSharpCode -
|
||||||
IntermediateToken - - CSharp - #pragma warning disable 0414
|
IntermediateToken - - CSharp - #pragma warning disable 0414
|
||||||
|
|
|
||||||
|
|
@ -1,13 +1,13 @@
|
||||||
Source Location: (19:0,19 [11] x:\dir\subdir\Test\TestComponent.cshtml)
|
Source Location: (19:0,19 [11] x:\dir\subdir\Test\TestComponent.cshtml)
|
||||||
|ParentValue|
|
|ParentValue|
|
||||||
Generated Location: (941:25,19 [11] )
|
Generated Location: (949:25,19 [11] )
|
||||||
|ParentValue|
|
|ParentValue|
|
||||||
|
|
||||||
Source Location: (43:1,7 [55] x:\dir\subdir\Test\TestComponent.cshtml)
|
Source Location: (43:1,7 [55] x:\dir\subdir\Test\TestComponent.cshtml)
|
||||||
|
|
|
|
||||||
public string ParentValue { get; set; } = "hi";
|
public string ParentValue { get; set; } = "hi";
|
||||||
|
|
|
|
||||||
Generated Location: (1286:36,7 [55] )
|
Generated Location: (1294:36,7 [55] )
|
||||||
|
|
|
|
||||||
public string ParentValue { get; set; } = "hi";
|
public string ParentValue { get; set; } = "hi";
|
||||||
|
|
|
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,59 @@
|
||||||
|
// <auto-generated/>
|
||||||
|
#pragma warning disable 1591
|
||||||
|
namespace Test
|
||||||
|
{
|
||||||
|
#line hidden
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using Microsoft.AspNetCore.Components;
|
||||||
|
public partial class TestComponent : Microsoft.AspNetCore.Components.ComponentBase
|
||||||
|
{
|
||||||
|
#pragma warning disable 219
|
||||||
|
private void __RazorDirectiveTokenHelpers__() {
|
||||||
|
}
|
||||||
|
#pragma warning restore 219
|
||||||
|
#pragma warning disable 0414
|
||||||
|
private static System.Object __o = null;
|
||||||
|
#pragma warning restore 0414
|
||||||
|
#pragma warning disable 1998
|
||||||
|
protected override void BuildRenderTree(Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder __builder)
|
||||||
|
{
|
||||||
|
#nullable restore
|
||||||
|
#line 1 "x:\dir\subdir\Test\TestComponent.cshtml"
|
||||||
|
var x = "anotherevent";
|
||||||
|
|
||||||
|
#line default
|
||||||
|
#line hidden
|
||||||
|
#nullable disable
|
||||||
|
__o = Microsoft.AspNetCore.Components.BindConverter.FormatValue(
|
||||||
|
#nullable restore
|
||||||
|
#line 2 "x:\dir\subdir\Test\TestComponent.cshtml"
|
||||||
|
ParentValue
|
||||||
|
|
||||||
|
#line default
|
||||||
|
#line hidden
|
||||||
|
#nullable disable
|
||||||
|
);
|
||||||
|
#nullable restore
|
||||||
|
#line 2 "x:\dir\subdir\Test\TestComponent.cshtml"
|
||||||
|
__o = (string)x.ToString();
|
||||||
|
|
||||||
|
#line default
|
||||||
|
#line hidden
|
||||||
|
#nullable disable
|
||||||
|
__o = Microsoft.AspNetCore.Components.EventCallback.Factory.CreateBinder(this, __value => ParentValue = __value, ParentValue);
|
||||||
|
}
|
||||||
|
#pragma warning restore 1998
|
||||||
|
#nullable restore
|
||||||
|
#line 3 "x:\dir\subdir\Test\TestComponent.cshtml"
|
||||||
|
|
||||||
|
public string ParentValue { get; set; } = "hi";
|
||||||
|
|
||||||
|
#line default
|
||||||
|
#line hidden
|
||||||
|
#nullable disable
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#pragma warning restore 1591
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue