28 references to Create
Microsoft.CodeAnalysis (5)
Compilation\Expression.cs (1)
16return ConstantValue.Create((long)value);
ConstantValue.cs (1)
379case 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)
3728return ConstantValue.Create(reader.ReadInt64());
Microsoft.CodeAnalysis.CSharp (6)
Binder\Binder_Operators.cs (1)
4546return 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)
1246constantOne = ConstantValue.Create(1L);
Utilities\ValueSetFactory.LongTC.cs (1)
57ConstantValue INumericTC<long>.ToConstantValue(long value) => ConstantValue.Create(value);
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (1)
Semantics\ConstantTests.cs (1)
4016int64Const = 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 (3)
CorLibTypesTests.cs (3)
149Assert.True(ConstantValue.Create((long)1).IsOne); 205var cv71 = ConstantValue.Create(long.MaxValue); 206var cv72 = ConstantValue.Create(long.MaxValue);