diff --git a/src/Avalonia.Base/PropertyStore/BindingEntry.cs b/src/Avalonia.Base/PropertyStore/BindingEntry.cs index cb51f1c9d02..79e55e7e020 100644 --- a/src/Avalonia.Base/PropertyStore/BindingEntry.cs +++ b/src/Avalonia.Base/PropertyStore/BindingEntry.cs @@ -6,10 +6,17 @@ namespace Avalonia.PropertyStore { + /// + /// Represents an untyped interface to . + /// internal interface IBindingEntry : IPriorityValueEntry, IDisposable { } + /// + /// Stores a binding in a or . + /// + /// The property type. internal class BindingEntry : IBindingEntry, IPriorityValueEntry, IObserver> { private IValueSink _sink; diff --git a/src/Avalonia.Base/PropertyStore/ConstantValueEntry.cs b/src/Avalonia.Base/PropertyStore/ConstantValueEntry.cs index 0d1240f689c..f15f56e32b7 100644 --- a/src/Avalonia.Base/PropertyStore/ConstantValueEntry.cs +++ b/src/Avalonia.Base/PropertyStore/ConstantValueEntry.cs @@ -5,6 +5,11 @@ namespace Avalonia.PropertyStore { + /// + /// Stores a value with a priority in a or + /// . + /// + /// The property type. internal class ConstantValueEntry : IPriorityValueEntry { public ConstantValueEntry( diff --git a/src/Avalonia.Base/PropertyStore/IPriorityValueEntry.cs b/src/Avalonia.Base/PropertyStore/IPriorityValueEntry.cs index 8e239e03c93..6ed6c2ef52f 100644 --- a/src/Avalonia.Base/PropertyStore/IPriorityValueEntry.cs +++ b/src/Avalonia.Base/PropertyStore/IPriorityValueEntry.cs @@ -5,6 +5,9 @@ namespace Avalonia.PropertyStore { + /// + /// Represents an untyped interface to . + /// internal interface IPriorityValueEntry : IValue { BindingPriority Priority { get; } @@ -12,6 +15,10 @@ internal interface IPriorityValueEntry : IValue void Reparent(IValueSink sink); } + /// + /// Represents an object that can act as an entry in a . + /// + /// The property type. internal interface IPriorityValueEntry : IPriorityValueEntry, IValue { } diff --git a/src/Avalonia.Base/PropertyStore/IValue.cs b/src/Avalonia.Base/PropertyStore/IValue.cs index 7d1eaa337fc..0ce7fb83088 100644 --- a/src/Avalonia.Base/PropertyStore/IValue.cs +++ b/src/Avalonia.Base/PropertyStore/IValue.cs @@ -4,12 +4,19 @@ namespace Avalonia.PropertyStore { + /// + /// Represents an untyped interface to . + /// internal interface IValue { Optional Value { get; } BindingPriority ValuePriority { get; } } + /// + /// Represents an object that can act as an entry in a . + /// + /// The property type. internal interface IValue : IValue { new Optional Value { get; } diff --git a/src/Avalonia.Base/PropertyStore/IValueSink.cs b/src/Avalonia.Base/PropertyStore/IValueSink.cs index faccd9e75ae..223b0058c1d 100644 --- a/src/Avalonia.Base/PropertyStore/IValueSink.cs +++ b/src/Avalonia.Base/PropertyStore/IValueSink.cs @@ -1,10 +1,12 @@ -using System; -using Avalonia.Data; +using Avalonia.Data; #nullable enable namespace Avalonia.PropertyStore { + /// + /// Represents an entity that can receive change notifications in a . + /// internal interface IValueSink { void ValueChanged( diff --git a/src/Avalonia.Base/PropertyStore/LocalValueEntry.cs b/src/Avalonia.Base/PropertyStore/LocalValueEntry.cs index 067ed7b9663..22258390dab 100644 --- a/src/Avalonia.Base/PropertyStore/LocalValueEntry.cs +++ b/src/Avalonia.Base/PropertyStore/LocalValueEntry.cs @@ -4,6 +4,11 @@ namespace Avalonia.PropertyStore { + /// + /// Stores a value with local value priority in a or + /// . + /// + /// The property type. internal class LocalValueEntry : IValue { private T _value; diff --git a/src/Avalonia.Base/PropertyStore/PriorityValue.cs b/src/Avalonia.Base/PropertyStore/PriorityValue.cs index 5f117b26cf1..a7b17d6f5a9 100644 --- a/src/Avalonia.Base/PropertyStore/PriorityValue.cs +++ b/src/Avalonia.Base/PropertyStore/PriorityValue.cs @@ -6,6 +6,17 @@ namespace Avalonia.PropertyStore { + /// + /// Stores a set of prioritized values and bindings in a . + /// + /// The property type. + /// + /// When more than a single value or binding is applied to a property in an + /// , the entry in the is converted into + /// a . This class holds any number of + /// entries (sorted first by priority and then in the order + /// they were added) plus a local value. + /// internal class PriorityValue : IValue, IValueSink { private readonly IValueSink _sink; diff --git a/src/Avalonia.Base/ValueStore.cs b/src/Avalonia.Base/ValueStore.cs index 2e2657086d3..5b6285623e6 100644 --- a/src/Avalonia.Base/ValueStore.cs +++ b/src/Avalonia.Base/ValueStore.cs @@ -1,5 +1,4 @@ using System; -using System.Collections.Generic; using Avalonia.Data; using Avalonia.PropertyStore; using Avalonia.Utilities; @@ -8,6 +7,20 @@ namespace Avalonia { + /// + /// Stores styled property values for an . + /// + /// + /// At its core this class consists of an to + /// mapping which holds the current values for each set property. This + /// can be in one of 4 states: + /// + /// - For a single local value it will be an instance of . + /// - For a single value of a priority other than LocalValue it will be an instance of + /// ` + /// - For a single binding it will be an instance of + /// - For all other cases it will be an instance of + /// internal class ValueStore : IValueSink { private readonly AvaloniaObject _owner;