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