/// <summary> /// Initializes a new instance of the <see cref="PathCollection"/> class. /// </summary> /// <param name="comparer">The comparer.</param> public PathCollection(PathComparer comparer) : this(Enumerable.Empty <Path>(), comparer) { }
/// <summary> /// Initializes a new instance of the <see cref="PathCollection"/> class. /// </summary> /// <param name="paths">The paths.</param> /// <param name="comparer">The comparer.</param> /// <exception cref="ArgumentNullException"><paramref name="comparer"/> is <c>null</c>.</exception> public PathCollection(IEnumerable <Path> paths, PathComparer comparer) { Comparer = comparer ?? throw new ArgumentNullException(nameof(comparer)); _paths = new HashSet <Path>(paths, 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) { }