diff options
author | dvorn <sgd@list.ru> | 2017-03-28 08:51:33 +0300 |
---|---|---|
committer | dvorn <sgd@list.ru> | 2017-03-28 08:51:33 +0300 |
commit | 8b6e27e6fcfa612b63020bae607ae4a47520d9a1 (patch) | |
tree | bd4346673715051ae5a54cef8a5d642bfb45455a | |
parent | 85f58f1e5c183abe08c85ec58b17bc80a9528ce4 (diff) |
Clean up
-rw-r--r-- | Source/Wpf/Prism.Wpf/Prism.Wpf.csproj | 1 | ||||
-rw-r--r-- | Source/Wpf/Prism.Wpf/Regions/ViewsCollection.Desktop.cs | 34 | ||||
-rw-r--r-- | Source/Wpf/Prism.Wpf/Regions/ViewsCollection.cs | 32 |
3 files changed, 24 insertions, 43 deletions
diff --git a/Source/Wpf/Prism.Wpf/Prism.Wpf.csproj b/Source/Wpf/Prism.Wpf/Prism.Wpf.csproj index 2b8f51b..79ea76b 100644 --- a/Source/Wpf/Prism.Wpf/Prism.Wpf.csproj +++ b/Source/Wpf/Prism.Wpf/Prism.Wpf.csproj @@ -211,7 +211,6 @@ <Compile Include="Regions\ViewRegistrationException.cs" /> <Compile Include="Regions\ViewRegistrationException.Desktop.cs" /> <Compile Include="Regions\ViewsCollection.cs" /> - <Compile Include="Regions\ViewsCollection.Desktop.cs" /> <Compile Include="Regions\ViewSortHintAttribute.cs" /> <Compile Include="Extensions\ServiceLocatorExtensions.cs" /> <Compile Include="Common\UriParsingHelper.cs" /> diff --git a/Source/Wpf/Prism.Wpf/Regions/ViewsCollection.Desktop.cs b/Source/Wpf/Prism.Wpf/Regions/ViewsCollection.Desktop.cs deleted file mode 100644 index 7a7e9c9..0000000 --- a/Source/Wpf/Prism.Wpf/Regions/ViewsCollection.Desktop.cs +++ /dev/null @@ -1,34 +0,0 @@ - - -using System.Collections; -using System.Collections.Generic; -using System.Collections.Specialized; -using System.Linq; - -namespace Prism.Regions -{ - public partial class ViewsCollection - { - private void NotifyAdd(IList items, int newStartingIndex) - { - if (items.Count > 0) - { - OnCollectionChanged(new NotifyCollectionChangedEventArgs( - NotifyCollectionChangedAction.Add, - items, - newStartingIndex)); - } - } - - private void NotifyRemove(IList items, int originalIndex) - { - if (items.Count > 0) - { - OnCollectionChanged(new NotifyCollectionChangedEventArgs( - NotifyCollectionChangedAction.Remove, - items, - originalIndex)); - } - } - } -} diff --git a/Source/Wpf/Prism.Wpf/Regions/ViewsCollection.cs b/Source/Wpf/Prism.Wpf/Regions/ViewsCollection.cs index 02751a0..f39bda5 100644 --- a/Source/Wpf/Prism.Wpf/Regions/ViewsCollection.cs +++ b/Source/Wpf/Prism.Wpf/Regions/ViewsCollection.cs @@ -62,11 +62,6 @@ namespace Prism.Regions } } - private IEnumerable<object> FilteredItems - { - get { return this.filteredItems; } - } - /// <summary> /// Determines whether the collection contains a specific value. /// </summary> @@ -74,7 +69,7 @@ namespace Prism.Regions /// <returns><see langword="true" /> if <paramref name="value"/> is found in the collection; otherwise, <see langword="false" />.</returns> public bool Contains(object value) { - return this.FilteredItems.Contains(value); + return this.filteredItems.Contains(value); } ///<summary> @@ -85,8 +80,7 @@ namespace Prism.Regions ///</returns> public IEnumerator<object> GetEnumerator() { - return - this.FilteredItems.GetEnumerator(); + return this.filteredItems.GetEnumerator(); } ///<summary> @@ -307,5 +301,27 @@ namespace Prism.Regions return this.comparer(x, y); } } + + private void NotifyAdd(IList items, int newStartingIndex) + { + if (items.Count > 0) + { + OnCollectionChanged(new NotifyCollectionChangedEventArgs( + NotifyCollectionChangedAction.Add, + items, + newStartingIndex)); + } + } + + private void NotifyRemove(IList items, int originalIndex) + { + if (items.Count > 0) + { + OnCollectionChanged(new NotifyCollectionChangedEventArgs( + NotifyCollectionChangedAction.Remove, + items, + originalIndex)); + } + } } }
\ No newline at end of file |