54 references to Literal
Microsoft.AspNetCore.Mvc.Api.Analyzers (1)
AddResponseTypeAttributeCodeFixAction.cs (1)
243return SyntaxFactory.LiteralExpression(SyntaxKind.NumericLiteralExpression, SyntaxFactory.Literal(statusCode));
Microsoft.CodeAnalysis.CSharp.Features (1)
ConvertLinq\CSharpConvertLinqQueryToForEachProvider.cs (1)
320LiteralExpression(SyntaxKind.NumericLiteralExpression, Literal(0)), // count = 0
Microsoft.CodeAnalysis.CSharp.Features.UnitTests (1)
EditAndContinue\SyntaxComparerTests.cs (1)
23=> SyntaxFactory.LiteralExpression(SyntaxKind.NumericLiteralExpression, SyntaxFactory.Literal(n));
Microsoft.CodeAnalysis.CSharp.IOperation.UnitTests (1)
IOperation\IOperationTests_IVariableDeclaration.cs (1)
1217.WithSizes(SyntaxFactory.SeparatedList<ExpressionSyntax>(SyntaxFactory.NodeOrTokenList(SyntaxFactory.LiteralExpression(SyntaxKind.NumericLiteralExpression, SyntaxFactory.Literal(10)))));
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (6)
Semantics\NullableReferenceTypesTests.cs (1)
7775new[] { SyntaxFactory.LiteralExpression(SyntaxKind.NumericLiteralExpression, SyntaxFactory.Literal(3)) }),
Semantics\SyntaxTreeRootTests.cs (5)
50var tree = SyntaxFactory.SyntaxTree(SyntaxFactory.FromClause("Nay", SyntaxFactory.LiteralExpression(SyntaxKind.NumericLiteralExpression, SyntaxFactory.Literal(823)))); 72SyntaxFactory.LetClause("Blah", SyntaxFactory.LiteralExpression(SyntaxKind.NumericLiteralExpression, SyntaxFactory.Literal(54))), 80var node = SyntaxFactory.LiteralExpression(SyntaxKind.NumericLiteralExpression, SyntaxFactory.Literal(3)); 88var node = SyntaxFactory.LiteralExpression(SyntaxKind.NumericLiteralExpression, SyntaxFactory.Literal(3)); 97SyntaxFactory.LiteralExpression(SyntaxKind.NumericLiteralExpression, SyntaxFactory.Literal(3)));
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (9)
Syntax\SyntaxFactoryTests.cs (3)
185SyntaxFactory.Literal(123); //numeric literal 590var lambda = SyntaxFactory.ParenthesizedLambdaExpression(body: SyntaxFactory.LiteralExpression(SyntaxKind.NumericLiteralExpression, SyntaxFactory.Literal(1))); 596body: SyntaxFactory.LiteralExpression(SyntaxKind.NumericLiteralExpression, SyntaxFactory.Literal(1)));
Syntax\SyntaxNormalizerTests.cs (6)
3637SyntaxFactory.Literal(1), 3661SyntaxFactory.LineDirectivePosition(SyntaxFactory.Literal(1), SyntaxFactory.Literal(2)), 3663SyntaxFactory.LineDirectivePosition(SyntaxFactory.Literal(3), SyntaxFactory.Literal(4)), 3664SyntaxFactory.Literal(5),
Microsoft.CodeAnalysis.CSharp.Workspaces.UnitTests (5)
CodeGeneration\SyntaxGeneratorTests.cs (5)
1268Literal(0)))) 1349Literal(0)))) 1373Literal(0)))) 1399Literal(0)))) 1430Literal(0))))
Microsoft.Interop.ComInterfaceGenerator (7)
ComClassGenerator.cs (2)
114Literal(implementedInterfaces.Length))))))), 175Literal(implementedInterfaces.Length)))),
ComInterfaceGenerator.cs (2)
608LiteralExpression(SyntaxKind.NumericLiteralExpression, Literal(interfaceMethods.InheritedMethods.Count() + 3)))))))); 689literals[i] = ExpressionElement(LiteralExpression(SyntaxKind.NumericLiteralExpression, Literal(bytes[i])));
Marshallers\ManagedHResultExceptionGeneratorResolver.cs (1)
84Literal(0))))
VirtualMethodPointerStubGenerator.cs (2)
75Argument(LiteralExpression(SyntaxKind.NumericLiteralExpression, Literal(methodStub.VtableIndexData.Index)))), 250.AddArgumentListArguments(Argument(LiteralExpression(SyntaxKind.NumericLiteralExpression, Literal(method.VtableIndexData.Index)))),
Microsoft.Interop.JavaScript.JSImportGenerator (7)
JSExportCodeGenerator.cs (3)
155Argument(LiteralExpression(SyntaxKind.NumericLiteralExpression, Literal(_signatureContext.TypesHash))), 187Argument(LiteralExpression(SyntaxKind.NumericLiteralExpression, Literal(0))))))))))))); 193Argument(LiteralExpression(SyntaxKind.NumericLiteralExpression, Literal(1)))))))))))));
JSImportCodeGenerator.cs (3)
175LiteralExpression(SyntaxKind.NumericLiteralExpression, Literal(2 + _marshallers.NativeParameterMarshallers.Length))))))))))))); 181Argument(LiteralExpression(SyntaxKind.NumericLiteralExpression, Literal(0))))))))))))); 191Argument(LiteralExpression(SyntaxKind.NumericLiteralExpression, Literal(1)))))))))))));
Marshaling\BaseJSGenerator.cs (1)
56Argument(LiteralExpression(SyntaxKind.NumericLiteralExpression, Literal(TypeInfo.ManagedIndex + 2))))))))))));
Microsoft.Interop.LibraryImportGenerator (1)
LibraryImportGenerator.cs (1)
154Literal((int)defaultDllImportSearchPathsAttribute.ConstructorArguments[0].Value!))))));
Microsoft.Interop.LibraryImportGenerator.Downlevel (1)
DownlevelLibraryImportGenerator.cs (1)
100Literal((int)defaultDllImportSearchPathsAttribute.ConstructorArguments[0].Value!))))));
Microsoft.Interop.SourceGeneration (14)
MarshalAsParser.cs (5)
51Literal((int)UnmanagedType)))) 80Literal((int)UnmanagedType)))) 90Literal((int)ArraySubType)))) 101Literal(sizeParamIndex.ConstSize))) 109Literal(paramIndex)))
Marshalling\BoolMarshaller.cs (3)
70LiteralExpression(SyntaxKind.NumericLiteralExpression, Literal(_trueValue)), 71LiteralExpression(SyntaxKind.NumericLiteralExpression, Literal(_falseValue))))))); 90LiteralExpression(SyntaxKind.NumericLiteralExpression, Literal(comparand)))));
Marshalling\ElementsMarshalling.cs (2)
93return LiteralExpression(SyntaxKind.NumericLiteralExpression, Literal(size)); 617EqualsValueClause(LiteralExpression(SyntaxKind.NumericLiteralExpression, Literal(0)))))))
Marshalling\MarshallerHelpers.cs (1)
49Argument(LiteralExpression(SyntaxKind.NumericLiteralExpression, Literal(errorCode))));
Marshalling\StatelessMarshallingStrategy.cs (1)
592LiteralExpression(SyntaxKind.NumericLiteralExpression, Literal(0))));
Utils\SyntaxFactoryExtensions.cs (2)
97public static LiteralExpressionSyntax IntLiteral(int number) => LiteralExpression(SyntaxKind.NumericLiteralExpression, Literal(number)); 131Literal(0)))))))