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)
68
VerifySyntax<LiteralExpressionSyntax>(Generator.
LiteralExpression
(0), "0");
69
VerifySyntax<LiteralExpressionSyntax>(Generator.
LiteralExpression
(1), "1");
70
VerifySyntax<PrefixUnaryExpressionSyntax>(Generator.
LiteralExpression
(-1), "-1");
71
VerifySyntax<MemberAccessExpressionSyntax>(Generator.
LiteralExpression
(int.MinValue), "global::System.Int32.MinValue");
72
VerifySyntax<MemberAccessExpressionSyntax>(Generator.
LiteralExpression
(int.MaxValue), "global::System.Int32.MaxValue");
74
VerifySyntax<LiteralExpressionSyntax>(Generator.
LiteralExpression
(0L), "0L");
75
VerifySyntax<LiteralExpressionSyntax>(Generator.
LiteralExpression
(1L), "1L");
76
VerifySyntax<PrefixUnaryExpressionSyntax>(Generator.
LiteralExpression
(-1L), "-1L");
77
VerifySyntax<MemberAccessExpressionSyntax>(Generator.
LiteralExpression
(long.MinValue), "global::System.Int64.MinValue");
78
VerifySyntax<MemberAccessExpressionSyntax>(Generator.
LiteralExpression
(long.MaxValue), "global::System.Int64.MaxValue");
80
VerifySyntax<LiteralExpressionSyntax>(Generator.
LiteralExpression
(0UL), "0UL");
81
VerifySyntax<LiteralExpressionSyntax>(Generator.
LiteralExpression
(1UL), "1UL");
82
VerifySyntax<LiteralExpressionSyntax>(Generator.
LiteralExpression
(ulong.MinValue), "0UL");
83
VerifySyntax<MemberAccessExpressionSyntax>(Generator.
LiteralExpression
(ulong.MaxValue), "global::System.UInt64.MaxValue");
85
VerifySyntax<LiteralExpressionSyntax>(Generator.
LiteralExpression
(0.0f), "0F");
86
VerifySyntax<LiteralExpressionSyntax>(Generator.
LiteralExpression
(1.0f), "1F");
87
VerifySyntax<PrefixUnaryExpressionSyntax>(Generator.
LiteralExpression
(-1.0f), "-1F");
88
VerifySyntax<MemberAccessExpressionSyntax>(Generator.
LiteralExpression
(float.MinValue), "global::System.Single.MinValue");
89
VerifySyntax<MemberAccessExpressionSyntax>(Generator.
LiteralExpression
(float.MaxValue), "global::System.Single.MaxValue");
90
VerifySyntax<MemberAccessExpressionSyntax>(Generator.
LiteralExpression
(float.Epsilon), "global::System.Single.Epsilon");
91
VerifySyntax<MemberAccessExpressionSyntax>(Generator.
LiteralExpression
(float.NaN), "global::System.Single.NaN");
92
VerifySyntax<MemberAccessExpressionSyntax>(Generator.
LiteralExpression
(float.NegativeInfinity), "global::System.Single.NegativeInfinity");
93
VerifySyntax<MemberAccessExpressionSyntax>(Generator.
LiteralExpression
(float.PositiveInfinity), "global::System.Single.PositiveInfinity");
95
VerifySyntax<LiteralExpressionSyntax>(Generator.
LiteralExpression
(0.0), "0D");
96
VerifySyntax<LiteralExpressionSyntax>(Generator.
LiteralExpression
(1.0), "1D");
97
VerifySyntax<PrefixUnaryExpressionSyntax>(Generator.
LiteralExpression
(-1.0), "-1D");
98
VerifySyntax<MemberAccessExpressionSyntax>(Generator.
LiteralExpression
(double.MinValue), "global::System.Double.MinValue");
99
VerifySyntax<MemberAccessExpressionSyntax>(Generator.
LiteralExpression
(double.MaxValue), "global::System.Double.MaxValue");
100
VerifySyntax<MemberAccessExpressionSyntax>(Generator.
LiteralExpression
(double.Epsilon), "global::System.Double.Epsilon");
101
VerifySyntax<MemberAccessExpressionSyntax>(Generator.
LiteralExpression
(double.NaN), "global::System.Double.NaN");
102
VerifySyntax<MemberAccessExpressionSyntax>(Generator.
LiteralExpression
(double.NegativeInfinity), "global::System.Double.NegativeInfinity");
103
VerifySyntax<MemberAccessExpressionSyntax>(Generator.
LiteralExpression
(double.PositiveInfinity), "global::System.Double.PositiveInfinity");
105
VerifySyntax<LiteralExpressionSyntax>(Generator.
LiteralExpression
(0m), "0M");
106
VerifySyntax<LiteralExpressionSyntax>(Generator.
LiteralExpression
(0.00m), "0.00M");
107
VerifySyntax<LiteralExpressionSyntax>(Generator.
LiteralExpression
(1.00m), "1.00M");
108
VerifySyntax<PrefixUnaryExpressionSyntax>(Generator.
LiteralExpression
(-1.00m), "-1.00M");
109
VerifySyntax<LiteralExpressionSyntax>(Generator.
LiteralExpression
(1.0000000000m), "1.0000000000M");
110
VerifySyntax<LiteralExpressionSyntax>(Generator.
LiteralExpression
(0.000000m), "0.000000M");
111
VerifySyntax<LiteralExpressionSyntax>(Generator.
LiteralExpression
(0.0000000m), "0.0000000M");
112
VerifySyntax<LiteralExpressionSyntax>(Generator.
LiteralExpression
(1000000000m), "1000000000M");
113
VerifySyntax<LiteralExpressionSyntax>(Generator.
LiteralExpression
(123456789.123456789m), "123456789.123456789M");
114
VerifySyntax<LiteralExpressionSyntax>(Generator.
LiteralExpression
(1E-28m), "0.0000000000000000000000000001M");
115
VerifySyntax<LiteralExpressionSyntax>(Generator.
LiteralExpression
(0E-28m), "0.0000000000000000000000000000M");
116
VerifySyntax<LiteralExpressionSyntax>(Generator.
LiteralExpression
(1E-29m), "0.0000000000000000000000000000M");
117
VerifySyntax<LiteralExpressionSyntax>(Generator.
LiteralExpression
(-1E-29m), "0.0000000000000000000000000000M");
118
VerifySyntax<MemberAccessExpressionSyntax>(Generator.
LiteralExpression
(decimal.MinValue), "global::System.Decimal.MinValue");
119
VerifySyntax<MemberAccessExpressionSyntax>(Generator.
LiteralExpression
(decimal.MaxValue), "global::System.Decimal.MaxValue");
121
VerifySyntax<LiteralExpressionSyntax>(Generator.
LiteralExpression
('c'), "'c'");
123
VerifySyntax<LiteralExpressionSyntax>(Generator.
LiteralExpression
("str"), """
126
VerifySyntax<LiteralExpressionSyntax>(Generator.
LiteralExpression
("s\"t\"r"), """
130
VerifySyntax<LiteralExpressionSyntax>(Generator.
LiteralExpression
(true), "true");
131
VerifySyntax<LiteralExpressionSyntax>(Generator.
LiteralExpression
(false), "false");
137
VerifySyntax<LiteralExpressionSyntax>(Generator.
LiteralExpression
((short)0), "0");
138
VerifySyntax<LiteralExpressionSyntax>(Generator.
LiteralExpression
((short)1), "1");
139
VerifySyntax<PrefixUnaryExpressionSyntax>(Generator.
LiteralExpression
((short)-1), "-1");
140
VerifySyntax<MemberAccessExpressionSyntax>(Generator.
LiteralExpression
(short.MinValue), "global::System.Int16.MinValue");
141
VerifySyntax<MemberAccessExpressionSyntax>(Generator.
LiteralExpression
(short.MaxValue), "global::System.Int16.MaxValue");
147
VerifySyntax<LiteralExpressionSyntax>(Generator.
LiteralExpression
((ushort)0), "0");
148
VerifySyntax<LiteralExpressionSyntax>(Generator.
LiteralExpression
((ushort)1), "1");
149
VerifySyntax<LiteralExpressionSyntax>(Generator.
LiteralExpression
(ushort.MinValue), "0");
150
VerifySyntax<MemberAccessExpressionSyntax>(Generator.
LiteralExpression
(ushort.MaxValue), "global::System.UInt16.MaxValue");
156
VerifySyntax<LiteralExpressionSyntax>(Generator.
LiteralExpression
((sbyte)0), "0");
157
VerifySyntax<LiteralExpressionSyntax>(Generator.
LiteralExpression
((sbyte)1), "1");
158
VerifySyntax<PrefixUnaryExpressionSyntax>(Generator.
LiteralExpression
((sbyte)-1), "-1");
159
VerifySyntax<MemberAccessExpressionSyntax>(Generator.
LiteralExpression
(sbyte.MinValue), "global::System.SByte.MinValue");
160
VerifySyntax<MemberAccessExpressionSyntax>(Generator.
LiteralExpression
(sbyte.MaxValue), "global::System.SByte.MaxValue");
166
VerifySyntax<LiteralExpressionSyntax>(Generator.
LiteralExpression
((byte)0), "0");
167
VerifySyntax<LiteralExpressionSyntax>(Generator.
LiteralExpression
((byte)1), "1");
168
VerifySyntax<LiteralExpressionSyntax>(Generator.
LiteralExpression
(byte.MinValue), "0");
169
VerifySyntax<LiteralExpressionSyntax>(Generator.
LiteralExpression
(byte.MaxValue), "255");
404
Generator.ArrayCreationExpression(Generator.IdentifierName("x"), Generator.
LiteralExpression
(10)),
565
VerifySyntax<YieldStatementSyntax>(Generator.YieldReturnStatement(Generator.
LiteralExpression
(1)), "yield return 1;");
803
Generator.FieldDeclaration("fld", Generator.TypeExpression(SpecialType.System_Int32), initializer: Generator.
LiteralExpression
(0)),
1793
Generator.EnumDeclaration("e", members: [Generator.EnumMember("a", Generator.
LiteralExpression
(0)), Generator.EnumMember("b"), Generator.EnumMember("c", Generator.
LiteralExpression
(5))]),
1797
Generator.EnumDeclaration("e", members: [Generator.FieldDeclaration("a", Generator.IdentifierName("e"), initializer: Generator.
LiteralExpression
(1))]),
3662
Assert.Equal("500", Generator.GetExpression(Generator.WithExpression(x, Generator.
LiteralExpression
(500))).ToString());
3663
Assert.Equal("500", Generator.GetExpression(Generator.WithExpression(y, Generator.
LiteralExpression
(500))).ToString());
3664
Assert.Equal("500", Generator.GetExpression(Generator.WithExpression(z, Generator.
LiteralExpression
(500))).ToString());
3686
Assert.Null(Generator.GetExpression(Generator.WithExpression(x, Generator.
LiteralExpression
(500))));
3687
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)
1872
=>
LiteralExpression
(false);
1878
=>
LiteralExpression
(true);
1884
=>
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);