コード例 #1
0
        // 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());
        }
コード例 #2
0
        /// <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());
        }
コード例 #3
0
        // 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());
        }