350 references to ConstantValueTypeDiscriminator
Microsoft.CodeAnalysis (349)
CodeGen\ILBuilderEmit.cs (17)
568
ConstantValueTypeDiscriminator
discriminator = value.Discriminator;
572
case
ConstantValueTypeDiscriminator
.Null:
575
case
ConstantValueTypeDiscriminator
.SByte:
578
case
ConstantValueTypeDiscriminator
.Byte:
581
case
ConstantValueTypeDiscriminator
.UInt16:
584
case
ConstantValueTypeDiscriminator
.Char:
587
case
ConstantValueTypeDiscriminator
.Int16:
590
case
ConstantValueTypeDiscriminator
.Int32:
591
case
ConstantValueTypeDiscriminator
.UInt32:
594
case
ConstantValueTypeDiscriminator
.Int64:
595
case
ConstantValueTypeDiscriminator
.UInt64:
598
case
ConstantValueTypeDiscriminator
.NInt:
601
case
ConstantValueTypeDiscriminator
.NUInt:
604
case
ConstantValueTypeDiscriminator
.Single:
607
case
ConstantValueTypeDiscriminator
.Double:
610
case
ConstantValueTypeDiscriminator
.String:
613
case
ConstantValueTypeDiscriminator
.Boolean:
CodeGen\SwitchIntegralJumpTableEmitter.cs (2)
478
case
ConstantValueTypeDiscriminator
.Byte: return value.ByteValue;
479
case
ConstantValueTypeDiscriminator
.UInt16: return value.UInt16Value;
CodeGen\SwitchIntegralJumpTableEmitter.SwitchBucket.cs (2)
207
if (startConstant.Discriminator ==
ConstantValueTypeDiscriminator
.Int64)
212
else if (startConstant.Discriminator ==
ConstantValueTypeDiscriminator
.UInt64)
Compilation\Expression.cs (1)
38
return ConstantValue.Create(1,
ConstantValueTypeDiscriminator
.Int32);
ConstantValue.cs (206)
41
public abstract
ConstantValueTypeDiscriminator
Discriminator { get; }
357
var
discriminator = GetDiscriminator(st);
358
Debug.Assert(discriminator !=
ConstantValueTypeDiscriminator
.Bad);
368
public static ConstantValue Create(object value,
ConstantValueTypeDiscriminator
discriminator)
372
case
ConstantValueTypeDiscriminator
.Null: return Null;
373
case
ConstantValueTypeDiscriminator
.SByte: return Create((sbyte)value);
374
case
ConstantValueTypeDiscriminator
.Byte: return Create((byte)value);
375
case
ConstantValueTypeDiscriminator
.Int16: return Create((short)value);
376
case
ConstantValueTypeDiscriminator
.UInt16: return Create((ushort)value);
377
case
ConstantValueTypeDiscriminator
.Int32: return Create((int)value);
378
case
ConstantValueTypeDiscriminator
.UInt32: return Create((uint)value);
379
case
ConstantValueTypeDiscriminator
.Int64: return Create((long)value);
380
case
ConstantValueTypeDiscriminator
.UInt64: return Create((ulong)value);
381
case
ConstantValueTypeDiscriminator
.NInt: return CreateNativeInt((int)value);
382
case
ConstantValueTypeDiscriminator
.NUInt: return CreateNativeUInt((uint)value);
383
case
ConstantValueTypeDiscriminator
.Char: return Create((char)value);
384
case
ConstantValueTypeDiscriminator
.Boolean: return Create((bool)value);
385
case
ConstantValueTypeDiscriminator
.Single:
390
case
ConstantValueTypeDiscriminator
.Double: return Create((double)value);
391
case
ConstantValueTypeDiscriminator
.Decimal: return Create((decimal)value);
392
case
ConstantValueTypeDiscriminator
.DateTime: return Create((DateTime)value);
393
case
ConstantValueTypeDiscriminator
.String: return Create((string)value);
401
var
discriminator = GetDiscriminator(st);
402
Debug.Assert(discriminator !=
ConstantValueTypeDiscriminator
.Bad);
406
public static ConstantValue Default(
ConstantValueTypeDiscriminator
discriminator)
410
case
ConstantValueTypeDiscriminator
.Bad: return Bad;
412
case
ConstantValueTypeDiscriminator
.SByte: return ConstantValueDefault.SByte;
413
case
ConstantValueTypeDiscriminator
.Byte: return ConstantValueDefault.Byte;
414
case
ConstantValueTypeDiscriminator
.Int16: return ConstantValueDefault.Int16;
415
case
ConstantValueTypeDiscriminator
.UInt16: return ConstantValueDefault.UInt16;
416
case
ConstantValueTypeDiscriminator
.Int32: return ConstantValueDefault.Int32;
417
case
ConstantValueTypeDiscriminator
.UInt32: return ConstantValueDefault.UInt32;
418
case
ConstantValueTypeDiscriminator
.Int64: return ConstantValueDefault.Int64;
419
case
ConstantValueTypeDiscriminator
.UInt64: return ConstantValueDefault.UInt64;
420
case
ConstantValueTypeDiscriminator
.NInt: return ConstantValueDefault.NInt;
421
case
ConstantValueTypeDiscriminator
.NUInt: return ConstantValueDefault.NUInt;
422
case
ConstantValueTypeDiscriminator
.Char: return ConstantValueDefault.Char;
423
case
ConstantValueTypeDiscriminator
.Boolean: return ConstantValueDefault.Boolean;
424
case
ConstantValueTypeDiscriminator
.Single: return ConstantValueDefault.Single;
425
case
ConstantValueTypeDiscriminator
.Double: return ConstantValueDefault.Double;
426
case
ConstantValueTypeDiscriminator
.Decimal: return ConstantValueDefault.Decimal;
427
case
ConstantValueTypeDiscriminator
.DateTime: return ConstantValueDefault.DateTime;
429
case
ConstantValueTypeDiscriminator
.Null:
430
case
ConstantValueTypeDiscriminator
.String: return Null;
436
internal static
ConstantValueTypeDiscriminator
GetDiscriminator(SpecialType st)
440
case SpecialType.System_SByte: return
ConstantValueTypeDiscriminator
.SByte;
441
case SpecialType.System_Byte: return
ConstantValueTypeDiscriminator
.Byte;
442
case SpecialType.System_Int16: return
ConstantValueTypeDiscriminator
.Int16;
443
case SpecialType.System_UInt16: return
ConstantValueTypeDiscriminator
.UInt16;
444
case SpecialType.System_Int32: return
ConstantValueTypeDiscriminator
.Int32;
445
case SpecialType.System_UInt32: return
ConstantValueTypeDiscriminator
.UInt32;
446
case SpecialType.System_Int64: return
ConstantValueTypeDiscriminator
.Int64;
447
case SpecialType.System_UInt64: return
ConstantValueTypeDiscriminator
.UInt64;
448
case SpecialType.System_IntPtr: return
ConstantValueTypeDiscriminator
.NInt;
449
case SpecialType.System_UIntPtr: return
ConstantValueTypeDiscriminator
.NUInt;
450
case SpecialType.System_Char: return
ConstantValueTypeDiscriminator
.Char;
451
case SpecialType.System_Boolean: return
ConstantValueTypeDiscriminator
.Boolean;
452
case SpecialType.System_Single: return
ConstantValueTypeDiscriminator
.Single;
453
case SpecialType.System_Double: return
ConstantValueTypeDiscriminator
.Double;
454
case SpecialType.System_Decimal: return
ConstantValueTypeDiscriminator
.Decimal;
455
case SpecialType.System_DateTime: return
ConstantValueTypeDiscriminator
.DateTime;
456
case SpecialType.System_String: return
ConstantValueTypeDiscriminator
.String;
459
return
ConstantValueTypeDiscriminator
.Bad;
466
ConstantValueTypeDiscriminator
.SByte => "sbyte",
467
ConstantValueTypeDiscriminator
.Byte => "byte",
468
ConstantValueTypeDiscriminator
.Int16 => "short",
469
ConstantValueTypeDiscriminator
.UInt16 => "ushort",
470
ConstantValueTypeDiscriminator
.Int32 => "int",
471
ConstantValueTypeDiscriminator
.NInt => "nint",
472
ConstantValueTypeDiscriminator
.UInt32 => "uint",
473
ConstantValueTypeDiscriminator
.NUInt => "nuint",
474
ConstantValueTypeDiscriminator
.Int64 => "long",
475
ConstantValueTypeDiscriminator
.UInt64 => "ulong",
476
ConstantValueTypeDiscriminator
.Char => "char",
477
ConstantValueTypeDiscriminator
.Boolean => "bool",
478
ConstantValueTypeDiscriminator
.Single => "float",
479
ConstantValueTypeDiscriminator
.Double => "double",
480
ConstantValueTypeDiscriminator
.String => "string",
481
ConstantValueTypeDiscriminator
.Decimal => "decimal",
482
ConstantValueTypeDiscriminator
.DateTime => "DateTime",
483
ConstantValueTypeDiscriminator
.Null or
ConstantValueTypeDiscriminator
.Bad => throw ExceptionUtilities.UnexpectedValue(Discriminator),
488
private static SpecialType GetSpecialType(
ConstantValueTypeDiscriminator
discriminator)
492
case
ConstantValueTypeDiscriminator
.SByte: return SpecialType.System_SByte;
493
case
ConstantValueTypeDiscriminator
.Byte: return SpecialType.System_Byte;
494
case
ConstantValueTypeDiscriminator
.Int16: return SpecialType.System_Int16;
495
case
ConstantValueTypeDiscriminator
.UInt16: return SpecialType.System_UInt16;
496
case
ConstantValueTypeDiscriminator
.Int32: return SpecialType.System_Int32;
497
case
ConstantValueTypeDiscriminator
.UInt32: return SpecialType.System_UInt32;
498
case
ConstantValueTypeDiscriminator
.Int64: return SpecialType.System_Int64;
499
case
ConstantValueTypeDiscriminator
.UInt64: return SpecialType.System_UInt64;
500
case
ConstantValueTypeDiscriminator
.NInt: return SpecialType.System_IntPtr;
501
case
ConstantValueTypeDiscriminator
.NUInt: return SpecialType.System_UIntPtr;
502
case
ConstantValueTypeDiscriminator
.Char: return SpecialType.System_Char;
503
case
ConstantValueTypeDiscriminator
.Boolean: return SpecialType.System_Boolean;
504
case
ConstantValueTypeDiscriminator
.Single: return SpecialType.System_Single;
505
case
ConstantValueTypeDiscriminator
.Double: return SpecialType.System_Double;
506
case
ConstantValueTypeDiscriminator
.Decimal: return SpecialType.System_Decimal;
507
case
ConstantValueTypeDiscriminator
.DateTime: return SpecialType.System_DateTime;
508
case
ConstantValueTypeDiscriminator
.String: return SpecialType.System_String;
519
case
ConstantValueTypeDiscriminator
.Bad: return null;
520
case
ConstantValueTypeDiscriminator
.Null: return null;
521
case
ConstantValueTypeDiscriminator
.SByte: return Boxes.Box(SByteValue);
522
case
ConstantValueTypeDiscriminator
.Byte: return Boxes.Box(ByteValue);
523
case
ConstantValueTypeDiscriminator
.Int16: return Boxes.Box(Int16Value);
524
case
ConstantValueTypeDiscriminator
.UInt16: return Boxes.Box(UInt16Value);
525
case
ConstantValueTypeDiscriminator
.Int32: return Boxes.Box(Int32Value);
526
case
ConstantValueTypeDiscriminator
.UInt32: return Boxes.Box(UInt32Value);
527
case
ConstantValueTypeDiscriminator
.Int64: return Boxes.Box(Int64Value);
528
case
ConstantValueTypeDiscriminator
.UInt64: return Boxes.Box(UInt64Value);
529
case
ConstantValueTypeDiscriminator
.NInt: return Boxes.Box(Int32Value);
530
case
ConstantValueTypeDiscriminator
.NUInt: return Boxes.Box(UInt32Value);
531
case
ConstantValueTypeDiscriminator
.Char: return Boxes.Box(CharValue);
532
case
ConstantValueTypeDiscriminator
.Boolean: return Boxes.Box(BooleanValue);
533
case
ConstantValueTypeDiscriminator
.Single: return Boxes.Box(SingleValue);
534
case
ConstantValueTypeDiscriminator
.Double: return Boxes.Box(DoubleValue);
535
case
ConstantValueTypeDiscriminator
.Decimal: return Boxes.Box(DecimalValue);
536
case
ConstantValueTypeDiscriminator
.DateTime: return DateTimeValue;
537
case
ConstantValueTypeDiscriminator
.String: return StringValue;
543
public static bool IsIntegralType(
ConstantValueTypeDiscriminator
discriminator)
547
case
ConstantValueTypeDiscriminator
.SByte:
548
case
ConstantValueTypeDiscriminator
.Byte:
549
case
ConstantValueTypeDiscriminator
.Int16:
550
case
ConstantValueTypeDiscriminator
.UInt16:
551
case
ConstantValueTypeDiscriminator
.Int32:
552
case
ConstantValueTypeDiscriminator
.UInt32:
553
case
ConstantValueTypeDiscriminator
.Int64:
554
case
ConstantValueTypeDiscriminator
.UInt64:
555
case
ConstantValueTypeDiscriminator
.NInt:
556
case
ConstantValueTypeDiscriminator
.NUInt:
578
case
ConstantValueTypeDiscriminator
.SByte:
580
case
ConstantValueTypeDiscriminator
.Int16:
582
case
ConstantValueTypeDiscriminator
.Int32:
583
case
ConstantValueTypeDiscriminator
.NInt:
585
case
ConstantValueTypeDiscriminator
.Int64:
587
case
ConstantValueTypeDiscriminator
.Single:
589
case
ConstantValueTypeDiscriminator
.Double:
591
case
ConstantValueTypeDiscriminator
.Decimal:
606
case
ConstantValueTypeDiscriminator
.SByte:
607
case
ConstantValueTypeDiscriminator
.Int16:
608
case
ConstantValueTypeDiscriminator
.Int32:
609
case
ConstantValueTypeDiscriminator
.Int64:
610
case
ConstantValueTypeDiscriminator
.Single:
611
case
ConstantValueTypeDiscriminator
.Double:
612
case
ConstantValueTypeDiscriminator
.Decimal:
613
case
ConstantValueTypeDiscriminator
.Byte:
614
case
ConstantValueTypeDiscriminator
.UInt16:
615
case
ConstantValueTypeDiscriminator
.UInt32:
616
case
ConstantValueTypeDiscriminator
.UInt64:
617
case
ConstantValueTypeDiscriminator
.NInt:
618
case
ConstantValueTypeDiscriminator
.NUInt:
627
public static bool IsUnsignedIntegralType(
ConstantValueTypeDiscriminator
discriminator)
631
case
ConstantValueTypeDiscriminator
.Byte:
632
case
ConstantValueTypeDiscriminator
.UInt16:
633
case
ConstantValueTypeDiscriminator
.UInt32:
634
case
ConstantValueTypeDiscriminator
.UInt64:
635
case
ConstantValueTypeDiscriminator
.NUInt:
651
public static bool IsBooleanType(
ConstantValueTypeDiscriminator
discriminator)
653
return discriminator ==
ConstantValueTypeDiscriminator
.Boolean;
660
return this.Discriminator ==
ConstantValueTypeDiscriminator
.Boolean;
664
public static bool IsCharType(
ConstantValueTypeDiscriminator
discriminator)
666
return discriminator ==
ConstantValueTypeDiscriminator
.Char;
673
return this.Discriminator ==
ConstantValueTypeDiscriminator
.Char;
677
public static bool IsStringType(
ConstantValueTypeDiscriminator
discriminator)
679
return discriminator ==
ConstantValueTypeDiscriminator
.String;
687
return this.Discriminator ==
ConstantValueTypeDiscriminator
.String;
691
public static bool IsDecimalType(
ConstantValueTypeDiscriminator
discriminator)
693
return discriminator ==
ConstantValueTypeDiscriminator
.Decimal;
700
return this.Discriminator ==
ConstantValueTypeDiscriminator
.Decimal;
704
public static bool IsDateTimeType(
ConstantValueTypeDiscriminator
discriminator)
706
return discriminator ==
ConstantValueTypeDiscriminator
.DateTime;
713
return this.Discriminator ==
ConstantValueTypeDiscriminator
.DateTime;
717
public static bool IsFloatingType(
ConstantValueTypeDiscriminator
discriminator)
719
return discriminator ==
ConstantValueTypeDiscriminator
.Double ||
720
discriminator ==
ConstantValueTypeDiscriminator
.Single;
727
return this.Discriminator ==
ConstantValueTypeDiscriminator
.Double ||
728
this.Discriminator ==
ConstantValueTypeDiscriminator
.Single;
736
return this.Discriminator ==
ConstantValueTypeDiscriminator
.Bad;
760
case
ConstantValueTypeDiscriminator
.Boolean:
764
case
ConstantValueTypeDiscriminator
.SByte:
768
case
ConstantValueTypeDiscriminator
.Byte:
772
case
ConstantValueTypeDiscriminator
.Char:
773
case
ConstantValueTypeDiscriminator
.Int16:
777
case
ConstantValueTypeDiscriminator
.UInt16:
781
case
ConstantValueTypeDiscriminator
.Single:
785
case
ConstantValueTypeDiscriminator
.Int32:
789
case
ConstantValueTypeDiscriminator
.UInt32:
793
case
ConstantValueTypeDiscriminator
.Double:
797
case
ConstantValueTypeDiscriminator
.Int64:
801
case
ConstantValueTypeDiscriminator
.UInt64:
819
ConstantValueTypeDiscriminator
.SByte => SByteValue.ToString(provider),
820
ConstantValueTypeDiscriminator
.Byte => ByteValue.ToString(provider),
821
ConstantValueTypeDiscriminator
.Int16 => Int16Value.ToString(provider),
822
ConstantValueTypeDiscriminator
.UInt16 => UInt16Value.ToString(provider),
823
ConstantValueTypeDiscriminator
.NInt or
ConstantValueTypeDiscriminator
.Int32 => Int32Value.ToString(provider),
824
ConstantValueTypeDiscriminator
.NUInt or
ConstantValueTypeDiscriminator
.UInt32 => UInt32Value.ToString(provider),
825
ConstantValueTypeDiscriminator
.UInt64 => UInt64Value.ToString(provider),
826
ConstantValueTypeDiscriminator
.Int64 => Int64Value.ToString(provider),
827
ConstantValueTypeDiscriminator
.Char => CharValue.ToString(provider),
828
ConstantValueTypeDiscriminator
.Boolean => BooleanValue.ToString(provider),
829
ConstantValueTypeDiscriminator
.Single => SingleValue.ToString(provider),
830
ConstantValueTypeDiscriminator
.Double => DoubleValue.ToString(provider),
831
ConstantValueTypeDiscriminator
.Decimal => DecimalValue.ToString(provider),
832
ConstantValueTypeDiscriminator
.DateTime => DateTimeValue.ToString(provider),
ConstantValueSpecialized.cs (59)
34
public override
ConstantValueTypeDiscriminator
Discriminator
38
return
ConstantValueTypeDiscriminator
.Bad;
75
public override
ConstantValueTypeDiscriminator
Discriminator
79
return
ConstantValueTypeDiscriminator
.Null;
159
public override
ConstantValueTypeDiscriminator
Discriminator
163
return
ConstantValueTypeDiscriminator
.String;
238
public override
ConstantValueTypeDiscriminator
Discriminator
242
return
ConstantValueTypeDiscriminator
.Decimal;
279
public override
ConstantValueTypeDiscriminator
Discriminator
283
return
ConstantValueTypeDiscriminator
.DateTime;
315
private readonly
ConstantValueTypeDiscriminator
_discriminator;
317
public ConstantValueDiscriminated(
ConstantValueTypeDiscriminator
discriminator)
322
public override
ConstantValueTypeDiscriminator
Discriminator
339
public static readonly ConstantValueDefault SByte = new ConstantValueDefault(
ConstantValueTypeDiscriminator
.SByte);
340
public static readonly ConstantValueDefault Byte = new ConstantValueDefault(
ConstantValueTypeDiscriminator
.Byte);
341
public static readonly ConstantValueDefault Int16 = new ConstantValueDefault(
ConstantValueTypeDiscriminator
.Int16);
342
public static readonly ConstantValueDefault UInt16 = new ConstantValueDefault(
ConstantValueTypeDiscriminator
.UInt16);
343
public static readonly ConstantValueDefault Int32 = new ConstantValueDefault(
ConstantValueTypeDiscriminator
.Int32);
344
public static readonly ConstantValueDefault UInt32 = new ConstantValueDefault(
ConstantValueTypeDiscriminator
.UInt32);
345
public static readonly ConstantValueDefault Int64 = new ConstantValueDefault(
ConstantValueTypeDiscriminator
.Int64);
346
public static readonly ConstantValueDefault UInt64 = new ConstantValueDefault(
ConstantValueTypeDiscriminator
.UInt64);
347
public static readonly ConstantValueDefault NInt = new ConstantValueDefault(
ConstantValueTypeDiscriminator
.NInt);
348
public static readonly ConstantValueDefault NUInt = new ConstantValueDefault(
ConstantValueTypeDiscriminator
.NUInt);
349
public static readonly ConstantValueDefault Char = new ConstantValueDefault(
ConstantValueTypeDiscriminator
.Char);
353
public static readonly ConstantValueDefault DateTime = new ConstantValueDefault(
ConstantValueTypeDiscriminator
.DateTime);
354
public static readonly ConstantValueDefault Boolean = new ConstantValueDefault(
ConstantValueTypeDiscriminator
.Boolean);
356
protected ConstantValueDefault(
ConstantValueTypeDiscriminator
discriminator)
450
: base(
ConstantValueTypeDiscriminator
.Decimal)
473
: base(
ConstantValueTypeDiscriminator
.Double)
496
: base(
ConstantValueTypeDiscriminator
.Single)
518
public static readonly ConstantValueOne SByte = new ConstantValueOne(
ConstantValueTypeDiscriminator
.SByte);
519
public static readonly ConstantValueOne Byte = new ConstantValueOne(
ConstantValueTypeDiscriminator
.Byte);
520
public static readonly ConstantValueOne Int16 = new ConstantValueOne(
ConstantValueTypeDiscriminator
.Int16);
521
public static readonly ConstantValueOne UInt16 = new ConstantValueOne(
ConstantValueTypeDiscriminator
.UInt16);
522
public static readonly ConstantValueOne Int32 = new ConstantValueOne(
ConstantValueTypeDiscriminator
.Int32);
523
public static readonly ConstantValueOne UInt32 = new ConstantValueOne(
ConstantValueTypeDiscriminator
.UInt32);
524
public static readonly ConstantValueOne Int64 = new ConstantValueOne(
ConstantValueTypeDiscriminator
.Int64);
525
public static readonly ConstantValueOne UInt64 = new ConstantValueOne(
ConstantValueTypeDiscriminator
.UInt64);
526
public static readonly ConstantValueOne NInt = new ConstantValueOne(
ConstantValueTypeDiscriminator
.NInt);
527
public static readonly ConstantValueOne NUInt = new ConstantValueOne(
ConstantValueTypeDiscriminator
.NUInt);
528
public static readonly ConstantValueOne Single = new ConstantValueOne(
ConstantValueTypeDiscriminator
.Single);
529
public static readonly ConstantValueOne Double = new ConstantValueOne(
ConstantValueTypeDiscriminator
.Double);
531
public static readonly ConstantValueOne Boolean = new ConstantValueOne(
ConstantValueTypeDiscriminator
.Boolean);
532
public static readonly ConstantValueOne Char = new ConstantValueOne(
ConstantValueTypeDiscriminator
.Char);
534
protected ConstantValueOne(
ConstantValueTypeDiscriminator
discriminator)
666
: base(
ConstantValueTypeDiscriminator
.Decimal)
691
: base(
ConstantValueTypeDiscriminator
.SByte)
697
: base(
ConstantValueTypeDiscriminator
.Byte)
734
: base(
ConstantValueTypeDiscriminator
.Int16)
740
: base(
ConstantValueTypeDiscriminator
.UInt16)
746
: base(
ConstantValueTypeDiscriminator
.Char)
791
: base(
ConstantValueTypeDiscriminator
.Int32)
797
: base(
ConstantValueTypeDiscriminator
.UInt32)
834
: base(
ConstantValueTypeDiscriminator
.Int64)
840
: base(
ConstantValueTypeDiscriminator
.UInt64)
878
: base(
ConstantValueTypeDiscriminator
.NInt)
884
: base(
ConstantValueTypeDiscriminator
.NUInt)
921
: base(
ConstantValueTypeDiscriminator
.Double)
959
: base(
ConstantValueTypeDiscriminator
.Single)
CryptographicHashProvider.cs (5)
244
case
ConstantValueTypeDiscriminator
.Null:
247
case
ConstantValueTypeDiscriminator
.String:
250
case
ConstantValueTypeDiscriminator
.NInt:
253
case
ConstantValueTypeDiscriminator
.NUInt:
256
case
ConstantValueTypeDiscriminator
.Decimal:
EnumConstantHelper.cs (8)
30
case
ConstantValueTypeDiscriminator
.SByte:
40
case
ConstantValueTypeDiscriminator
.Byte:
50
case
ConstantValueTypeDiscriminator
.Int16:
60
case
ConstantValueTypeDiscriminator
.UInt16:
70
case
ConstantValueTypeDiscriminator
.Int32:
80
case
ConstantValueTypeDiscriminator
.UInt32:
90
case
ConstantValueTypeDiscriminator
.Int64:
100
case
ConstantValueTypeDiscriminator
.UInt64:
Operations\ControlFlowGraphBuilder.cs (1)
5089
Debug.Assert(value.Discriminator !=
ConstantValueTypeDiscriminator
.Bad);
PrimitiveTypeCodeExtensions.cs (14)
70
public static
ConstantValueTypeDiscriminator
GetConstantValueTypeDiscriminator(this Cci.PrimitiveTypeCode type)
74
case Cci.PrimitiveTypeCode.Int8: return
ConstantValueTypeDiscriminator
.SByte;
75
case Cci.PrimitiveTypeCode.UInt8: return
ConstantValueTypeDiscriminator
.Byte;
76
case Cci.PrimitiveTypeCode.Int16: return
ConstantValueTypeDiscriminator
.Int16;
77
case Cci.PrimitiveTypeCode.UInt16: return
ConstantValueTypeDiscriminator
.UInt16;
78
case Cci.PrimitiveTypeCode.Int32: return
ConstantValueTypeDiscriminator
.Int32;
79
case Cci.PrimitiveTypeCode.UInt32: return
ConstantValueTypeDiscriminator
.UInt32;
80
case Cci.PrimitiveTypeCode.Int64: return
ConstantValueTypeDiscriminator
.Int64;
81
case Cci.PrimitiveTypeCode.UInt64: return
ConstantValueTypeDiscriminator
.UInt64;
82
case Cci.PrimitiveTypeCode.Char: return
ConstantValueTypeDiscriminator
.Char;
83
case Cci.PrimitiveTypeCode.Boolean: return
ConstantValueTypeDiscriminator
.Boolean;
84
case Cci.PrimitiveTypeCode.Float32: return
ConstantValueTypeDiscriminator
.Single;
85
case Cci.PrimitiveTypeCode.Float64: return
ConstantValueTypeDiscriminator
.Double;
86
case Cci.PrimitiveTypeCode.String: return
ConstantValueTypeDiscriminator
.String;
SwitchConstantValueHelper.cs (34)
21
case
ConstantValueTypeDiscriminator
.Null:
22
case
ConstantValueTypeDiscriminator
.SByte:
23
case
ConstantValueTypeDiscriminator
.Byte:
24
case
ConstantValueTypeDiscriminator
.Int16:
25
case
ConstantValueTypeDiscriminator
.UInt16:
26
case
ConstantValueTypeDiscriminator
.Int32:
27
case
ConstantValueTypeDiscriminator
.UInt32:
28
case
ConstantValueTypeDiscriminator
.Int64:
29
case
ConstantValueTypeDiscriminator
.UInt64:
30
case
ConstantValueTypeDiscriminator
.Char:
31
case
ConstantValueTypeDiscriminator
.Boolean:
32
case
ConstantValueTypeDiscriminator
.String:
74
case
ConstantValueTypeDiscriminator
.SByte:
75
case
ConstantValueTypeDiscriminator
.Int16:
76
case
ConstantValueTypeDiscriminator
.Int32:
77
case
ConstantValueTypeDiscriminator
.Int64:
80
case
ConstantValueTypeDiscriminator
.Boolean:
81
case
ConstantValueTypeDiscriminator
.Byte:
82
case
ConstantValueTypeDiscriminator
.UInt16:
83
case
ConstantValueTypeDiscriminator
.UInt32:
84
case
ConstantValueTypeDiscriminator
.UInt64:
85
case
ConstantValueTypeDiscriminator
.Char:
88
case
ConstantValueTypeDiscriminator
.String:
137
case
ConstantValueTypeDiscriminator
.SByte:
138
case
ConstantValueTypeDiscriminator
.Int16:
139
case
ConstantValueTypeDiscriminator
.Int32:
140
case
ConstantValueTypeDiscriminator
.Int64:
143
case
ConstantValueTypeDiscriminator
.Boolean:
144
case
ConstantValueTypeDiscriminator
.Byte:
145
case
ConstantValueTypeDiscriminator
.UInt16:
146
case
ConstantValueTypeDiscriminator
.UInt32:
147
case
ConstantValueTypeDiscriminator
.UInt64:
148
case
ConstantValueTypeDiscriminator
.Char:
151
case
ConstantValueTypeDiscriminator
.String:
Microsoft.CodeAnalysis.CSharp (1)
Symbols\Source\SourceComplexParameterSymbol.cs (1)
985
var
constantValueDiscriminator = ConstantValue.GetDiscriminator(specialType);