feat: Align `PathSegments` ctor overloads to WPF `PathSegmentCollection` (#16809)

This commit is contained in:
workgroupengineering 2024-08-26 17:23:51 +02:00 коммит произвёл GitHub
Родитель d6ecd36f7b
Коммит 06ece8da88
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: B5690EEEBB952194
1 изменённых файлов: 30 добавлений и 0 удалений

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

@ -1,3 +1,4 @@
using System.Collections.Generic;
using Avalonia.Collections;
using Avalonia.Visuals.Platform;
@ -24,7 +25,36 @@ namespace Avalonia.Media
}
}
/// <summary>
/// Represents a collection of <see cref="PathSegment"/> objects that can be individually accessed by index.
/// </summary>
public sealed class PathSegments : AvaloniaList<PathSegment>
{
/// <summary>
/// Initializes a new instance of the <see cref="PathSegments"/> class.
/// </summary>
public PathSegments()
{
}
/// <summary>
/// Initializes a new instance of the <see cref="PathSegments"/> class with the specified collection of <see cref="PathSegment"/> objects.
/// </summary>
/// <param name="collection">The collection of <see cref="PathSegment"/> objects that make up the <see cref="PathSegments"/>.</param>
/// <exception cref="System.ArgumentNullException"><paramref name="collection"/> is <c>null</c>.</exception>
public PathSegments(IEnumerable<PathSegment> collection) :
base(collection)
{
}
/// <summary>
/// Initializes a new instance of the PathSegments class with the specified capacity,
/// or the number of PathSegment objects the collection is initially capable of storing.
/// </summary>
/// <param name="capacity">The number of <see cref="PathSegment"/> objects that the collection is initially capable of storing.</param>
public PathSegments(int capacity) :
base(capacity)
{
}
}
}