25 instantiations of CSharpIntermediateToken
Microsoft.CodeAnalysis.Razor.Compiler (25)
Language\DefaultTagHelperResolutionPhase.ComponentTagHelperResolver.cs (3)
441
innerExpr.Children[0] = new
CSharpIntermediateToken
(
455
expr.Children.Add(new
CSharpIntermediateToken
(
591
node.Children.Add(new
CSharpIntermediateToken
(content, mergedSpan));
Language\DefaultTagHelperResolutionPhase.cs (3)
704
target.Children.Add(new
CSharpIntermediateToken
(token.Content, token.Source));
957
: new
CSharpIntermediateToken
(htmlToken.Content, htmlToken.Source);
1284
target.Children.Add(new
CSharpIntermediateToken
(mergedContent, mergedSpan));
Language\DefaultTagHelperResolutionPhase.LegacyTagHelperResolver.cs (16)
464
targetNode.Children.Add(new
CSharpIntermediateToken
(string.Empty, emptySource));
509
targetNode.Children.Add(new
CSharpIntermediateToken
(content, source));
601
targetNode.Children.Add(new
CSharpIntermediateToken
(sourceText, valueSource));
633
targetNode.Children.Add(new
CSharpIntermediateToken
(intermediateToken.Content, intermediateToken.Source));
638
targetNode.Children.Add(new
CSharpIntermediateToken
(intermediateToken.Content, intermediateToken.Source));
664
targetNode.Children.Add(new
CSharpIntermediateToken
(attrContent, tokenSource));
677
targetNode.Children.Add(new
CSharpIntermediateToken
(string.Empty, emptySource));
680
targetNode.Children.Add(new
CSharpIntermediateToken
("@", transSource));
692
targetNode.Children.Add(new
CSharpIntermediateToken
("(", openSource));
705
targetNode.Children.Add(new
CSharpIntermediateToken
(")", closeSource));
743
targetNode.Children.Add(new
CSharpIntermediateToken
("(", openParenSource));
754
targetNode.Children.Add(new
CSharpIntermediateToken
(innerToken.Content, innerToken.Source));
769
targetNode.Children.Add(new
CSharpIntermediateToken
(")", closeParenSource));
1336
expr.Children.Add(new
CSharpIntermediateToken
(text, contentSpan));
1366
expr.Children.Add(new
CSharpIntermediateToken
(mergedContent, tokenSpan));
1396
target.Children.Add(new
CSharpIntermediateToken
(text, vss));
Language\Intermediate\ComponentTypeArgumentIntermediateNode.cs (1)
36
: new
CSharpIntermediateToken
(t.Content, t.Source),
Language\Intermediate\IntermediateNodeFactory.cs (2)
11
=>
new
(content, source);
14
=>
new
(LazyContent.Create(arg, contentFactory), source);
99 references to CSharpIntermediateToken
Microsoft.AspNetCore.Mvc.Razor.Extensions.UnitTests (6)
ModelExpressionPassTest.cs (6)
53
var
token = Assert.IsAssignableFrom<
CSharpIntermediateToken
>(Assert.Single(setProperty.Children));
87
var
originalNode = Assert.IsAssignableFrom<
CSharpIntermediateToken
>(expression.Children[2]);
123
var
originalNode = Assert.IsAssignableFrom<
CSharpIntermediateToken
>(expression.Children[1]);
Microsoft.AspNetCore.Razor.Language.UnitTests (2)
Components\NodeAssert.cs (2)
74
var
token = Assert.IsAssignableFrom<
CSharpIntermediateToken
>(attributeValueNode.Children[i]);
Microsoft.AspNetCore.Razor.Test.Common (12)
Language\IntegrationTests\IntermediateNodeWriter.cs (1)
72
CSharpIntermediateToken
=> "CSharp",
Language\Intermediate\IntermediateNodeAssert.cs (10)
95
var
token = Assert.IsAssignableFrom<
CSharpIntermediateToken
>(statement.Children[i]);
181
var
token = Assert.IsAssignableFrom<
CSharpIntermediateToken
>(attributeValue.Children[i]);
225
var
token = Assert.IsAssignableFrom<
CSharpIntermediateToken
>(cSharp.Children[i]);
245
var
token = Assert.IsAssignableFrom<
CSharpIntermediateToken
>(beginNode.Children[i]);
265
var
token = Assert.IsAssignableFrom<
CSharpIntermediateToken
>(endNode.Children[i]);
Language\Intermediate\IntermediateNodeExtensions.cs (1)
18
if (child is
CSharpIntermediateToken
csharpToken)
Microsoft.CodeAnalysis.Razor.Compiler (79)
Language\CodeGeneration\DesignTimeNodeWriter.cs (5)
68
if (child is
CSharpIntermediateToken
token)
89
if (child is
CSharpIntermediateToken
token)
161
if (child is
CSharpIntermediateToken
token)
181
if (node.Children[i] is
CSharpIntermediateToken
token)
206
if (child is
CSharpIntermediateToken
token)
Language\CodeGeneration\IntermediateNodeWriter.cs (1)
97
if (child is
CSharpIntermediateToken
token)
Language\CodeGeneration\RuntimeNodeWriter.cs (4)
93
var
firstCSharpChild = node.Children.OfType<
CSharpIntermediateToken
>().FirstOrDefault();
113
if (child is
CSharpIntermediateToken
csharpToken)
156
if (children[i] is
CSharpIntermediateToken
token)
Language\Components\ComponentBindLoweringPass.cs (1)
844
var
startToken = awaitable
Language\Components\ComponentDesignTimeNodeWriter.cs (14)
135
if (child is
CSharpIntermediateToken
token)
156
if (child is
CSharpIntermediateToken
token)
177
if (child is not
CSharpIntermediateToken
token || !token.Content.IsNullOrWhiteSpace())
267
if (child is
CSharpIntermediateToken
token)
893
private static ImmutableArray<
CSharpIntermediateToken
> GetCSharpTokens(IntermediateNode node)
896
return node.FindDescendantNodes<
CSharpIntermediateToken
>();
1037
using var tokens = new PooledArrayBuilder<
CSharpIntermediateToken
>();
1055
foreach (
var
token in GetCSharpTokens(node))
1098
var
assignmentToken = IntermediateNodeFactory.CSharpToken(assignmentText);
1146
private static void WriteCSharpTokens(CodeRenderingContext context, ImmutableArray<
CSharpIntermediateToken
> tokens)
1148
foreach (
var
token in tokens)
1154
private static void WriteCSharpTokens(CodeRenderingContext context, ref readonly PooledArrayBuilder<
CSharpIntermediateToken
> tokens)
1156
foreach (
var
token in tokens)
1162
private static void WriteCSharpToken(CodeRenderingContext context,
CSharpIntermediateToken
token)
Language\Components\ComponentGenericTypePass.cs (1)
294
return string.Join(string.Empty, node.FindDescendantNodes<
CSharpIntermediateToken
>().Select(t => t.Content));
Language\Components\ComponentMarkupBlockPass.cs (1)
258
if (node is
CSharpIntermediateToken
)
Language\Components\ComponentRuntimeNodeWriter.cs (16)
49
if (child is
CSharpIntermediateToken
token)
90
var
firstCSharpChild = node.Children.OfType<
CSharpIntermediateToken
>().FirstOrDefault();
114
if (child is
CSharpIntermediateToken
csharpToken)
806
private static ImmutableArray<
CSharpIntermediateToken
> GetCSharpTokens(IntermediateNode node)
809
return node.FindDescendantNodes<
CSharpIntermediateToken
>();
930
using var tokens = new PooledArrayBuilder<
CSharpIntermediateToken
>();
990
var
assignmentToken = shouldTypeCheck
1110
if (token is
CSharpIntermediateToken
)
1131
WriteCSharpToken(context, (
CSharpIntermediateToken
)token);
1160
if (token is
CSharpIntermediateToken
csharpToken)
1205
private static void WriteCSharpTokens(CodeRenderingContext context, ImmutableArray<
CSharpIntermediateToken
> tokens)
1207
foreach (
var
token in tokens)
1213
private static void WriteCSharpTokens(CodeRenderingContext context, ref readonly PooledArrayBuilder<
CSharpIntermediateToken
> tokens)
1215
foreach (
var
token in tokens)
1221
private static void WriteCSharpToken(CodeRenderingContext context,
CSharpIntermediateToken
token)
Language\Components\ComponentSplatLoweringPass.cs (1)
42
result.Children.AddRange(node.FindDescendantNodes<
CSharpIntermediateToken
>());
Language\DefaultTagHelperResolutionPhase.ComponentTagHelperResolver.cs (8)
418
/// When false (regular bound properties), literals become direct <see cref="
CSharpIntermediateToken
"/>s.
439
if (innerExpr.Children is [
CSharpIntermediateToken
firstToken, ..])
453
if (!prefixedFirst && token is
CSharpIntermediateToken
csharpToken)
518
/// Merges <see cref="
CSharpIntermediateToken
"/> children (and content from
530
if (child is
CSharpIntermediateToken
)
536
&& expr.Children.All(static inner => inner is
CSharpIntermediateToken
))
557
if (child is
CSharpIntermediateToken
csharpToken)
570
if (inner is
CSharpIntermediateToken
innerToken)
Language\DefaultTagHelperResolutionPhase.cs (6)
694
if (source is
CSharpIntermediateToken
csharpToken)
835
/// structured <see cref="
CSharpIntermediateToken
"/> children: <c>@</c>, <c>(</c>,
950
/// Converts an <see cref="HtmlIntermediateToken"/> to a <see cref="
CSharpIntermediateToken
"/>,
953
private static
CSharpIntermediateToken
ToCSharpToken(HtmlIntermediateToken htmlToken)
973
/// Creates an empty <see cref="
CSharpIntermediateToken
"/> with an empty string.
975
private static
CSharpIntermediateToken
CreateEmptyCSharpToken(SourceSpan? source)
Language\DefaultTagHelperResolutionPhase.LegacyTagHelperResolver.cs (7)
752
if (innerChild is
CSharpIntermediateToken
innerToken)
818
Func<
CSharpIntermediateToken
, IntermediateNode> createCSharpWrapper)
829
if (innerChild is
CSharpIntermediateToken
csharpToken)
1091
if (innerChild is
CSharpIntermediateToken
csharpToken)
1282
/// For implicit expressions, produces a single <see cref="
CSharpIntermediateToken
"/>.
1387
/// Produces a single <see cref="
CSharpIntermediateToken
"/> with the raw source text.
1401
/// flat <see cref="
CSharpIntermediateToken
"/>s for literals, <see cref="CSharpExpressionIntermediateNode"/>
Language\Extensions\DefaultTagHelperTargetExtension.cs (2)
373
node.Children is [
CSharpIntermediateToken
token])
415
node.Children is [
CSharpIntermediateToken
token])
Language\Intermediate\ComponentTypeArgumentIntermediateNode.cs (6)
7
BoundAttributeDescriptor boundAttribute,
CSharpIntermediateToken
value) : IntermediateNode
14
public
CSharpIntermediateToken
Value { get; } = value;
25
private static
CSharpIntermediateToken
GetValue(TagHelperPropertyIntermediateNode node)
28
[
CSharpIntermediateToken
t] => t,
29
[CSharpExpressionIntermediateNode { Children: [
CSharpIntermediateToken
t] }] => t,
37
_ => Assumed.Unreachable<
CSharpIntermediateToken
>()
Language\Intermediate\IntermediateNodeFactory.cs (2)
10
public static
CSharpIntermediateToken
CSharpToken(string content, SourceSpan? source = null)
13
public static
CSharpIntermediateToken
CSharpToken<T>(T arg, Func<T, string> contentFactory, SourceSpan? source = null)
Language\Intermediate\UnresolvedAttributeValueIntermediateNode.cs (1)
14
/// <item>A <see cref="
CSharpIntermediateToken
"/> (for bound non-string tag helper properties)</item>
Language\Intermediate\UnresolvedExpressionAttributeValueIntermediateNode.cs (1)
14
/// <item>Direct <see cref="
CSharpIntermediateToken
"/> children (for bound non-string tag helper properties)</item>
Mvc\ModelExpressionPass.cs (2)
46
if (node.Children.Count == 1 && node.Children[0] is
CSharpIntermediateToken
token)
62
if (nestedExpression.Children[j] is
CSharpIntermediateToken
csharpToken)