1 write to _membersIncludedOrExcluded
Microsoft.CodeAnalysis.CSharp (1)
Utilities\ValueSetFactory.EnumeratedValueSet.cs (1)
35
(this._included, this.
_membersIncludedOrExcluded
, this._tc) = (included, membersIncludedOrExcluded, tc);
32 references to _membersIncludedOrExcluded
Microsoft.CodeAnalysis.CSharp (32)
Utilities\ValueSetFactory.EnumeratedValueSet.cs (32)
46
public bool IsEmpty => _included &&
_membersIncludedOrExcluded
.IsEmpty;
54
return _tc.ToConstantValue(
_membersIncludedOrExcluded
.OrderBy(k => k).First());
66
var candidates = _tc.RandomValues(
_membersIncludedOrExcluded
.Count + 1, new Random(0),
_membersIncludedOrExcluded
.Count + 1);
82
return _included ==
_membersIncludedOrExcluded
.Contains(value);
97
switch (
_membersIncludedOrExcluded
.Count)
102
return
_membersIncludedOrExcluded
.Contains(value);
113
public IValueSet<T> Complement() => new EnumeratedValueSet<T>(!_included,
_membersIncludedOrExcluded
, _tc);
124
var (larger, smaller) = (this.
_membersIncludedOrExcluded
.Count > other.
_membersIncludedOrExcluded
.Count) ? (this, other) : (other, this);
128
return new EnumeratedValueSet<T>(true, larger.
_membersIncludedOrExcluded
.Intersect(smaller.
_membersIncludedOrExcluded
), _tc);
130
return new EnumeratedValueSet<T>(true, larger.
_membersIncludedOrExcluded
.Except(smaller.
_membersIncludedOrExcluded
), _tc);
132
return new EnumeratedValueSet<T>(false, larger.
_membersIncludedOrExcluded
.Union(smaller.
_membersIncludedOrExcluded
), _tc);
134
return new EnumeratedValueSet<T>(true, smaller.
_membersIncludedOrExcluded
.Except(larger.
_membersIncludedOrExcluded
), _tc);
147
var (larger, smaller) = (this.
_membersIncludedOrExcluded
.Count > other.
_membersIncludedOrExcluded
.Count) ? (this, other) : (other, this);
151
return new EnumeratedValueSet<T>(false, larger.
_membersIncludedOrExcluded
.Intersect(smaller.
_membersIncludedOrExcluded
), _tc);
153
return new EnumeratedValueSet<T>(false, larger.
_membersIncludedOrExcluded
.Except(smaller.
_membersIncludedOrExcluded
), _tc);
155
return new EnumeratedValueSet<T>(true, larger.
_membersIncludedOrExcluded
.Union(smaller.
_membersIncludedOrExcluded
), _tc);
157
return new EnumeratedValueSet<T>(false, smaller.
_membersIncludedOrExcluded
.Except(larger.
_membersIncludedOrExcluded
), _tc);
170
&& this.
_membersIncludedOrExcluded
.SetEqualsWithoutIntermediateHashSet(other.
_membersIncludedOrExcluded
);
173
public override int GetHashCode() => Hash.Combine(this._included.GetHashCode(), this.
_membersIncludedOrExcluded
.GetHashCode());
175
public override string ToString() => $"{(this._included ? "" : "~")}{{{string.Join(",",
_membersIncludedOrExcluded
.Select(o => o.ToString()))}{"}"}";