parent
5badd94182
commit
7f126d5694
|
|
@ -163,7 +163,7 @@
|
|||
<value>Sets the '{0}' attribute to the provided string or delegate value. A delegate value should be of type '{1}'.</value>
|
||||
</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>
|
||||
<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>
|
||||
|
|
|
|||
|
|
@ -149,7 +149,7 @@ namespace Microsoft.AspNetCore.Razor.Language.Components
|
|||
public static readonly RazorDiagnosticDescriptor EventHandler_Duplicates =
|
||||
new RazorDiagnosticDescriptor(
|
||||
$"{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);
|
||||
|
||||
public static RazorDiagnostic CreateEventHandler_Duplicates(SourceSpan? source, string attribute, TagHelperDirectiveAttributeIntermediateNode[] attributes)
|
||||
|
|
|
|||
|
|
@ -32,13 +32,14 @@ namespace Microsoft.AspNetCore.Razor.Language.Components
|
|||
// Each usage will be represented by a tag helper property that is a descendant of either
|
||||
// a component or element.
|
||||
var references = documentNode.FindDescendantReferences<TagHelperDirectiveAttributeIntermediateNode>();
|
||||
var parameterReferences = documentNode.FindDescendantReferences<TagHelperDirectiveAttributeParameterIntermediateNode>();
|
||||
|
||||
var parents = new HashSet<IntermediateNode>();
|
||||
for (var i = 0; i < references.Count; i++)
|
||||
{
|
||||
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);
|
||||
|
|
|
|||
Loading…
Reference in New Issue