private static ImmutableHashSet <T> MergeOrIntersect(ImmutableHashSet <T> value1, ImmutableHashSet <T> value2, bool merge) { Debug.Assert(value1 != null); Debug.Assert(value2 != null); if (value1.IsEmpty) { return(value2); } else if (value2.IsEmpty || ReferenceEquals(value1, value2)) { return(value1); } var values = merge ? value1.Concat(value2) : value1.Intersect(value2); return(ImmutableHashSet.CreateRange(values)); }
protected override HashSet <string> GetFilesToCompile(string fileName, ImmutableHashSet <string> sharedInputs) { return(new HashSet <string>(sharedInputs.Concat(new[] { fileName }))); }
/// <summary> /// Gets a list of all the options that were changed. /// </summary> internal IEnumerable <OptionKey> GetChangedOptions() => _changedOptionKeysSerializable.Concat(_changedOptionKeysNonSerializable);