22 references to Create
Microsoft.CodeAnalysis (5)
Compilation\Expression.cs (1)
28return ConstantValue.Create((byte)value);
ConstantValue.cs (1)
370case 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)
3450return 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)
672return new BoundLiteral(Syntax, ConstantValue.Create(value), SpecialType(Microsoft.CodeAnalysis.SpecialType.System_Byte)) { WasCompilerGenerated = true };
Utilities\ValueSetFactory.ByteTC.cs (1)
55ConstantValue INumericTC<byte>.ToConstantValue(byte value) => ConstantValue.Create(value);
Microsoft.CodeAnalysis.CSharp.ExpressionEvaluator.ExpressionCompiler (1)
Rewriters\LocalDeclarationRewriter.cs (1)
156initializerExprs.Add(new BoundLiteral(syntax, ConstantValue.Create(b), byteType));
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 (2)
CorLibTypesTests.cs (2)
141var cv21 = ConstantValue.Create((byte)255); 142var cv22 = ConstantValue.Create((byte)255);
Microsoft.CodeAnalysis.VisualBasic (2)
Lowering\LocalRewriter\LocalRewriter_Constant.vb (1)
130New BoundLiteral(node.Syntax, ConstantValue.Create(scale), decCtor.Parameters(4).Type)),
Semantics\CompileTimeCalculations.vb (1)
168Case ConstantValueTypeDiscriminator.Byte : result = ConstantValue.Create(UncheckedCByte(value))