using System.Collections.Specialized; using System.Diagnostics.CodeAnalysis; namespace Umbraco.Cms.Core.Models; public interface IPropertyCollection : IEnumerable, IDeepCloneable, INotifyCollectionChanged { int Count { get; } /// /// Gets the property with the specified alias. /// IProperty? this[string name] { get; } /// /// Gets the property at the specified index. /// IProperty? this[int index] { get; } bool TryGetValue(string propertyTypeAlias, [MaybeNullWhen(false)] out IProperty property); bool Contains(string key); /// /// Ensures that the collection contains properties for the specified property types. /// void EnsurePropertyTypes(IEnumerable propertyTypes); /// /// Ensures that the collection does not contain properties not in the specified property types. /// void EnsureCleanPropertyTypes(IEnumerable propertyTypes); /// /// Adds or updates a property. /// void Add(IProperty property); void ClearCollectionChangedEvents(); }