20 references to Create
Microsoft.CodeAnalysis (5)
Compilation\Expression.cs (1)
28return ConstantValue.Create((byte)value);
ConstantValue.cs (1)
374case ConstantValueTypeDiscriminator.Byte: return Create((byte)value);
EnumConstantHelper.cs (1)
46offsetValue = ConstantValue.Create((byte)(previous + offset));
MetadataReader\MetadataDecoder.cs (1)
1075return ConstantValue.Create(sigReader.ReadByte());
MetadataReader\PEModule.cs (1)
3731return ConstantValue.Create(reader.ReadByte());
Microsoft.CodeAnalysis.CSharp (3)
Lowering\LocalRewriter\LocalRewriter_Literal.cs (1)
128arguments.Add(new BoundLiteral(syntax, ConstantValue.Create(scale), _compilation.GetSpecialType(SpecialType.System_Byte)));
Lowering\SyntheticBoundNodeFactory.cs (1)
723return new BoundLiteral(Syntax, ConstantValue.Create(value), SpecialType(Microsoft.CodeAnalysis.SpecialType.System_Byte)) { WasCompilerGenerated = true };
Utilities\ValueSetFactory.ByteTC.cs (1)
57ConstantValue INumericTC<byte>.ToConstantValue(byte value) => ConstantValue.Create(value);
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (8)
Compilation\GetSemanticInfoTests.cs (8)
897EnumOffset(ConstantValue.Create((byte)0), 1, EnumOverflowKind.NoOverflow, ConstantValue.Create((byte)1)); 898EnumOffset(ConstantValue.Create((byte)0), 2, EnumOverflowKind.NoOverflow, ConstantValue.Create((byte)2)); 899EnumOffset(ConstantValue.Create((byte)(byte.MaxValue - 3)), 3, EnumOverflowKind.NoOverflow, ConstantValue.Create((byte)byte.MaxValue)); 900EnumOffset(ConstantValue.Create((byte)(byte.MaxValue - 3)), 4, EnumOverflowKind.OverflowReport, ConstantValue.Bad); 901EnumOffset(ConstantValue.Create((byte)(byte.MaxValue - 3)), 5, EnumOverflowKind.OverflowIgnore, ConstantValue.Bad);
Microsoft.CodeAnalysis.ExpressionEvaluator.ExpressionCompiler (1)
PDB\PdbHelpers.cs (1)
90(SpecialType.System_Byte, short shortVal) when unchecked((byte)shortVal) == shortVal => ConstantValue.Create((byte)shortVal),
Microsoft.CodeAnalysis.UnitTests (3)
CorLibTypesTests.cs (3)
139Assert.True(ConstantValue.Create((byte)1).IsOne); 185var cv21 = ConstantValue.Create((byte)255); 186var cv22 = ConstantValue.Create((byte)255);