/// <summary> /// Initializes a new instance of the <see cref="FilePathCollection"/> class. /// </summary> /// <param name="paths">The paths.</param> /// <param name="comparer">The comparer.</param> /// <exception cref="ArgumentNullException"><paramref name="comparer"/> is <see langword="null"/></exception> public FilePathCollection(IEnumerable <FilePath> paths, PathComparer comparer) { if (comparer == null) { throw new ArgumentNullException(nameof(comparer)); } Comparer = comparer; _paths = new HashSet <FilePath>(paths, comparer); }
/// <summary> /// Initializes a new instance of the <see cref="Globber"/> class. /// </summary> /// <param name="env">The environment.</param> /// <exception cref="ArgumentNullException"><paramref name="env"/> is <see langword="null"/></exception> public Globber(IFileSystemEnvironment env) { if (env == null) { throw new ArgumentNullException(nameof(env)); } _env = env; _parser = new GlobParser(env); _visitor = new GlobVisitor(env); _comparer = new PathComparer(env.IsUnix()); }
/// <summary> /// Initializes a new instance of the <see cref="FilePathCollection"/> class. /// </summary> /// <param name="comparer">The comparer.</param> public FilePathCollection(PathComparer comparer) : this(Enumerable.Empty <FilePath>(), comparer) { }
/// <summary> /// Initializes a new instance of the <see cref="DirectoryPathCollection"/> class. /// </summary> /// <param name="comparer">The comparer.</param> public DirectoryPathCollection(PathComparer comparer) : this(Enumerable.Empty <DirectoryPath>(), comparer) { }