// static methods for convenience /// <summary> /// Returns a hash set containing all source files in the given namespaces. /// </summary> public static ImmutableHashSet <string> Apply(IEnumerable <QsNamespace> namespaces) { var filter = new GetSourceFiles(); foreach (var ns in namespaces) { filter.Namespaces.OnNamespace(ns); } return(filter.SharedState.SourceFiles.ToImmutableHashSet()); }
/// <summary> /// Returns a hash set containing all source files in the given namespace(s). /// Throws an ArgumentNullException if any of the given namespaces is null. /// </summary> public static ImmutableHashSet <NonNullable <string> > Apply(params QsNamespace[] namespaces) { if (namespaces == null || namespaces.Contains(null)) { throw new ArgumentNullException(nameof(namespaces)); } var filter = new GetSourceFiles(); foreach (var ns in namespaces) { filter.Transform(ns); } return(filter.SourceFiles.ToImmutableHashSet()); }
// static methods for convenience /// <summary> /// Returns a hash set containing all source files in the given namespaces. /// Throws an ArgumentNullException if the given sequence or any of the given namespaces is null. /// </summary> public static ImmutableHashSet <NonNullable <string> > Apply(IEnumerable <QsNamespace> namespaces) { if (namespaces == null || namespaces.Contains(null)) { throw new ArgumentNullException(nameof(namespaces)); } var filter = new GetSourceFiles(); foreach (var ns in namespaces) { filter.Namespaces.OnNamespace(ns); } return(filter.SharedState.SourceFiles.ToImmutableHashSet()); }