25 references to Create
Microsoft.CodeAnalysis (5)
Compilation\Expression.cs (1)
26return ConstantValue.Create((sbyte)value);
ConstantValue.cs (1)
373case ConstantValueTypeDiscriminator.SByte: return Create((sbyte)value);
EnumConstantHelper.cs (1)
36offsetValue = ConstantValue.Create((sbyte)(previous + offset));
MetadataReader\MetadataDecoder.cs (1)
1071return ConstantValue.Create(sigReader.ReadSByte());
MetadataReader\PEModule.cs (1)
3719return ConstantValue.Create(reader.ReadSByte());
Microsoft.CodeAnalysis.CSharp (1)
Utilities\ValueSetFactory.SByteTC.cs (1)
56public ConstantValue ToConstantValue(sbyte value) => ConstantValue.Create(value);
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (1)
Semantics\ConstantTests.cs (1)
4009sbyteConst = ConstantValue.Create(unchecked((sbyte)byte.MaxValue)),
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (12)
Compilation\GetSemanticInfoTests.cs (12)
888EnumOffset(ConstantValue.Create((sbyte)sbyte.MinValue), 1, EnumOverflowKind.NoOverflow, ConstantValue.Create((sbyte)(sbyte.MinValue + 1))); 889EnumOffset(ConstantValue.Create((sbyte)sbyte.MinValue), 2, EnumOverflowKind.NoOverflow, ConstantValue.Create((sbyte)(sbyte.MinValue + 2))); 890EnumOffset(ConstantValue.Create((sbyte)-2), 1, EnumOverflowKind.NoOverflow, ConstantValue.Create((sbyte)(-1))); 891EnumOffset(ConstantValue.Create((sbyte)-2), 3, EnumOverflowKind.NoOverflow, ConstantValue.Create((sbyte)(1))); 892EnumOffset(ConstantValue.Create((sbyte)(sbyte.MaxValue - 3)), 3, EnumOverflowKind.NoOverflow, ConstantValue.Create((sbyte)sbyte.MaxValue)); 893EnumOffset(ConstantValue.Create((sbyte)(sbyte.MaxValue - 3)), 4, EnumOverflowKind.OverflowReport, ConstantValue.Bad); 894EnumOffset(ConstantValue.Create((sbyte)(sbyte.MaxValue - 3)), 5, EnumOverflowKind.OverflowIgnore, ConstantValue.Bad);
Microsoft.CodeAnalysis.ExpressionEvaluator.ExpressionCompiler (1)
PDB\PdbHelpers.cs (1)
91(SpecialType.System_SByte, short shortVal) when unchecked((sbyte)shortVal) == shortVal => ConstantValue.Create((sbyte)shortVal),
Microsoft.CodeAnalysis.UnitTests (5)
CorLibTypesTests.cs (5)
140Assert.True(ConstantValue.Create((sbyte)1).IsOne); 159var cv1 = ConstantValue.Create((sbyte)-1); 181var cv11 = ConstantValue.Create((sbyte)-1); 182var cv12 = ConstantValue.Create((sbyte)-1); 255cv = ConstantValue.Create((sbyte)-128);