diff --git a/Perspex.Base/Collections/IPerspexList.cs b/Perspex.Base/Collections/IPerspexList.cs index 6d958f07fb..1aaf7d827e 100644 --- a/Perspex.Base/Collections/IPerspexList.cs +++ b/Perspex.Base/Collections/IPerspexList.cs @@ -9,7 +9,7 @@ namespace Perspex.Collections using System.Collections; using System.Collections.Generic; - public interface IPerspexList : IList, IList, IReadOnlyPerspexList + public interface IPerspexList : IList, IList, IPerspexReadOnlyList { } } \ No newline at end of file diff --git a/Perspex.Base/Collections/IReadOnlyPerspexList.cs b/Perspex.Base/Collections/IPerspexReadOnlyList.cs similarity index 88% rename from Perspex.Base/Collections/IReadOnlyPerspexList.cs rename to Perspex.Base/Collections/IPerspexReadOnlyList.cs index 7329082f9f..d25715c9b2 100644 --- a/Perspex.Base/Collections/IReadOnlyPerspexList.cs +++ b/Perspex.Base/Collections/IPerspexReadOnlyList.cs @@ -10,7 +10,7 @@ namespace Perspex.Collections using System.Collections.Specialized; using System.ComponentModel; - public interface IReadOnlyPerspexList : IReadOnlyList, INotifyCollectionChanged, INotifyPropertyChanged + public interface IPerspexReadOnlyList : IReadOnlyList, INotifyCollectionChanged, INotifyPropertyChanged { } } \ No newline at end of file diff --git a/Perspex.Base/Collections/PerspexListExtensions.cs b/Perspex.Base/Collections/PerspexListExtensions.cs index 62c754f2b3..8aaa32a720 100644 --- a/Perspex.Base/Collections/PerspexListExtensions.cs +++ b/Perspex.Base/Collections/PerspexListExtensions.cs @@ -15,7 +15,7 @@ namespace Perspex.Collections public static class PerspexListExtensions { public static IDisposable ForEachItem( - this IReadOnlyPerspexList collection, + this IPerspexReadOnlyList collection, Action added, Action removed) { @@ -65,7 +65,7 @@ namespace Perspex.Collections } public static IDisposable TrackItemPropertyChanged( - this IReadOnlyPerspexList collection, + this IPerspexReadOnlyList collection, Action> callback) { List tracked = new List(); diff --git a/Perspex.Base/Collections/PerspexReadOnlyListView.cs b/Perspex.Base/Collections/PerspexReadOnlyListView.cs index 4d12d275b8..681fb03284 100644 --- a/Perspex.Base/Collections/PerspexReadOnlyListView.cs +++ b/Perspex.Base/Collections/PerspexReadOnlyListView.cs @@ -13,16 +13,16 @@ namespace Perspex.Collections using System.ComponentModel; using System.Linq; - public class PerspexReadOnlyListView : IReadOnlyPerspexList, IDisposable + public class PerspexReadOnlyListView : IPerspexReadOnlyList, IDisposable { - private IReadOnlyPerspexList source; + private IPerspexReadOnlyList source; public PerspexReadOnlyListView() : this(null) { } - public PerspexReadOnlyListView(IReadOnlyPerspexList source) + public PerspexReadOnlyListView(IPerspexReadOnlyList source) { this.source = source; @@ -42,7 +42,7 @@ namespace Perspex.Collections get { return this.source.Count; } } - public IReadOnlyPerspexList Source + public IPerspexReadOnlyList Source { get { @@ -141,9 +141,9 @@ namespace Perspex.Collections } } - public class PerspexReadOnlyListView : IReadOnlyPerspexList, IDisposable + public class PerspexReadOnlyListView : IPerspexReadOnlyList, IDisposable { - private IReadOnlyPerspexList source; + private IPerspexReadOnlyList source; private Func convert; @@ -152,7 +152,7 @@ namespace Perspex.Collections { } - public PerspexReadOnlyListView(IReadOnlyPerspexList source, Func convert) + public PerspexReadOnlyListView(IPerspexReadOnlyList source, Func convert) { this.source = source; this.convert = convert; @@ -178,7 +178,7 @@ namespace Perspex.Collections get { return this.source.Count; } } - public IReadOnlyPerspexList Source + public IPerspexReadOnlyList Source { get { diff --git a/Perspex.Base/Collections/SingleItemPerspexList.cs b/Perspex.Base/Collections/PerspexSingleItemList.cs similarity index 92% rename from Perspex.Base/Collections/SingleItemPerspexList.cs rename to Perspex.Base/Collections/PerspexSingleItemList.cs index 72f5fbd834..3bdc0e4e64 100644 --- a/Perspex.Base/Collections/SingleItemPerspexList.cs +++ b/Perspex.Base/Collections/PerspexSingleItemList.cs @@ -14,24 +14,24 @@ namespace Perspex.Collections using System.Linq; /// - /// Implements the interface for single items. + /// Implements the interface for single items. /// /// The type of the single item. /// /// Classes such as Border can only ever have a single logical child, but they need to /// implement a list of logical children in their ILogical.LogicalChildren property using the - /// interface. This class facilitates that + /// interface. This class facilitates that /// without creating an actual . /// - public class SingleItemPerspexList : IReadOnlyPerspexList where T : class + public class PerspexSingleItemList : IPerspexReadOnlyList where T : class { private T item; - public SingleItemPerspexList() + public PerspexSingleItemList() { } - public SingleItemPerspexList(T item) + public PerspexSingleItemList(T item) { this.item = item; } diff --git a/Perspex.Base/Perspex.Base.csproj b/Perspex.Base/Perspex.Base.csproj index 6959c65d9d..e8db7a404d 100644 --- a/Perspex.Base/Perspex.Base.csproj +++ b/Perspex.Base/Perspex.Base.csproj @@ -38,13 +38,13 @@ - + - + diff --git a/Perspex.Controls/ContentControl.cs b/Perspex.Controls/ContentControl.cs index 6b7c673538..aa0bfd803f 100644 --- a/Perspex.Controls/ContentControl.cs +++ b/Perspex.Controls/ContentControl.cs @@ -49,7 +49,7 @@ namespace Perspex.Controls set { this.SetValue(VerticalContentAlignmentProperty, value); } } - IReadOnlyPerspexList ILogical.LogicalChildren + IPerspexReadOnlyList ILogical.LogicalChildren { get { return this.logicalChildren; } } diff --git a/Perspex.Controls/Control.cs b/Perspex.Controls/Control.cs index ad742e7736..32dcf64955 100644 --- a/Perspex.Controls/Control.cs +++ b/Perspex.Controls/Control.cs @@ -32,7 +32,7 @@ namespace Perspex.Controls public static readonly RoutedEvent RequestBringIntoViewEvent = RoutedEvent.Register("RequestBringIntoView", RoutingStrategy.Bubble); - private static readonly IReadOnlyPerspexList EmptyChildren = new SingleItemPerspexList(); + private static readonly IPerspexReadOnlyList EmptyChildren = new PerspexSingleItemList(); private Classes classes = new Classes(); @@ -149,7 +149,7 @@ namespace Perspex.Controls get { return this.Parent; } } - IReadOnlyPerspexList ILogical.LogicalChildren + IPerspexReadOnlyList ILogical.LogicalChildren { get { return EmptyChildren; } } diff --git a/Perspex.Controls/Decorator.cs b/Perspex.Controls/Decorator.cs index 1ae8711fcd..37eb4760a9 100644 --- a/Perspex.Controls/Decorator.cs +++ b/Perspex.Controls/Decorator.cs @@ -21,7 +21,7 @@ namespace Perspex.Controls public static readonly PerspexProperty PaddingProperty = PerspexProperty.Register("Padding"); - private SingleItemPerspexList logicalChild = new SingleItemPerspexList(); + private PerspexSingleItemList logicalChild = new PerspexSingleItemList(); public Decorator() { @@ -55,7 +55,7 @@ namespace Perspex.Controls set { this.SetValue(PaddingProperty, value); } } - IReadOnlyPerspexList ILogical.LogicalChildren + IPerspexReadOnlyList ILogical.LogicalChildren { get { return this.logicalChild; } } diff --git a/Perspex.Controls/DropDown.cs b/Perspex.Controls/DropDown.cs index 1d34a095a8..31d44ee013 100644 --- a/Perspex.Controls/DropDown.cs +++ b/Perspex.Controls/DropDown.cs @@ -59,7 +59,7 @@ namespace Perspex.Controls set { this.SetValue(IsDropDownOpenProperty, value); } } - IReadOnlyPerspexList ILogical.LogicalChildren + IPerspexReadOnlyList ILogical.LogicalChildren { get { return this.logicalChildren; } } diff --git a/Perspex.Controls/ItemsControl.cs b/Perspex.Controls/ItemsControl.cs index 0b087e0795..02358935d2 100644 --- a/Perspex.Controls/ItemsControl.cs +++ b/Perspex.Controls/ItemsControl.cs @@ -67,7 +67,7 @@ namespace Perspex.Controls set { this.SetValue(ItemsPanelProperty, value); } } - IReadOnlyPerspexList ILogical.LogicalChildren + IPerspexReadOnlyList ILogical.LogicalChildren { get { diff --git a/Perspex.Controls/Panel.cs b/Perspex.Controls/Panel.cs index 46014c1791..a001cc5797 100644 --- a/Perspex.Controls/Panel.cs +++ b/Perspex.Controls/Panel.cs @@ -65,7 +65,7 @@ namespace Perspex.Controls } } - IReadOnlyPerspexList ILogical.LogicalChildren + IPerspexReadOnlyList ILogical.LogicalChildren { get { return this.children; } } diff --git a/Perspex.Controls/Presenters/ContentPresenter.cs b/Perspex.Controls/Presenters/ContentPresenter.cs index da4db2fc04..3c85e334f0 100644 --- a/Perspex.Controls/Presenters/ContentPresenter.cs +++ b/Perspex.Controls/Presenters/ContentPresenter.cs @@ -21,7 +21,7 @@ namespace Perspex.Controls.Presenters private bool createdChild; - private SingleItemPerspexList logicalChild = new SingleItemPerspexList(); + private PerspexSingleItemList logicalChild = new PerspexSingleItemList(); public ContentPresenter() { @@ -39,7 +39,7 @@ namespace Perspex.Controls.Presenters set { this.SetValue(ContentProperty, value); } } - IReadOnlyPerspexList ILogical.LogicalChildren + IPerspexReadOnlyList ILogical.LogicalChildren { get { return this.logicalChild; } } diff --git a/Perspex.Controls/TabControl.cs b/Perspex.Controls/TabControl.cs index 7f4c6cbe03..30044413d4 100644 --- a/Perspex.Controls/TabControl.cs +++ b/Perspex.Controls/TabControl.cs @@ -50,7 +50,7 @@ namespace Perspex.Controls set { this.SetValue(SelectedTabProperty, value); } } - IReadOnlyPerspexList ILogical.LogicalChildren + IPerspexReadOnlyList ILogical.LogicalChildren { get { return this.logicalChildren; } } diff --git a/Perspex.SceneGraph/ILogical.cs b/Perspex.SceneGraph/ILogical.cs index 154a54e0a1..54859171db 100644 --- a/Perspex.SceneGraph/ILogical.cs +++ b/Perspex.SceneGraph/ILogical.cs @@ -21,6 +21,6 @@ namespace Perspex /// /// Gets the logical children. /// - IReadOnlyPerspexList LogicalChildren { get; } + IPerspexReadOnlyList LogicalChildren { get; } } } diff --git a/Perspex.SceneGraph/IVisual.cs b/Perspex.SceneGraph/IVisual.cs index 72a38d1703..845355beec 100644 --- a/Perspex.SceneGraph/IVisual.cs +++ b/Perspex.SceneGraph/IVisual.cs @@ -56,7 +56,7 @@ namespace Perspex /// /// Gets the scene graph node's child nodes. /// - IReadOnlyPerspexList VisualChildren { get; } + IPerspexReadOnlyList VisualChildren { get; } /// /// Gets the scene graph node's parent node. diff --git a/Perspex.SceneGraph/Visual.cs b/Perspex.SceneGraph/Visual.cs index 9ce14cd158..df2f43d306 100644 --- a/Perspex.SceneGraph/Visual.cs +++ b/Perspex.SceneGraph/Visual.cs @@ -89,7 +89,7 @@ namespace Perspex get { return this.bounds; } } - IReadOnlyPerspexList IVisual.VisualChildren + IPerspexReadOnlyList IVisual.VisualChildren { get { return this.visualChildren; } } diff --git a/Tests/Perspex.Styling.UnitTests/SelectorTests_Descendent.cs b/Tests/Perspex.Styling.UnitTests/SelectorTests_Descendent.cs index 416c331619..0d57d7a23c 100644 --- a/Tests/Perspex.Styling.UnitTests/SelectorTests_Descendent.cs +++ b/Tests/Perspex.Styling.UnitTests/SelectorTests_Descendent.cs @@ -88,7 +88,7 @@ namespace Perspex.Styling.UnitTests { public abstract Classes Classes { get; } public abstract string Id { get; } - public abstract IReadOnlyPerspexList LogicalChildren { get; } + public abstract IPerspexReadOnlyList LogicalChildren { get; } public abstract ILogical LogicalParent { get; } public abstract ITemplatedControl TemplatedParent { get; } public abstract IDisposable Bind(PerspexProperty property, IObservable source, BindingPriority priority = BindingPriority.LocalValue);