1 interface inheriting from IValueSetFactory
Microsoft.CodeAnalysis.CSharp (1)
Utilities\IValueSetFactory.cs (1)
50internal interface IValueSetFactory<T> : IValueSetFactory
3 implementations of IValueSetFactory
Microsoft.CodeAnalysis.CSharp (3)
Utilities\ValueSetFactory.DecimalValueSetFactory.cs (1)
11private sealed class DecimalValueSetFactory : IValueSetFactory<decimal>, IValueSetFactory
Utilities\ValueSetFactory.NintValueSetFactory.cs (1)
13private sealed class NintValueSetFactory : IValueSetFactory<int>, IValueSetFactory
Utilities\ValueSetFactory.NuintValueSetFactory.cs (1)
13private sealed class NuintValueSetFactory : IValueSetFactory<uint>, IValueSetFactory
56 references to IValueSetFactory
Microsoft.CodeAnalysis.CSharp (56)
Binder\DecisionDagBuilder.cs (2)
713var fac = ValueSetFactory.ForInput(output); 1156IValueSetFactory? valueFac = ValueSetFactory.ForInput(input);
Binder\PatternExplainer.cs (1)
596IValueSet computeRemainingValues(IValueSetFactory fac, ImmutableArray<(BoundDagTest test, bool sense)> constraints)
BoundTree\BoundDecisionDag.cs (1)
193var f = ValueSetFactory.ForType(input.Type);
Lowering\LocalRewriter\LocalRewriter.DecisionDagRewriter.cs (4)
554IValueSetFactory fac = ValueSetFactory.ForInput(input); 562IValueSetFactory fac) 621IValueSetFactory fac) 706private readonly IValueSetFactory _fac;
Utilities\IValueSetFactory.cs (1)
10/// A value set factory, which can be used to create a value set instance. A given instance of <see cref="IValueSetFactory"/>
Utilities\ValueSetFactory.BoolValueSetFactory.cs (6)
24IValueSet IValueSetFactory.AllValues => BoolValueSet.AllValues; 26IValueSet IValueSetFactory.NoValues => BoolValueSet.None; 42IValueSet IValueSetFactory.Random(int expectedSize, Random random) => random.Next(4) switch 51ConstantValue IValueSetFactory.RandomValue(Random random) => ConstantValue.Create(random.NextDouble() < 0.5); 53IValueSet IValueSetFactory.Related(BinaryOperatorKind relation, ConstantValue value) 58bool IValueSetFactory.Related(BinaryOperatorKind relation, ConstantValue left, ConstantValue right)
Utilities\ValueSetFactory.cs (3)
32public static IValueSetFactory? ForSpecialType(SpecialType specialType, bool isNative = false) 56public static IValueSetFactory? ForType(TypeSymbol type) 64public static IValueSetFactory? ForInput(BoundDagTemp input)
Utilities\ValueSetFactory.DecimalValueSetFactory.cs (6)
17IValueSet IValueSetFactory.AllValues => NumericValueSet<decimal>.AllValues(DecimalTC.Instance); 19IValueSet IValueSetFactory.NoValues => NumericValueSet<decimal>.NoValues(DecimalTC.Instance); 23IValueSet IValueSetFactory.Random(int expectedSize, Random random) => _underlying.Random(expectedSize, random); 25ConstantValue IValueSetFactory.RandomValue(Random random) => ConstantValue.Create(DecimalTC.Instance.Random(random)); 27IValueSet IValueSetFactory.Related(BinaryOperatorKind relation, ConstantValue value) => 30bool IValueSetFactory.Related(BinaryOperatorKind relation, ConstantValue left, ConstantValue right) => _underlying.Related(relation, left, right);
Utilities\ValueSetFactory.EnumeratedValueSetFactory.cs (5)
21IValueSet IValueSetFactory.AllValues => EnumeratedValueSet<T>.AllValues(_tc); 23IValueSet IValueSetFactory.NoValues => EnumeratedValueSet<T>.NoValues(_tc); 38IValueSet IValueSetFactory.Related(BinaryOperatorKind relation, ConstantValue value) => 41bool IValueSetFactory.Related(BinaryOperatorKind relation, ConstantValue left, ConstantValue right) 58ConstantValue IValueSetFactory.RandomValue(Random random)
Utilities\ValueSetFactory.FloatingValueSetFactory.cs (6)
20IValueSet IValueSetFactory.AllValues => FloatingValueSet<TFloating>.AllValues(_tc); 22IValueSet IValueSetFactory.NoValues => FloatingValueSet<TFloating>.NoValues(_tc); 27IValueSet IValueSetFactory.Random(int expectedSize, Random random) => 30ConstantValue IValueSetFactory.RandomValue(Random random) 35IValueSet IValueSetFactory.Related(BinaryOperatorKind relation, ConstantValue value) => 40bool IValueSetFactory.Related(BinaryOperatorKind relation, ConstantValue left, ConstantValue right)
Utilities\ValueSetFactory.NintValueSetFactory.cs (6)
19IValueSet IValueSetFactory.AllValues => NintValueSet.AllValues; 21IValueSet IValueSetFactory.NoValues => NintValueSet.NoValues; 32IValueSet IValueSetFactory.Random(int expectedSize, Random random) 41ConstantValue IValueSetFactory.RandomValue(Random random) => ConstantValue.CreateNativeInt(IntTC.DefaultInstance.Random(random)); 43IValueSet IValueSetFactory.Related(BinaryOperatorKind relation, ConstantValue value) 48bool IValueSetFactory.Related(BinaryOperatorKind relation, ConstantValue left, ConstantValue right)
Utilities\ValueSetFactory.NonNegativeIntValueSetFactory.cs (4)
53IValueSet IValueSetFactory.Random(int expectedSize, Random random) => s_underlying.Random(expectedSize, random); 55ConstantValue IValueSetFactory.RandomValue(Random random) => s_underlying.RandomValue(random); 57IValueSet IValueSetFactory.Related(BinaryOperatorKind relation, ConstantValue value) => 60bool IValueSetFactory.Related(BinaryOperatorKind relation, ConstantValue left, ConstantValue right) => s_underlying.Related(relation, left, right);
Utilities\ValueSetFactory.NuintValueSetFactory.cs (6)
19IValueSet IValueSetFactory.AllValues => NuintValueSet.AllValues; 21IValueSet IValueSetFactory.NoValues => NuintValueSet.NoValues; 31IValueSet IValueSetFactory.Random(int expectedSize, Random random) 39ConstantValue IValueSetFactory.RandomValue(Random random) => ConstantValue.CreateNativeUInt(UIntTC.Instance.Random(random)); 41IValueSet IValueSetFactory.Related(BinaryOperatorKind relation, ConstantValue value) 46bool IValueSetFactory.Related(BinaryOperatorKind relation, ConstantValue left, ConstantValue right)
Utilities\ValueSetFactory.NumericValueSetFactory.cs (5)
23IValueSet IValueSetFactory.AllValues => NumericValueSet<T>.AllValues(_tc); 25IValueSet IValueSetFactory.NoValues => NumericValueSet<T>.NoValues(_tc); 52IValueSet IValueSetFactory.Related(BinaryOperatorKind relation, ConstantValue value) => 58ConstantValue IValueSetFactory.RandomValue(Random random) 63bool IValueSetFactory.Related(BinaryOperatorKind relation, ConstantValue left, ConstantValue right)