6 overrides of Discriminator
Microsoft.CodeAnalysis (6)
ConstantValueSpecialized.cs (6)
34public override ConstantValueTypeDiscriminator Discriminator 75public override ConstantValueTypeDiscriminator Discriminator 159public override ConstantValueTypeDiscriminator Discriminator 238public override ConstantValueTypeDiscriminator Discriminator 279public override ConstantValueTypeDiscriminator Discriminator 322public override ConstantValueTypeDiscriminator Discriminator
44 references to Discriminator
Microsoft.CodeAnalysis (44)
CodeGen\ILBuilderEmit.cs (1)
568ConstantValueTypeDiscriminator discriminator = value.Discriminator;
CodeGen\SwitchIntegralJumpTableEmitter.cs (1)
476switch (value.Discriminator)
CodeGen\SwitchIntegralJumpTableEmitter.SwitchBucket.cs (4)
184Debug.Assert(endConstant.Discriminator == startConstant.Discriminator); 207if (startConstant.Discriminator == ConstantValueTypeDiscriminator.Int64) 212else if (startConstant.Discriminator == ConstantValueTypeDiscriminator.UInt64)
ConstantValue.cs (25)
464return Discriminator switch 483ConstantValueTypeDiscriminator.Null or ConstantValueTypeDiscriminator.Bad => throw ExceptionUtilities.UnexpectedValue(Discriminator), 484_ => throw ExceptionUtilities.UnexpectedValue(Discriminator) 517switch (this.Discriminator) 538default: throw ExceptionUtilities.UnexpectedValue(this.Discriminator); 568return IsIntegralType(this.Discriminator); 576switch (this.Discriminator) 604switch (this.Discriminator) 647return IsUnsignedIntegralType(this.Discriminator); 660return this.Discriminator == ConstantValueTypeDiscriminator.Boolean; 673return this.Discriminator == ConstantValueTypeDiscriminator.Char; 687return this.Discriminator == ConstantValueTypeDiscriminator.String; 700return this.Discriminator == ConstantValueTypeDiscriminator.Decimal; 713return this.Discriminator == ConstantValueTypeDiscriminator.DateTime; 727return this.Discriminator == ConstantValueTypeDiscriminator.Double || 728this.Discriminator == ConstantValueTypeDiscriminator.Single; 736return this.Discriminator == ConstantValueTypeDiscriminator.Bad; 758switch (this.Discriminator) 805default: throw ExceptionUtilities.UnexpectedValue(this.Discriminator); 812return String.Format("{0}({1}: {2})", this.GetType().Name, valueToDisplay, this.Discriminator); 817return Discriminator switch 833_ => throw ExceptionUtilities.UnexpectedValue(Discriminator) 876return this.Discriminator == other.Discriminator; 901return ((int)this.Discriminator).GetHashCode();
ConstantValueSpecialized.cs (4)
466return this.Discriminator == other.Discriminator && other.DecimalValue == 0m; 489return this.Discriminator == other.Discriminator && other.DoubleValue == 0; 512return this.Discriminator == other.Discriminator && other.SingleValue == 0; 682return this.Discriminator == other.Discriminator && other.DecimalValue == 1m;
CryptographicHashProvider.cs (2)
242switch (constant.Discriminator) 270throw ExceptionUtilities.UnexpectedValue(constant.Discriminator);
EnumConstantHelper.cs (2)
28switch (constantValue.Discriminator) 111throw ExceptionUtilities.UnexpectedValue(constantValue.Discriminator);
Operations\ControlFlowGraphBuilder.cs (1)
5089Debug.Assert(value.Discriminator != ConstantValueTypeDiscriminator.Bad);
SwitchConstantValueHelper.cs (4)
19switch (constant.Discriminator) 72switch (first.Discriminator) 93throw ExceptionUtilities.UnexpectedValue(first.Discriminator); 135switch (constant.Discriminator)