275 references to LiteralExpression
GenerateDocumentationAndConfigFiles (11)
src\RoslynAnalyzers\Utilities\Workspaces\SyntaxGeneratorExtensions.cs (8)
160
generator.
LiteralExpression
(0)));
169
generator.
LiteralExpression
(0));
207
generator.
LiteralExpression
(0)));
216
generator.
LiteralExpression
(0));
255
generator.
LiteralExpression
(0)));
264
generator.
LiteralExpression
(0));
306
generator.
LiteralExpression
(0)));
315
generator.
LiteralExpression
(0));
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions_CreateGetHashCodeMethod.cs (3)
92
return [factory.ReturnStatement(factory.
LiteralExpression
(0))];
189
? factory.NegateExpression(factory.
LiteralExpression
(-value))
190
: factory.
LiteralExpression
(value);
ILLink.CodeFixProvider (4)
RequiresHelpers.cs (1)
19
return [syntaxGenerator.AttributeArgument(syntaxGenerator.
LiteralExpression
($"Calls {symbolDisplayName}"))];
UnconditionalSuppressMessageCodeFixProvider.cs (3)
44
syntaxGenerator.
LiteralExpression
(diagnostic.Descriptor.Category));
51
syntaxGenerator.
LiteralExpression
(
56
syntaxGenerator.
LiteralExpression
("<Pending>"));
Metrics (8)
src\RoslynAnalyzers\Utilities\Workspaces\SyntaxGeneratorExtensions.cs (8)
160
generator.
LiteralExpression
(0)));
169
generator.
LiteralExpression
(0));
207
generator.
LiteralExpression
(0)));
216
generator.
LiteralExpression
(0));
255
generator.
LiteralExpression
(0)));
264
generator.
LiteralExpression
(0));
306
generator.
LiteralExpression
(0)));
315
generator.
LiteralExpression
(0));
Metrics.Legacy (8)
src\RoslynAnalyzers\Utilities\Workspaces\SyntaxGeneratorExtensions.cs (8)
160
generator.
LiteralExpression
(0)));
169
generator.
LiteralExpression
(0));
207
generator.
LiteralExpression
(0)));
216
generator.
LiteralExpression
(0));
255
generator.
LiteralExpression
(0)));
264
generator.
LiteralExpression
(0));
306
generator.
LiteralExpression
(0)));
315
generator.
LiteralExpression
(0));
Microsoft.Analyzers.Extra (2)
CallAnalysis\Fixers\LegacyLoggingFixer.cs (2)
594
gen.
LiteralExpression
(CalcEventId(comp, targetClass, cancellationToken)),
596
gen.
LiteralExpression
(details.Message),
Microsoft.CodeAnalysis.Analyzers (12)
MetaAnalyzers\Fixers\DefineDiagnosticDescriptorArgumentsCorrectlyFix.cs (1)
166
var newLiteral = generator.
LiteralExpression
(fixInfo.FixValue).WithTriviaFrom(literal.Syntax);
src\RoslynAnalyzers\Utilities\Workspaces\SyntaxGeneratorExtensions.cs (8)
160
generator.
LiteralExpression
(0)));
169
generator.
LiteralExpression
(0));
207
generator.
LiteralExpression
(0)));
216
generator.
LiteralExpression
(0));
255
generator.
LiteralExpression
(0)));
264
generator.
LiteralExpression
(0));
306
generator.
LiteralExpression
(0)));
315
generator.
LiteralExpression
(0));
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions_CreateGetHashCodeMethod.cs (3)
92
return [factory.ReturnStatement(factory.
LiteralExpression
(0))];
189
? factory.NegateExpression(factory.
LiteralExpression
(-value))
190
: factory.
LiteralExpression
(value);
Microsoft.CodeAnalysis.BannedApiAnalyzers (3)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions_CreateGetHashCodeMethod.cs (3)
92
return [factory.ReturnStatement(factory.
LiteralExpression
(0))];
189
? factory.NegateExpression(factory.
LiteralExpression
(-value))
190
: factory.
LiteralExpression
(value);
Microsoft.CodeAnalysis.CodeStyle.Fixes (4)
src\Analyzers\Core\CodeFixes\UpdateLegacySuppressions\UpdateLegacySuppressionsCodeFixProvider.cs (1)
46
editor.ReplaceNode(node, editor.Generator.
LiteralExpression
(newDocCommentId).WithTriviaFrom(node));
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions_CreateGetHashCodeMethod.cs (3)
92
return [factory.ReturnStatement(factory.
LiteralExpression
(0))];
189
? factory.NegateExpression(factory.
LiteralExpression
(-value))
190
: factory.
LiteralExpression
(value);
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (2)
src\Analyzers\CSharp\CodeFixes\ReplaceDefaultLiteral\CSharpReplaceDefaultLiteralCodeFixProvider.cs (1)
102
var newLiteral = generator.
LiteralExpression
(constant.Value);
src\Analyzers\CSharp\CodeFixes\UseIndexOrRangeOperator\CSharpUseRangeOperatorCodeFixProvider.cs (1)
261
IndexExpression((ExpressionSyntax)generator.
LiteralExpression
(constant2 - constant1)));
Microsoft.CodeAnalysis.CSharp.Features (8)
ConvertForEachToFor\CSharpConvertForEachToForCodeRefactoringProvider.cs (1)
94
EqualsValueClause((ExpressionSyntax)generator.
LiteralExpression
(0)))]),
ReverseForStatement\CSharpReverseForStatementCodeRefactoringProvider.cs (1)
285
: (ExpressionSyntax)generator.SubtractExpression(end, generator.
LiteralExpression
(1));
Snippets\CSharpForLoopSnippetProvider.cs (1)
30
=> (ExpressionSyntax)generator.
LiteralExpression
(0);
Snippets\CSharpIntMainSnippetProvider.cs (1)
35
var returnStatement = (StatementSyntax)generator.ReturnStatement(generator.
LiteralExpression
(0));
Snippets\CSharpReversedForLoopSnippetProvider.cs (2)
32
return (ExpressionSyntax)generator.SubtractExpression(subtractFrom, generator.
LiteralExpression
(1));
36
=> (ExpressionSyntax)generator.
LiteralExpression
(0);
src\Analyzers\CSharp\CodeFixes\ReplaceDefaultLiteral\CSharpReplaceDefaultLiteralCodeFixProvider.cs (1)
102
var newLiteral = generator.
LiteralExpression
(constant.Value);
src\Analyzers\CSharp\CodeFixes\UseIndexOrRangeOperator\CSharpUseRangeOperatorCodeFixProvider.cs (1)
261
IndexExpression((ExpressionSyntax)generator.
LiteralExpression
(constant2 - constant1)));
Microsoft.CodeAnalysis.CSharp.Workspaces.UnitTests (81)
CodeGeneration\SyntaxGeneratorTests.cs (81)
66
VerifySyntax<LiteralExpressionSyntax>(Generator.
LiteralExpression
(0), "0");
67
VerifySyntax<LiteralExpressionSyntax>(Generator.
LiteralExpression
(1), "1");
68
VerifySyntax<PrefixUnaryExpressionSyntax>(Generator.
LiteralExpression
(-1), "-1");
69
VerifySyntax<MemberAccessExpressionSyntax>(Generator.
LiteralExpression
(int.MinValue), "global::System.Int32.MinValue");
70
VerifySyntax<MemberAccessExpressionSyntax>(Generator.
LiteralExpression
(int.MaxValue), "global::System.Int32.MaxValue");
72
VerifySyntax<LiteralExpressionSyntax>(Generator.
LiteralExpression
(0L), "0L");
73
VerifySyntax<LiteralExpressionSyntax>(Generator.
LiteralExpression
(1L), "1L");
74
VerifySyntax<PrefixUnaryExpressionSyntax>(Generator.
LiteralExpression
(-1L), "-1L");
75
VerifySyntax<MemberAccessExpressionSyntax>(Generator.
LiteralExpression
(long.MinValue), "global::System.Int64.MinValue");
76
VerifySyntax<MemberAccessExpressionSyntax>(Generator.
LiteralExpression
(long.MaxValue), "global::System.Int64.MaxValue");
78
VerifySyntax<LiteralExpressionSyntax>(Generator.
LiteralExpression
(0UL), "0UL");
79
VerifySyntax<LiteralExpressionSyntax>(Generator.
LiteralExpression
(1UL), "1UL");
80
VerifySyntax<LiteralExpressionSyntax>(Generator.
LiteralExpression
(ulong.MinValue), "0UL");
81
VerifySyntax<MemberAccessExpressionSyntax>(Generator.
LiteralExpression
(ulong.MaxValue), "global::System.UInt64.MaxValue");
83
VerifySyntax<LiteralExpressionSyntax>(Generator.
LiteralExpression
(0.0f), "0F");
84
VerifySyntax<LiteralExpressionSyntax>(Generator.
LiteralExpression
(1.0f), "1F");
85
VerifySyntax<PrefixUnaryExpressionSyntax>(Generator.
LiteralExpression
(-1.0f), "-1F");
86
VerifySyntax<MemberAccessExpressionSyntax>(Generator.
LiteralExpression
(float.MinValue), "global::System.Single.MinValue");
87
VerifySyntax<MemberAccessExpressionSyntax>(Generator.
LiteralExpression
(float.MaxValue), "global::System.Single.MaxValue");
88
VerifySyntax<MemberAccessExpressionSyntax>(Generator.
LiteralExpression
(float.Epsilon), "global::System.Single.Epsilon");
89
VerifySyntax<MemberAccessExpressionSyntax>(Generator.
LiteralExpression
(float.NaN), "global::System.Single.NaN");
90
VerifySyntax<MemberAccessExpressionSyntax>(Generator.
LiteralExpression
(float.NegativeInfinity), "global::System.Single.NegativeInfinity");
91
VerifySyntax<MemberAccessExpressionSyntax>(Generator.
LiteralExpression
(float.PositiveInfinity), "global::System.Single.PositiveInfinity");
93
VerifySyntax<LiteralExpressionSyntax>(Generator.
LiteralExpression
(0.0), "0D");
94
VerifySyntax<LiteralExpressionSyntax>(Generator.
LiteralExpression
(1.0), "1D");
95
VerifySyntax<PrefixUnaryExpressionSyntax>(Generator.
LiteralExpression
(-1.0), "-1D");
96
VerifySyntax<MemberAccessExpressionSyntax>(Generator.
LiteralExpression
(double.MinValue), "global::System.Double.MinValue");
97
VerifySyntax<MemberAccessExpressionSyntax>(Generator.
LiteralExpression
(double.MaxValue), "global::System.Double.MaxValue");
98
VerifySyntax<MemberAccessExpressionSyntax>(Generator.
LiteralExpression
(double.Epsilon), "global::System.Double.Epsilon");
99
VerifySyntax<MemberAccessExpressionSyntax>(Generator.
LiteralExpression
(double.NaN), "global::System.Double.NaN");
100
VerifySyntax<MemberAccessExpressionSyntax>(Generator.
LiteralExpression
(double.NegativeInfinity), "global::System.Double.NegativeInfinity");
101
VerifySyntax<MemberAccessExpressionSyntax>(Generator.
LiteralExpression
(double.PositiveInfinity), "global::System.Double.PositiveInfinity");
103
VerifySyntax<LiteralExpressionSyntax>(Generator.
LiteralExpression
(0m), "0M");
104
VerifySyntax<LiteralExpressionSyntax>(Generator.
LiteralExpression
(0.00m), "0.00M");
105
VerifySyntax<LiteralExpressionSyntax>(Generator.
LiteralExpression
(1.00m), "1.00M");
106
VerifySyntax<PrefixUnaryExpressionSyntax>(Generator.
LiteralExpression
(-1.00m), "-1.00M");
107
VerifySyntax<LiteralExpressionSyntax>(Generator.
LiteralExpression
(1.0000000000m), "1.0000000000M");
108
VerifySyntax<LiteralExpressionSyntax>(Generator.
LiteralExpression
(0.000000m), "0.000000M");
109
VerifySyntax<LiteralExpressionSyntax>(Generator.
LiteralExpression
(0.0000000m), "0.0000000M");
110
VerifySyntax<LiteralExpressionSyntax>(Generator.
LiteralExpression
(1000000000m), "1000000000M");
111
VerifySyntax<LiteralExpressionSyntax>(Generator.
LiteralExpression
(123456789.123456789m), "123456789.123456789M");
112
VerifySyntax<LiteralExpressionSyntax>(Generator.
LiteralExpression
(1E-28m), "0.0000000000000000000000000001M");
113
VerifySyntax<LiteralExpressionSyntax>(Generator.
LiteralExpression
(0E-28m), "0.0000000000000000000000000000M");
114
VerifySyntax<LiteralExpressionSyntax>(Generator.
LiteralExpression
(1E-29m), "0.0000000000000000000000000000M");
115
VerifySyntax<LiteralExpressionSyntax>(Generator.
LiteralExpression
(-1E-29m), "0.0000000000000000000000000000M");
116
VerifySyntax<MemberAccessExpressionSyntax>(Generator.
LiteralExpression
(decimal.MinValue), "global::System.Decimal.MinValue");
117
VerifySyntax<MemberAccessExpressionSyntax>(Generator.
LiteralExpression
(decimal.MaxValue), "global::System.Decimal.MaxValue");
119
VerifySyntax<LiteralExpressionSyntax>(Generator.
LiteralExpression
('c'), "'c'");
121
VerifySyntax<LiteralExpressionSyntax>(Generator.
LiteralExpression
("str"), """
124
VerifySyntax<LiteralExpressionSyntax>(Generator.
LiteralExpression
("s\"t\"r"), """
128
VerifySyntax<LiteralExpressionSyntax>(Generator.
LiteralExpression
(true), "true");
129
VerifySyntax<LiteralExpressionSyntax>(Generator.
LiteralExpression
(false), "false");
135
VerifySyntax<LiteralExpressionSyntax>(Generator.
LiteralExpression
((short)0), "0");
136
VerifySyntax<LiteralExpressionSyntax>(Generator.
LiteralExpression
((short)1), "1");
137
VerifySyntax<PrefixUnaryExpressionSyntax>(Generator.
LiteralExpression
((short)-1), "-1");
138
VerifySyntax<MemberAccessExpressionSyntax>(Generator.
LiteralExpression
(short.MinValue), "global::System.Int16.MinValue");
139
VerifySyntax<MemberAccessExpressionSyntax>(Generator.
LiteralExpression
(short.MaxValue), "global::System.Int16.MaxValue");
145
VerifySyntax<LiteralExpressionSyntax>(Generator.
LiteralExpression
((ushort)0), "0");
146
VerifySyntax<LiteralExpressionSyntax>(Generator.
LiteralExpression
((ushort)1), "1");
147
VerifySyntax<LiteralExpressionSyntax>(Generator.
LiteralExpression
(ushort.MinValue), "0");
148
VerifySyntax<MemberAccessExpressionSyntax>(Generator.
LiteralExpression
(ushort.MaxValue), "global::System.UInt16.MaxValue");
154
VerifySyntax<LiteralExpressionSyntax>(Generator.
LiteralExpression
((sbyte)0), "0");
155
VerifySyntax<LiteralExpressionSyntax>(Generator.
LiteralExpression
((sbyte)1), "1");
156
VerifySyntax<PrefixUnaryExpressionSyntax>(Generator.
LiteralExpression
((sbyte)-1), "-1");
157
VerifySyntax<MemberAccessExpressionSyntax>(Generator.
LiteralExpression
(sbyte.MinValue), "global::System.SByte.MinValue");
158
VerifySyntax<MemberAccessExpressionSyntax>(Generator.
LiteralExpression
(sbyte.MaxValue), "global::System.SByte.MaxValue");
164
VerifySyntax<LiteralExpressionSyntax>(Generator.
LiteralExpression
((byte)0), "0");
165
VerifySyntax<LiteralExpressionSyntax>(Generator.
LiteralExpression
((byte)1), "1");
166
VerifySyntax<LiteralExpressionSyntax>(Generator.
LiteralExpression
(byte.MinValue), "0");
167
VerifySyntax<LiteralExpressionSyntax>(Generator.
LiteralExpression
(byte.MaxValue), "255");
402
Generator.ArrayCreationExpression(Generator.IdentifierName("x"), Generator.
LiteralExpression
(10)),
563
VerifySyntax<YieldStatementSyntax>(Generator.YieldReturnStatement(Generator.
LiteralExpression
(1)), "yield return 1;");
801
Generator.FieldDeclaration("fld", Generator.TypeExpression(SpecialType.System_Int32), initializer: Generator.
LiteralExpression
(0)),
1791
Generator.EnumDeclaration("e", members: [Generator.EnumMember("a", Generator.
LiteralExpression
(0)), Generator.EnumMember("b"), Generator.EnumMember("c", Generator.
LiteralExpression
(5))]),
1795
Generator.EnumDeclaration("e", members: [Generator.FieldDeclaration("a", Generator.IdentifierName("e"), initializer: Generator.
LiteralExpression
(1))]),
3660
Assert.Equal("500", Generator.GetExpression(Generator.WithExpression(x, Generator.
LiteralExpression
(500))).ToString());
3661
Assert.Equal("500", Generator.GetExpression(Generator.WithExpression(y, Generator.
LiteralExpression
(500))).ToString());
3662
Assert.Equal("500", Generator.GetExpression(Generator.WithExpression(z, Generator.
LiteralExpression
(500))).ToString());
3684
Assert.Null(Generator.GetExpression(Generator.WithExpression(x, Generator.
LiteralExpression
(500))));
3685
Assert.Equal("500", Generator.GetExpression(Generator.WithExpression(y, Generator.
LiteralExpression
(500))).ToString());
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (72)
CodeGeneration\ExpressionGenerationTests.cs (32)
63
f => f.
LiteralExpression
(0),
72
f => f.
LiteralExpression
(1),
81
f => f.
LiteralExpression
(0L),
90
f => f.
LiteralExpression
(1L),
99
f => f.
LiteralExpression
(0.0f),
108
f => f.
LiteralExpression
(0.5F),
117
f => f.
LiteralExpression
(0.0d),
126
f => f.
LiteralExpression
(0.5D),
136
f.
LiteralExpression
(1),
137
f.
LiteralExpression
(2)),
147
f.
LiteralExpression
(1),
149
f.
LiteralExpression
(2),
150
f.
LiteralExpression
(3))),
161
f.
LiteralExpression
(1),
162
f.
LiteralExpression
(2)),
163
f.
LiteralExpression
(3)),
173
f.
LiteralExpression
(1),
174
f.
LiteralExpression
(2)),
184
f.
LiteralExpression
(1),
186
f.
LiteralExpression
(2),
187
f.
LiteralExpression
(3))),
198
f.
LiteralExpression
(1),
199
f.
LiteralExpression
(2)),
200
f.
LiteralExpression
(3)),
210
f.
LiteralExpression
(1),
211
f.
LiteralExpression
(2)),
221
f.
LiteralExpression
(1),
222
f.
LiteralExpression
(2)),
232
f.
LiteralExpression
(1),
233
f.
LiteralExpression
(2)),
243
f.
LiteralExpression
(1),
244
f.
LiteralExpression
(2)),
CodeGeneration\ExpressionPrecedenceGenerationTests.cs (40)
20
f.
LiteralExpression
(1),
21
f.
LiteralExpression
(2)),
22
f.
LiteralExpression
(3)),
33
f.
LiteralExpression
(1),
34
f.
LiteralExpression
(2)),
35
f.
LiteralExpression
(3)),
45
f.
LiteralExpression
(1),
47
f.
LiteralExpression
(2),
48
f.
LiteralExpression
(3))),
58
f.
LiteralExpression
(1),
60
f.
LiteralExpression
(2),
61
f.
LiteralExpression
(3))),
72
f.
LiteralExpression
(1),
73
f.
LiteralExpression
(2)),
74
f.
LiteralExpression
(3)),
85
f.
LiteralExpression
(1),
86
f.
LiteralExpression
(2)),
87
f.
LiteralExpression
(3)),
97
f.
LiteralExpression
(1),
99
f.
LiteralExpression
(2),
100
f.
LiteralExpression
(3))),
110
f.
LiteralExpression
(1),
112
f.
LiteralExpression
(2),
113
f.
LiteralExpression
(3))),
124
f.
LiteralExpression
(1),
125
f.
LiteralExpression
(2)),
126
f.
LiteralExpression
(3)),
137
f.
LiteralExpression
(1),
138
f.
LiteralExpression
(2)),
139
f.
LiteralExpression
(3)),
149
f.
LiteralExpression
(1),
151
f.
LiteralExpression
(2),
152
f.
LiteralExpression
(3))),
162
f.
LiteralExpression
(1),
164
f.
LiteralExpression
(2),
165
f.
LiteralExpression
(3))),
176
f.
LiteralExpression
(1),
177
f.
LiteralExpression
(2)),
220
f.
LiteralExpression
(1),
221
f.
LiteralExpression
(2)),
Microsoft.CodeAnalysis.Features (7)
AddDebuggerDisplay\AbstractAddDebuggerDisplayCodeRefactoringProvider.cs (3)
139
generator.
LiteralExpression
(DebuggerDisplayPrefix),
141
generator.
LiteralExpression
(DebuggerDisplaySuffix));
146
attributeArgument = generator.
LiteralExpression
(
GenerateComparisonOperators\GenerateComparisonOperatorsCodeRefactoringProvider.cs (1)
209
var zero = generator.
LiteralExpression
(0);
InitializeParameter\AbstractAddParameterCheckCodeRefactoringProvider.cs (1)
738
var zeroLiteralExpression = generator.
LiteralExpression
(0);
ReplacePropertyWithMethods\AbstractReplacePropertyWithMethodsService.cs (1)
163
var literalOne = replacer.Generator.
LiteralExpression
(1);
src\Analyzers\Core\CodeFixes\UpdateLegacySuppressions\UpdateLegacySuppressionsCodeFixProvider.cs (1)
46
editor.ReplaceNode(node, editor.Generator.
LiteralExpression
(newDocCommentId).WithTriviaFrom(node));
Microsoft.CodeAnalysis.PerformanceSensitiveAnalyzers (3)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions_CreateGetHashCodeMethod.cs (3)
92
return [factory.ReturnStatement(factory.
LiteralExpression
(0))];
189
? factory.NegateExpression(factory.
LiteralExpression
(-value))
190
: factory.
LiteralExpression
(value);
Microsoft.CodeAnalysis.PublicApiAnalyzers.CodeFixes (8)
src\RoslynAnalyzers\Utilities\Workspaces\SyntaxGeneratorExtensions.cs (8)
160
generator.
LiteralExpression
(0)));
169
generator.
LiteralExpression
(0));
207
generator.
LiteralExpression
(0)));
216
generator.
LiteralExpression
(0));
255
generator.
LiteralExpression
(0)));
264
generator.
LiteralExpression
(0));
306
generator.
LiteralExpression
(0)));
315
generator.
LiteralExpression
(0));
Microsoft.CodeAnalysis.Workspaces (6)
Editing\SyntaxGenerator.cs (3)
1878
=>
LiteralExpression
(false);
1884
=>
LiteralExpression
(true);
1890
=>
LiteralExpression
(value: null);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions_CreateGetHashCodeMethod.cs (3)
92
return [factory.ReturnStatement(factory.
LiteralExpression
(0))];
189
? factory.NegateExpression(factory.
LiteralExpression
(-value))
190
: factory.
LiteralExpression
(value);
Microsoft.Interop.LibraryImportGenerator (1)
Analyzers\ConvertToLibraryImportFixer.cs (1)
544
generator.
LiteralExpression
(AppendSuffix(methodName, entryPointSuffix.Value))));
Roslyn.Diagnostics.Analyzers (14)
AbstractRunIterations`1.cs (2)
120
syntaxGenerator.
LiteralExpression
(0),
121
syntaxGenerator.
LiteralExpression
(10))),
ImportingConstructorShouldBeObsoleteCodeFixProvider.cs (1)
218
attributeArgument = generator.
LiteralExpression
("This exported object must be obtained through the MEF export provider.");
src\RoslynAnalyzers\Utilities\Workspaces\SyntaxGeneratorExtensions.cs (8)
160
generator.
LiteralExpression
(0)));
169
generator.
LiteralExpression
(0));
207
generator.
LiteralExpression
(0)));
216
generator.
LiteralExpression
(0));
255
generator.
LiteralExpression
(0)));
264
generator.
LiteralExpression
(0));
306
generator.
LiteralExpression
(0)));
315
generator.
LiteralExpression
(0));
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions_CreateGetHashCodeMethod.cs (3)
92
return [factory.ReturnStatement(factory.
LiteralExpression
(0))];
189
? factory.NegateExpression(factory.
LiteralExpression
(-value))
190
: factory.
LiteralExpression
(value);
System.Text.RegularExpressions.Generator (2)
UpgradeToGeneratedRegexCodeFixer.cs (2)
215
cultureNameValue = generator.
LiteralExpression
(CultureInfo.CurrentCulture.Name);
307
return generator.
LiteralExpression
(argument.Value.ConstantValue.Value);
Test.Utilities (8)
src\RoslynAnalyzers\Utilities\Workspaces\SyntaxGeneratorExtensions.cs (8)
160
generator.
LiteralExpression
(0)));
169
generator.
LiteralExpression
(0));
207
generator.
LiteralExpression
(0)));
216
generator.
LiteralExpression
(0));
255
generator.
LiteralExpression
(0)));
264
generator.
LiteralExpression
(0));
306
generator.
LiteralExpression
(0)));
315
generator.
LiteralExpression
(0));
Text.Analyzers (11)
src\RoslynAnalyzers\Utilities\Workspaces\SyntaxGeneratorExtensions.cs (8)
160
generator.
LiteralExpression
(0)));
169
generator.
LiteralExpression
(0));
207
generator.
LiteralExpression
(0)));
216
generator.
LiteralExpression
(0));
255
generator.
LiteralExpression
(0)));
264
generator.
LiteralExpression
(0));
306
generator.
LiteralExpression
(0)));
315
generator.
LiteralExpression
(0));
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions_CreateGetHashCodeMethod.cs (3)
92
return [factory.ReturnStatement(factory.
LiteralExpression
(0))];
189
? factory.NegateExpression(factory.
LiteralExpression
(-value))
190
: factory.
LiteralExpression
(value);