This commit is contained in:
Jason Nelson 2018-08-24 09:48:49 -07:00
Родитель e5c550ed41
Коммит 14c70f22c5
1 изменённых файлов: 9 добавлений и 14 удалений

Просмотреть файл

@ -23,13 +23,17 @@ namespace SixLabors.Shapes
/// </summary>
/// <param name="paths">The collection of paths</param>
public PathCollection(IEnumerable<IPath> paths)
: this(paths?.ToArray())
{
if (paths is null)
{
throw new ArgumentNullException(nameof(paths));
}
this.paths = paths as IPath[] ?? paths.ToArray();
/// <summary>
/// Initializes a new instance of the <see cref="PathCollection"/> class.
/// </summary>
/// <param name="paths">The collection of paths</param>
public PathCollection(params IPath[] paths)
{
this.paths = paths ?? throw new ArgumentNullException(nameof(paths));
if (this.paths.Length == 0)
{
@ -47,15 +51,6 @@ namespace SixLabors.Shapes
}
}
/// <summary>
/// Initializes a new instance of the <see cref="PathCollection"/> class.
/// </summary>
/// <param name="paths">The collection of paths</param>
public PathCollection(params IPath[] paths)
: this((IEnumerable<IPath>)paths)
{
}
/// <inheritdoc />
public RectangleF Bounds { get; }