33 references to Create
Microsoft.CodeAnalysis (5)
Compilation\Expression.cs (1)
16return ConstantValue.Create((long)value);
ConstantValue.cs (1)
375case ConstantValueTypeDiscriminator.Int64: return Create((long)value);
EnumConstantHelper.cs (1)
96offsetValue = ConstantValue.Create((long)(previous + offset));
MetadataReader\MetadataDecoder.cs (1)
1095return ConstantValue.Create(sigReader.ReadInt64());
MetadataReader\PEModule.cs (1)
3447return ConstantValue.Create(reader.ReadInt64());
Microsoft.CodeAnalysis.CSharp (6)
Binder\Binder_Operators.cs (1)
3076return new BoundLiteral(node, ConstantValue.Create(-9223372036854775808), GetSpecialType(SpecialType.System_Int64, diagnostics, node));
Lowering\LocalRewriter\LocalRewriter.DecisionDagRewriter.cs (1)
793cases = node.Cases.SelectAsArray(p => (ConstantValue.Create((long)p.value.Int32Value), p.label));
Lowering\LocalRewriter\LocalRewriter_Literal.cs (2)
112arguments.Add(new BoundLiteral(syntax, ConstantValue.Create((long)value), _compilation.GetSpecialType(SpecialType.System_Int64))); 148arguments.Add(new BoundLiteral(syntax, ConstantValue.Create(constantValue.DateTimeValue.Ticks), _compilation.GetSpecialType(SpecialType.System_Int64)));
Lowering\LocalRewriter\LocalRewriter_UnaryOperator.cs (1)
1082constantOne = ConstantValue.Create(1L);
Utilities\ValueSetFactory.LongTC.cs (1)
55ConstantValue INumericTC<long>.ToConstantValue(long value) => ConstantValue.Create(value);
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (1)
Semantics\ConstantTests.cs (1)
3997int64Const = ConstantValue.Create(unchecked((long)ulong.MaxValue)),
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (12)
Compilation\GetSemanticInfoTests.cs (12)
936EnumOffset(ConstantValue.Create((long)long.MinValue), 1, EnumOverflowKind.NoOverflow, ConstantValue.Create((long)(long.MinValue + 1))); 937EnumOffset(ConstantValue.Create((long)long.MinValue), 2, EnumOverflowKind.NoOverflow, ConstantValue.Create((long)(long.MinValue + 2))); 938EnumOffset(ConstantValue.Create((long)-2), 1, EnumOverflowKind.NoOverflow, ConstantValue.Create((long)(-1))); 939EnumOffset(ConstantValue.Create((long)-2), 3, EnumOverflowKind.NoOverflow, ConstantValue.Create((long)(1))); 940EnumOffset(ConstantValue.Create((long)(long.MaxValue - 3)), 3, EnumOverflowKind.NoOverflow, ConstantValue.Create((long)long.MaxValue)); 941EnumOffset(ConstantValue.Create((long)(long.MaxValue - 3)), 4, EnumOverflowKind.OverflowReport, ConstantValue.Bad); 942EnumOffset(ConstantValue.Create((long)(long.MaxValue - 3)), 5, EnumOverflowKind.OverflowIgnore, ConstantValue.Bad);
Microsoft.CodeAnalysis.ExpressionEvaluator.ExpressionCompiler (1)
PDB\PdbHelpers.cs (1)
97(SpecialType.System_Int64, long longVal) => ConstantValue.Create(longVal),
Microsoft.CodeAnalysis.UnitTests (2)
CorLibTypesTests.cs (2)
161var cv71 = ConstantValue.Create(long.MaxValue); 162var cv72 = ConstantValue.Create(long.MaxValue);
Microsoft.CodeAnalysis.VisualBasic (3)
Lowering\LocalRewriter\LocalRewriter_Constant.vb (2)
97{New BoundLiteral(node.Syntax, ConstantValue.Create(value), decCtorInt64.Parameters(0).Type)}), 175{New BoundLiteral(node.Syntax, ConstantValue.Create(dt.Ticks), dtCtorInt64.Parameters(0).Type)}),
Semantics\CompileTimeCalculations.vb (1)
173Case ConstantValueTypeDiscriminator.Int64 : result = ConstantValue.Create(value)
Microsoft.CodeAnalysis.VisualBasic.Semantic.UnitTests (3)
Semantics\Conversions.vb (1)
104Dim longZero = New BoundLiteral(DirectCast(DirectCast(dummyTree.GetRoot(Nothing), VisualBasicSyntaxNode), VisualBasicSyntaxNode), ConstantValue.Create(0L), m13p(d))
Semantics\OverloadResolution.vb (2)
195Dim longZero As BoundExpression = New BoundLiteral(_syntaxNode, ConstantValue.Create(0L), c1.GetSpecialType(System_Int64)) 197Dim longConst As BoundExpression = New BoundConversion(_syntaxNode, New BoundLiteral(_syntaxNode, ConstantValue.Null, Nothing), ConversionKind.Widening, True, True, ConstantValue.Create(-1L), c1.GetSpecialType(System_Int64), Nothing)