129 references to GetContent
Microsoft.AspNetCore.Razor.Language.UnitTests (2)
HtmlNodeOptimizationPassTest.cs (1)
43
Assert.True(whitespace.
GetContent
().All(char.IsWhiteSpace));
RazorSyntaxTreeTest.cs (1)
60
Assert.Single(root.DescendantNodes().OfType<RazorDirectiveBodySyntax>(), body => body.Keyword.
GetContent
() == "tagHelperPrefix");
Microsoft.CodeAnalysis.Razor.Compiler (84)
Language\DefaultRazorIntermediateNodeLoweringPhase.cs (41)
397
Content = node.
GetContent
(),
701
Prefix = node.Prefix?.
GetContent
() ?? string.Empty,
716
Prefix = node.Prefix?.
GetContent
() ?? string.Empty,
724
Prefix = node.Prefix?.
GetContent
() ?? string.Empty,
740
Prefix = node.Prefix?.
GetContent
() ?? string.Empty,
746
contentFactory: static node => node.Value?.
GetContent
() ?? string.Empty,
755
Prefix = node.Prefix?.
GetContent
() ?? string.Empty,
761
contentFactory: static node => node.Value?.
GetContent
() ?? string.Empty,
793
contentFactory: static node => node.
GetContent
(),
895
contentFactory: static item => item.
GetContent
(),
988
attributeBlock.Name.
GetContent
(),
989
attributeBlock.Value?.
GetContent
() ?? string.Empty));
994
minimizedAttr.Name.
GetContent
(), string.Empty));
1074
isSelfClosing = lastToken.Parent?.
GetContent
().EndsWith("/>", StringComparison.Ordinal) ?? false;
1164
var name = node.Name.
GetContent
();
1180
ValueContent = node.Value?.
GetContent
(),
1215
Prefix = prefix.
GetContent
(),
1216
Suffix = node.ValueSuffix?.
GetContent
() ?? string.Empty,
1278
Prefix = prefix.
GetContent
(),
1279
Suffix = node.ValueSuffix?.
GetContent
() ?? string.Empty,
1293
Prefix = prefix.
GetContent
(),
1294
Suffix = node.ValueSuffix?.
GetContent
() ?? string.Empty,
1363
contentFactory: static node => node.
GetContent
() ?? string.Empty,
1402
contentFactory: static node => node.
GetContent
(),
1407
AttributeName = node.Name.
GetContent
(),
1419
var name = node.Name.
GetContent
();
1498
contentFactory: static node => node.
GetContent
(),
1600
contentFactory: static node => node.
GetContent
(),
1721
var name = node.Name.
GetContent
();
1734
ValueContent = node.Value?.
GetContent
(),
1750
node.ValuePrefix?.LiteralTokens)).
GetContent
(),
1751
Suffix = node.ValueSuffix?.
GetContent
() ?? string.Empty,
1793
Prefix = prefix.
GetContent
(),
1794
Suffix = node.ValueSuffix?.
GetContent
() ?? string.Empty,
1831
contentFactory: static node => node.
GetContent
() ?? string.Empty,
1863
var name = node.Name.
GetContent
();
1868
Prefix = prefix.
GetContent
(),
1915
contentFactory: static node => node.
GetContent
() ?? string.Empty,
1963
contentFactory: static node => node.
GetContent
(),
2065
contentFactory: static node => node.
GetContent
(),
2171
contentFactory: static node => node.
GetContent
(),
Language\Legacy\CodeBlockEditHandler.cs (1)
84
if (target.
GetContent
().IndexOfAny(['{', '}', '@', '<', '*',], relativePosition, change.Span.Length) >= 0)
Language\Legacy\ImplicitExpressionEditHandler.cs (8)
90
lastChar = target.
GetContent
()[changeRelativePosition - 1];
136
target.
GetContent
().Last() == '.' &&
149
!string.IsNullOrEmpty(target.
GetContent
()) &&
150
target.
GetContent
().Last() == '.' &&
244
var deletionContent = target.
GetContent
().AsSpan(relativePosition, changeLength);
440
return string.IsNullOrWhiteSpace(target.
GetContent
().Substring(offset));
446
if (!AcceptTrailingDot && target.
GetContent
().LastOrDefault() == '.')
488
if (target.
GetContent
()[changeRelativePosition] == ')')
Language\Legacy\SpanEditHandler.cs (1)
114
var endOfFirstLine = target.
GetContent
().IndexOfAny(new char[] { (char)0x000d, (char)0x000a, (char)0x2028, (char)0x2029 });
Language\Legacy\TagHelperBlockRewriter.cs (10)
25
if (childSpan?.
GetContent
().EndsWith("/>", StringComparison.Ordinal) ?? false)
123
var literalContent = contentChild.
GetContent
();
147
var content = textLiteral.
GetContent
();
231
var result = CreateTryParseResult(attributeBlock.Name.
GetContent
(), tagHelpers, processedBoundAttributeNames);
269
var result = CreateTryParseResult(attributeBlock.Name.
GetContent
(), tagHelpers, processedBoundAttributeNames);
397
parameterName?.
GetContent
(),
453
parameterName?.
GetContent
(),
544
return tagHelperAttribute.Value?.
GetContent
();
548
return directiveAttribute.Value?.
GetContent
();
552
return attribute.Value?.
GetContent
();
Language\Legacy\TagHelperParseTreeRewriter.cs (4)
419
var minimizedAttribute = new KeyValuePair<string, string>(minimizedAttributeBlock.Name.
GetContent
(), string.Empty);
442
attributeValueBuilder.Append(literalValue.
GetContent
());
451
var attributeName = attributeBlock.Name.
GetContent
();
576
var content = child.
GetContent
();
Language\NamespaceComputer.cs (1)
253
_lastNamespaceName = @namespace.
GetContent
();
Language\RazorCodeDocumentExtensions.cs (1)
55
Debug.Assert(directive is RazorUsingDirectiveSyntax || directive.DirectiveBody.Keyword.
GetContent
() == SyntaxConstants.CSharp.AddTagHelperKeyword);
Language\SourceChange.cs (2)
64
return GetEditedContent(node.
GetContent
(), offset);
111
return node.
GetContent
().Substring(offset, Span.Length);
Language\Syntax\MarkupMinimizedTagHelperDirectiveAttributeSyntax.cs (4)
13
Transition.
GetContent
(),
14
Name.
GetContent
(),
15
Colon?.
GetContent
() ?? string.Empty,
16
ParameterName?.
GetContent
() ?? string.Empty);
Language\Syntax\MarkupTagHelperDirectiveAttributeSyntax.cs (4)
13
Transition.
GetContent
(),
14
Name.
GetContent
(),
15
Colon?.
GetContent
() ?? string.Empty,
16
ParameterName?.
GetContent
() ?? string.Empty);
Language\Syntax\SyntaxExtensions.cs (6)
14
return string.Format(CultureInfo.InvariantCulture, "{0} [{1}]", base.GetDebuggerDisplay(), this.
GetContent
());
22
return string.Format(CultureInfo.InvariantCulture, "{0} [{1}]", base.GetDebuggerDisplay(), this.
GetContent
());
30
return string.Format(CultureInfo.InvariantCulture, "{0} [{1}]", base.GetDebuggerDisplay(), this.
GetContent
());
38
return string.Format(CultureInfo.InvariantCulture, "{0} [{1}]", base.GetDebuggerDisplay(), this.
GetContent
());
46
return string.Format(CultureInfo.InvariantCulture, "{0} [{1}]", base.GetDebuggerDisplay(), this.
GetContent
());
54
return string.Format(CultureInfo.InvariantCulture, "{0} [{1}]", base.GetDebuggerDisplay(), this.
GetContent
());
Language\Syntax\SyntaxSerializer.cs (1)
91
WriteValue($"[{node.
GetContent
()}]");
Microsoft.CodeAnalysis.Razor.Workspaces (43)
CodeActions\Razor\CreateComponentCodeActionResolver.cs (1)
68
Edits = [LspFactory.CreateTextEdit(position: (0, 0), namespaceDirective.
GetContent
())]
CodeActions\Razor\GenerateEventHandlerCodeActionProvider.cs (2)
163
var content = markupTagHelperDirectiveAttribute.Value.
GetContent
();
229
var content = markupTagHelperDirectiveAttribute.Value.
GetContent
();
CodeActions\Razor\RemoveUnnecessaryDirectivesCodeActionProvider.cs (1)
81
return directive.DirectiveBody.Keyword.
GetContent
() == SyntaxConstants.CSharp.AddTagHelperKeyword;
CodeActions\Razor\UnboundDirectiveAttributeAddUsingCodeActionProvider.cs (1)
90
var attributeName = attributeBlock.Name.
GetContent
();
Completion\BlazorDataAttributeCompletionItemProvider.cs (2)
95
MarkupAttributeBlockSyntax attributeBlock => attributeBlock.Name.
GetContent
(),
96
MarkupMinimizedAttributeBlockSyntax minimizedAttributeBlock => minimizedAttributeBlock.Name.
GetContent
(),
Completion\DirectiveAttributeCompletionItemProviderBase.cs (14)
37
minimizedMarkupAttribute.Name.
GetContent
(),
48
markupAttribute.Name.
GetContent
(),
59
minimizedTagHelperAttribute.Name.
GetContent
(),
70
tagHelperAttribute.Name.
GetContent
(),
85
attributeName = string.Concat(directiveAttributeTransition?.
GetContent
(), attributeNameNode?.
GetContent
());
87
parameterName = directiveAttribute.ParameterName?.
GetContent
();
99
attributeName = string.Concat(directiveAttributeTransition?.
GetContent
(), attributeNameNode?.
GetContent
());
101
parameterName = minimizedDirectiveAttribute.ParameterName?.
GetContent
();
149
attributeNames.Add(tagHelperAttribute.Name.
GetContent
());
153
attributeNames.Add(minimizedTagHelperAttribute.Name.
GetContent
());
157
attributeNames.Add(markupAttribute.Name.
GetContent
());
161
attributeNames.Add(minimizedMarkupAttribute.Name.
GetContent
());
DocumentMapping\RazorEditService_UsingDirectives.cs (3)
140
builder.AppendLine(currentDirective.
GetContent
());
157
builder.AppendLine(directive.
GetContent
());
309
builder.Append(directive.
GetContent
());
Extensions\RazorSyntaxNodeExtensions.cs (1)
32
=> directive.DirectiveBody.Keyword.
GetContent
() == SyntaxConstants.CSharp.AddTagHelperKeyword;
FoldingRanges\SectionDirectiveFoldingProvider.cs (1)
22
return $" {name.
GetContent
()}";
Formatting\Passes\CSharpFormattingPass.CSharpDocumentGenerator.cs (3)
1088
var methodDef = $"void F<{typeParam.
GetContent
()}>() ";
1090
_builder.AppendLine(conditions.
GetContent
());
1105
_builder.AppendLine(attribute.
GetContent
());
Formatting\Passes\RazorFormattingPass.cs (1)
477
var keywordContent = keyword.
GetContent
();
Hover\HoverFactory.cs (1)
153
var attributeName = attribute.
GetContent
();
HtmlFacts.cs (4)
232
selectedAttributeName = minimizedAttributeBlock.Name.
GetContent
();
237
selectedAttributeName = attributeBlock.Name.
GetContent
();
242
selectedAttributeName = tagHelperAttribute.Name.
GetContent
();
247
selectedAttributeName = minimizedAttribute.Name.
GetContent
();
RazorSyntaxFacts.cs (1)
164
body.Keyword.
GetContent
() == "code")
TagHelperFacts.cs (7)
147
var name = tagHelperAttribute.Name.
GetContent
();
148
var value = tagHelperAttribute.Value?.
GetContent
() ?? string.Empty;
155
var name = minimizedTagHelperAttribute.Name.
GetContent
();
162
var name = markupAttribute.Name.
GetContent
();
163
var value = markupAttribute.Value?.
GetContent
() ?? string.Empty;
170
var name = minimizedMarkupAttribute.Name.
GetContent
();
178
var value = directiveAttribute.Value?.
GetContent
() ?? string.Empty;