diff --git a/Sandbox/Windows10/HelloWorld/HelloWorld.Unity/App.xaml b/Sandbox/Windows10/HelloWorld/HelloWorld.Unity/App.xaml deleted file mode 100644 index d68b8e291..000000000 --- a/Sandbox/Windows10/HelloWorld/HelloWorld.Unity/App.xaml +++ /dev/null @@ -1,7 +0,0 @@ - - - diff --git a/Sandbox/Windows10/HelloWorld/HelloWorld.Unity/App.xaml.cs b/Sandbox/Windows10/HelloWorld/HelloWorld.Unity/App.xaml.cs deleted file mode 100644 index 30fd42263..000000000 --- a/Sandbox/Windows10/HelloWorld/HelloWorld.Unity/App.xaml.cs +++ /dev/null @@ -1,53 +0,0 @@ -using Prism; -using Prism.Ioc; -using Prism.Navigation; -using Prism.Unity; -using Sample.ViewModels; -using Sample.Views; -using SampleData.StarTrek; -using System; -using System.Collections.Generic; -using System.IO; -using System.Linq; -using System.Runtime.InteropServices.WindowsRuntime; -using Windows.ApplicationModel; -using Windows.ApplicationModel.Activation; -using Windows.Foundation; -using Windows.Foundation.Collections; -using Windows.UI.Xaml; -using Windows.UI.Xaml.Controls; -using Windows.UI.Xaml.Controls.Primitives; -using Windows.UI.Xaml.Data; -using Windows.UI.Xaml.Input; -using Windows.UI.Xaml.Media; -using Windows.UI.Xaml.Navigation; - -namespace Sample -{ - sealed partial class App : PrismApplication - { - public App() - { - InitializeComponent(); - } - - protected override void RegisterTypes(IContainerRegistry containerRegistry) - { - containerRegistry.RegisterSingleton(); - containerRegistry.RegisterForNavigation(); - containerRegistry.RegisterForNavigation(); - } - - protected override void OnStart(StartArgs args) - { - if (args.StartKind == StartKinds.Launch) - { - NavigationService.NavigateAsync("/MainPage"); - } - else - { - // TODO - } - } - } -} diff --git a/Sandbox/Windows10/HelloWorld/HelloWorld.Unity/Assets/LockScreenLogo.scale-200.png b/Sandbox/Windows10/HelloWorld/HelloWorld.Unity/Assets/LockScreenLogo.scale-200.png deleted file mode 100644 index 735f57adb..000000000 Binary files a/Sandbox/Windows10/HelloWorld/HelloWorld.Unity/Assets/LockScreenLogo.scale-200.png and /dev/null differ diff --git a/Sandbox/Windows10/HelloWorld/HelloWorld.Unity/Assets/SplashScreen.scale-200.png b/Sandbox/Windows10/HelloWorld/HelloWorld.Unity/Assets/SplashScreen.scale-200.png deleted file mode 100644 index 023e7f1fe..000000000 Binary files a/Sandbox/Windows10/HelloWorld/HelloWorld.Unity/Assets/SplashScreen.scale-200.png and /dev/null differ diff --git a/Sandbox/Windows10/HelloWorld/HelloWorld.Unity/Assets/Square150x150Logo.scale-200.png b/Sandbox/Windows10/HelloWorld/HelloWorld.Unity/Assets/Square150x150Logo.scale-200.png deleted file mode 100644 index af49fec1a..000000000 Binary files a/Sandbox/Windows10/HelloWorld/HelloWorld.Unity/Assets/Square150x150Logo.scale-200.png and /dev/null differ diff --git a/Sandbox/Windows10/HelloWorld/HelloWorld.Unity/Assets/Square44x44Logo.scale-200.png b/Sandbox/Windows10/HelloWorld/HelloWorld.Unity/Assets/Square44x44Logo.scale-200.png deleted file mode 100644 index ce342a2ec..000000000 Binary files a/Sandbox/Windows10/HelloWorld/HelloWorld.Unity/Assets/Square44x44Logo.scale-200.png and /dev/null differ diff --git a/Sandbox/Windows10/HelloWorld/HelloWorld.Unity/Assets/Square44x44Logo.targetsize-24_altform-unplated.png b/Sandbox/Windows10/HelloWorld/HelloWorld.Unity/Assets/Square44x44Logo.targetsize-24_altform-unplated.png deleted file mode 100644 index f6c02ce97..000000000 Binary files a/Sandbox/Windows10/HelloWorld/HelloWorld.Unity/Assets/Square44x44Logo.targetsize-24_altform-unplated.png and /dev/null differ diff --git a/Sandbox/Windows10/HelloWorld/HelloWorld.Unity/Assets/StoreLogo.png b/Sandbox/Windows10/HelloWorld/HelloWorld.Unity/Assets/StoreLogo.png deleted file mode 100644 index 7385b56c0..000000000 Binary files a/Sandbox/Windows10/HelloWorld/HelloWorld.Unity/Assets/StoreLogo.png and /dev/null differ diff --git a/Sandbox/Windows10/HelloWorld/HelloWorld.Unity/Assets/Wide310x150Logo.scale-200.png b/Sandbox/Windows10/HelloWorld/HelloWorld.Unity/Assets/Wide310x150Logo.scale-200.png deleted file mode 100644 index 288995b39..000000000 Binary files a/Sandbox/Windows10/HelloWorld/HelloWorld.Unity/Assets/Wide310x150Logo.scale-200.png and /dev/null differ diff --git a/Sandbox/Windows10/HelloWorld/HelloWorld.Unity/Controls/AppBarLiteral.cs b/Sandbox/Windows10/HelloWorld/HelloWorld.Unity/Controls/AppBarLiteral.cs deleted file mode 100644 index 62d2be773..000000000 --- a/Sandbox/Windows10/HelloWorld/HelloWorld.Unity/Controls/AppBarLiteral.cs +++ /dev/null @@ -1,24 +0,0 @@ -using Windows.UI.Xaml; -using Windows.UI.Xaml.Controls; -using Windows.UI.Xaml.Markup; - -namespace Sample.Controls -{ -[ContentProperty(Name = nameof(LiteralContent))] -public sealed class AppBarLiteral : AppBarSeparator -{ - public AppBarLiteral() - { - DefaultStyleKey = typeof(AppBarLiteral); - } - - public object LiteralContent - { - get { return (object)GetValue(LiteralContentProperty); } - set { SetValue(LiteralContentProperty, value); } - } - public static readonly DependencyProperty LiteralContentProperty = - DependencyProperty.Register(nameof(LiteralContent), typeof(object), - typeof(AppBarLiteral), new PropertyMetadata(null)); -} -} diff --git a/Sandbox/Windows10/HelloWorld/HelloWorld.Unity/Converters/ItemClickedConverter.cs b/Sandbox/Windows10/HelloWorld/HelloWorld.Unity/Converters/ItemClickedConverter.cs deleted file mode 100644 index 69ebb8eee..000000000 --- a/Sandbox/Windows10/HelloWorld/HelloWorld.Unity/Converters/ItemClickedConverter.cs +++ /dev/null @@ -1,22 +0,0 @@ -using System; -using Windows.UI.Xaml.Controls; -using Windows.UI.Xaml.Data; - -namespace HelloWorld.Converters -{ - public class ItemClickedConverter : IValueConverter - { - public object Convert(object value, Type targetType, object parameter, string language) - { - if (value is ItemClickEventArgs args) - return args.ClickedItem; - - return null; - } - - public object ConvertBack(object value, Type targetType, object parameter, string language) - { - throw new NotImplementedException(); - } - } -} diff --git a/Sandbox/Windows10/HelloWorld/HelloWorld.Unity/HelloWorld.Unity.csproj b/Sandbox/Windows10/HelloWorld/HelloWorld.Unity/HelloWorld.Unity.csproj deleted file mode 100644 index ff4e424e0..000000000 --- a/Sandbox/Windows10/HelloWorld/HelloWorld.Unity/HelloWorld.Unity.csproj +++ /dev/null @@ -1,184 +0,0 @@ - - - - - Debug - x86 - {0797C306-43CD-4E8D-BC3D-3C1E7B40345F} - AppContainerExe - Properties - HelloWorld - HelloWorld.Unity - en-US - UAP - 10.0.17763.0 - 10.0.16299.0 - 14 - true - 512 - {A5A43C5B-DE2A-4C0C-9213-0A381AF9435A};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - HelloWorld.Unity_TemporaryKey.pfx - 1EA0A78AC108B713DC6D25DC82465B12A6B45CEC - win10-arm;win10-arm-aot;win10-x86;win10-x86-aot;win10-x64;win10-x64-aot - - - true - bin\ARM\Debug\ - DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP - ;2008 - full - ARM - false - prompt - true - - - bin\ARM\Release\ - TRACE;NETFX_CORE;WINDOWS_UWP - true - ;2008 - pdbonly - ARM - false - prompt - true - true - - - true - bin\x64\Debug\ - DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP - ;2008 - full - x64 - false - prompt - true - - - bin\x64\Release\ - TRACE;NETFX_CORE;WINDOWS_UWP - true - ;2008 - pdbonly - x64 - false - prompt - true - true - - - true - bin\x86\Debug\ - DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP - ;2008 - full - x86 - false - prompt - true - - - bin\x86\Release\ - TRACE;NETFX_CORE;WINDOWS_UWP - true - ;2008 - pdbonly - x86 - false - prompt - true - true - - - - App.xaml - - - - - - - - - ItemPage.xaml - - - MainPage.xaml - - - - - Designer - - - - - - - - - - - - - - - - MSBuild:Compile - Designer - - - MSBuild:Compile - Designer - - - Designer - MSBuild:Compile - - - MSBuild:Compile - Designer - - - - - 24.0.0 - - - 6.1.9 - - - 2.0.0 - - - - - {e6c50355-d01e-4caa-884d-d7929861315c} - Prism - - - {b4060ad6-7a34-479c-b5eb-4c542a681f42} - Prism.Unity.Windows - - - {3b7c3599-a336-4db2-8678-710e3b36203b} - Prism.Windows - - - {b8442c8a-b688-48d2-8ba7-325a675cc611} - SampleData - - - - 14.0 - - - - \ No newline at end of file diff --git a/Sandbox/Windows10/HelloWorld/HelloWorld.Unity/HelloWorld.Unity_TemporaryKey.pfx b/Sandbox/Windows10/HelloWorld/HelloWorld.Unity/HelloWorld.Unity_TemporaryKey.pfx deleted file mode 100644 index 2baccdb12..000000000 Binary files a/Sandbox/Windows10/HelloWorld/HelloWorld.Unity/HelloWorld.Unity_TemporaryKey.pfx and /dev/null differ diff --git a/Sandbox/Windows10/HelloWorld/HelloWorld.Unity/Models/GroupedMembers.cs b/Sandbox/Windows10/HelloWorld/HelloWorld.Unity/Models/GroupedMembers.cs deleted file mode 100644 index 102840ea9..000000000 --- a/Sandbox/Windows10/HelloWorld/HelloWorld.Unity/Models/GroupedMembers.cs +++ /dev/null @@ -1,12 +0,0 @@ -using System.Collections.Generic; -using System.Collections.ObjectModel; -using SampleData.StarTrek; - -namespace Sample.Models -{ - public class GroupedMembers - { - public Show Show { get; set; } - public ObservableCollection Members { get; set; } - } -} diff --git a/Sandbox/Windows10/HelloWorld/HelloWorld.Unity/Models/Image00.png b/Sandbox/Windows10/HelloWorld/HelloWorld.Unity/Models/Image00.png deleted file mode 100644 index 4e50c5463..000000000 Binary files a/Sandbox/Windows10/HelloWorld/HelloWorld.Unity/Models/Image00.png and /dev/null differ diff --git a/Sandbox/Windows10/HelloWorld/HelloWorld.Unity/Package.appxmanifest b/Sandbox/Windows10/HelloWorld/HelloWorld.Unity/Package.appxmanifest deleted file mode 100644 index edb895991..000000000 --- a/Sandbox/Windows10/HelloWorld/HelloWorld.Unity/Package.appxmanifest +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - HelloWorld.Unity - BLagunas - Assets\StoreLogo.png - - - - - - - - - - - - - - - - - - Prism Hello World - - - - - - - - - \ No newline at end of file diff --git a/Sandbox/Windows10/HelloWorld/HelloWorld.Unity/Properties/AssemblyInfo.cs b/Sandbox/Windows10/HelloWorld/HelloWorld.Unity/Properties/AssemblyInfo.cs deleted file mode 100644 index 469716c01..000000000 --- a/Sandbox/Windows10/HelloWorld/HelloWorld.Unity/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,29 +0,0 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("Sample.Prism.Windows.Simple")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("Sample.Prism.Windows.Simple")] -[assembly: AssemblyCopyright("Copyright © 2018")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Build and Revision Numbers -// by using the '*' as shown below: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] -[assembly: ComVisible(false)] \ No newline at end of file diff --git a/Sandbox/Windows10/HelloWorld/HelloWorld.Unity/Properties/Default.rd.xml b/Sandbox/Windows10/HelloWorld/HelloWorld.Unity/Properties/Default.rd.xml deleted file mode 100644 index af00722cd..000000000 --- a/Sandbox/Windows10/HelloWorld/HelloWorld.Unity/Properties/Default.rd.xml +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - - - - - - - - \ No newline at end of file diff --git a/Sandbox/Windows10/HelloWorld/HelloWorld.Unity/Themes/Generic.xaml b/Sandbox/Windows10/HelloWorld/HelloWorld.Unity/Themes/Generic.xaml deleted file mode 100644 index 7cae2e365..000000000 --- a/Sandbox/Windows10/HelloWorld/HelloWorld.Unity/Themes/Generic.xaml +++ /dev/null @@ -1,15 +0,0 @@ - - - - - diff --git a/Sandbox/Windows10/HelloWorld/HelloWorld.Unity/ViewModels/ItemPageViewModel.cs b/Sandbox/Windows10/HelloWorld/HelloWorld.Unity/ViewModels/ItemPageViewModel.cs deleted file mode 100644 index 8df16c3e7..000000000 --- a/Sandbox/Windows10/HelloWorld/HelloWorld.Unity/ViewModels/ItemPageViewModel.cs +++ /dev/null @@ -1,43 +0,0 @@ -using Prism.Commands; -using Prism.Mvvm; -using Prism.Navigation; -using SampleData.StarTrek; -using Windows.UI.Xaml.Media.Animation; - -namespace Sample.ViewModels -{ - internal class ItemPageViewModel : BindableBase, INavigatedAware - { - private INavigationService _navigationService { get; } - - public ItemPageViewModel(INavigationService navigationService) - { - _navigationService = navigationService; - GoBackCommand = new DelegateCommand(OnGoBackCommandExecuted); - } - - public void OnNavigatedTo(INavigationParameters parameters) - { - Member = parameters.GetValue("member"); - } - - public void OnNavigatedFrom(INavigationParameters parameters) - { - // empty - } - - private Member _member; - public Member Member - { - get => _member; - set => SetProperty(ref _member, value); - } - - public DelegateCommand GoBackCommand { get; } - - private async void OnGoBackCommandExecuted() - { - await _navigationService.GoBackAsync(); - } - } -} \ No newline at end of file diff --git a/Sandbox/Windows10/HelloWorld/HelloWorld.Unity/ViewModels/MainPageViewModel.cs b/Sandbox/Windows10/HelloWorld/HelloWorld.Unity/ViewModels/MainPageViewModel.cs deleted file mode 100644 index 48e35b514..000000000 --- a/Sandbox/Windows10/HelloWorld/HelloWorld.Unity/ViewModels/MainPageViewModel.cs +++ /dev/null @@ -1,74 +0,0 @@ -using Prism.Commands; -using Prism.Mvvm; -using Prism.Navigation; -using Sample.Models; -using SampleData.StarTrek; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Diagnostics; -using System.Linq; -using System.Threading.Tasks; -using Windows.UI.Xaml.Controls; -using Windows.UI.Xaml.Media.Animation; - -namespace Sample.ViewModels -{ - class MainPageViewModel : BindableBase, INavigatedAwareAsync - { - private IDatabase _data { get; } - - private INavigationService _navigationService { get; } - - public MainPageViewModel(IDatabase data, INavigationService navigationService) - { - _data = data; - _navigationService = navigationService; - ItemSelectedCommand = new DelegateCommand(OnItemSelectedCommandExecuted); - } - - public async Task OnNavigatedToAsync(INavigationParameters parameters) - { - await _data.OpenAsync(); - FillMembers(); - } - - public ObservableCollection Members { get; } = new ObservableCollection(); - - string _searchString = string.Empty; - public string SearchString - { - get => _searchString; - set => SetProperty(ref _searchString, value, onChanged: FillMembers); - } - - public DelegateCommand ItemSelectedCommand { get; } - - private void FillMembers() - { - Members.Clear(); - foreach (var group in _data.Shows - .OrderBy(x => x.Ordinal) - .Select(x => new GroupedMembers { Show = x })) - { - var members = GetFilteredMembers(group.Show); - group.Members = new ObservableCollection(members); - if (group.Members.Any()) - { - Members.Add(group); - } - } - - IEnumerable GetFilteredMembers(Show show) - { - return _data.Members - .Where(x => x.Show == show.Abbreviation) - .Where(x => x.Character.ToLower().Contains(SearchString.Trim().ToLower()) || x.Actor.ToLower().Contains(SearchString.Trim().ToLower())); - } - } - - private async void OnItemSelectedCommandExecuted(Member member) - { - await _navigationService.NavigateAsync("ItemPage", new DrillInNavigationTransitionInfo(), ("member", member)); - } - } -} diff --git a/Sandbox/Windows10/HelloWorld/HelloWorld.Unity/Views/ItemPage.xaml b/Sandbox/Windows10/HelloWorld/HelloWorld.Unity/Views/ItemPage.xaml deleted file mode 100644 index 30bc63510..000000000 --- a/Sandbox/Windows10/HelloWorld/HelloWorld.Unity/Views/ItemPage.xaml +++ /dev/null @@ -1,40 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Sandbox/Windows10/HelloWorld/HelloWorld.Unity/Views/ItemPage.xaml.cs b/Sandbox/Windows10/HelloWorld/HelloWorld.Unity/Views/ItemPage.xaml.cs deleted file mode 100644 index 7ceb86f39..000000000 --- a/Sandbox/Windows10/HelloWorld/HelloWorld.Unity/Views/ItemPage.xaml.cs +++ /dev/null @@ -1,12 +0,0 @@ -using Windows.UI.Xaml.Controls; - -namespace Sample.Views -{ - public sealed partial class ItemPage : Page - { - public ItemPage() - { - InitializeComponent(); - } - } -} diff --git a/Sandbox/Windows10/HelloWorld/HelloWorld.Unity/Views/MainPage.xaml b/Sandbox/Windows10/HelloWorld/HelloWorld.Unity/Views/MainPage.xaml deleted file mode 100644 index 7dfa48df8..000000000 --- a/Sandbox/Windows10/HelloWorld/HelloWorld.Unity/Views/MainPage.xaml +++ /dev/null @@ -1,95 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Sandbox/Windows10/HelloWorld/HelloWorld.Unity/Views/MainPage.xaml.cs b/Sandbox/Windows10/HelloWorld/HelloWorld.Unity/Views/MainPage.xaml.cs deleted file mode 100644 index 5c9b40418..000000000 --- a/Sandbox/Windows10/HelloWorld/HelloWorld.Unity/Views/MainPage.xaml.cs +++ /dev/null @@ -1,12 +0,0 @@ -using Windows.UI.Xaml.Controls; - -namespace Sample.Views -{ - public sealed partial class MainPage : Page - { - public MainPage() - { - InitializeComponent(); - } - } -} diff --git a/Sandbox/Windows10/HelloWorld/HelloWorld.sln b/Sandbox/Windows10/HelloWorld/HelloWorld.sln deleted file mode 100644 index 68877fd8d..000000000 --- a/Sandbox/Windows10/HelloWorld/HelloWorld.sln +++ /dev/null @@ -1,178 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 15 -VisualStudioVersion = 15.0.27004.2002 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Prism.Windows", "..\..\..\Source\Windows10\Prism.Windows\Prism.Windows.csproj", "{3B7C3599-A336-4DB2-8678-710E3B36203B}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Prism.Unity.Windows", "..\..\..\Source\Windows10\Prism.Unity.Windows\Prism.Unity.Windows.csproj", "{B4060AD6-7A34-479C-B5EB-4C542A681F42}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Prism", "..\..\..\Source\Prism\Prism.csproj", "{E6C50355-D01E-4CAA-884D-D7929861315C}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "PrismLibrary", "PrismLibrary", "{C91631C0-B24C-4AA1-BD59-0E3DBF72B6BB}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HelloWorld.Unity", "HelloWorld.Unity\HelloWorld.Unity.csproj", "{0797C306-43CD-4E8D-BC3D-3C1E7B40345F}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SampleData", "..\SampleData\SampleData.csproj", "{B8442C8A-B688-48D2-8BA7-325A675CC611}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Debug|ARM = Debug|ARM - Debug|x64 = Debug|x64 - Debug|x86 = Debug|x86 - Release|Any CPU = Release|Any CPU - Release|ARM = Release|ARM - Release|x64 = Release|x64 - Release|x86 = Release|x86 - Release-Signed|Any CPU = Release-Signed|Any CPU - Release-Signed|ARM = Release-Signed|ARM - Release-Signed|x64 = Release-Signed|x64 - Release-Signed|x86 = Release-Signed|x86 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {3B7C3599-A336-4DB2-8678-710E3B36203B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {3B7C3599-A336-4DB2-8678-710E3B36203B}.Debug|Any CPU.Build.0 = Debug|Any CPU - {3B7C3599-A336-4DB2-8678-710E3B36203B}.Debug|ARM.ActiveCfg = Debug|Any CPU - {3B7C3599-A336-4DB2-8678-710E3B36203B}.Debug|ARM.Build.0 = Debug|Any CPU - {3B7C3599-A336-4DB2-8678-710E3B36203B}.Debug|x64.ActiveCfg = Debug|Any CPU - {3B7C3599-A336-4DB2-8678-710E3B36203B}.Debug|x64.Build.0 = Debug|Any CPU - {3B7C3599-A336-4DB2-8678-710E3B36203B}.Debug|x86.ActiveCfg = Debug|Any CPU - {3B7C3599-A336-4DB2-8678-710E3B36203B}.Debug|x86.Build.0 = Debug|Any CPU - {3B7C3599-A336-4DB2-8678-710E3B36203B}.Release|Any CPU.ActiveCfg = Release|Any CPU - {3B7C3599-A336-4DB2-8678-710E3B36203B}.Release|Any CPU.Build.0 = Release|Any CPU - {3B7C3599-A336-4DB2-8678-710E3B36203B}.Release|ARM.ActiveCfg = Release|Any CPU - {3B7C3599-A336-4DB2-8678-710E3B36203B}.Release|ARM.Build.0 = Release|Any CPU - {3B7C3599-A336-4DB2-8678-710E3B36203B}.Release|x64.ActiveCfg = Release|Any CPU - {3B7C3599-A336-4DB2-8678-710E3B36203B}.Release|x64.Build.0 = Release|Any CPU - {3B7C3599-A336-4DB2-8678-710E3B36203B}.Release|x86.ActiveCfg = Release|Any CPU - {3B7C3599-A336-4DB2-8678-710E3B36203B}.Release|x86.Build.0 = Release|Any CPU - {3B7C3599-A336-4DB2-8678-710E3B36203B}.Release-Signed|Any CPU.ActiveCfg = Release|Any CPU - {3B7C3599-A336-4DB2-8678-710E3B36203B}.Release-Signed|Any CPU.Build.0 = Release|Any CPU - {3B7C3599-A336-4DB2-8678-710E3B36203B}.Release-Signed|ARM.ActiveCfg = Release|Any CPU - {3B7C3599-A336-4DB2-8678-710E3B36203B}.Release-Signed|ARM.Build.0 = Release|Any CPU - {3B7C3599-A336-4DB2-8678-710E3B36203B}.Release-Signed|x64.ActiveCfg = Release|Any CPU - {3B7C3599-A336-4DB2-8678-710E3B36203B}.Release-Signed|x64.Build.0 = Release|Any CPU - {3B7C3599-A336-4DB2-8678-710E3B36203B}.Release-Signed|x86.ActiveCfg = Release|Any CPU - {3B7C3599-A336-4DB2-8678-710E3B36203B}.Release-Signed|x86.Build.0 = Release|Any CPU - {B4060AD6-7A34-479C-B5EB-4C542A681F42}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {B4060AD6-7A34-479C-B5EB-4C542A681F42}.Debug|Any CPU.Build.0 = Debug|Any CPU - {B4060AD6-7A34-479C-B5EB-4C542A681F42}.Debug|ARM.ActiveCfg = Debug|Any CPU - {B4060AD6-7A34-479C-B5EB-4C542A681F42}.Debug|ARM.Build.0 = Debug|Any CPU - {B4060AD6-7A34-479C-B5EB-4C542A681F42}.Debug|x64.ActiveCfg = Debug|Any CPU - {B4060AD6-7A34-479C-B5EB-4C542A681F42}.Debug|x64.Build.0 = Debug|Any CPU - {B4060AD6-7A34-479C-B5EB-4C542A681F42}.Debug|x86.ActiveCfg = Debug|Any CPU - {B4060AD6-7A34-479C-B5EB-4C542A681F42}.Debug|x86.Build.0 = Debug|Any CPU - {B4060AD6-7A34-479C-B5EB-4C542A681F42}.Release|Any CPU.ActiveCfg = Release|Any CPU - {B4060AD6-7A34-479C-B5EB-4C542A681F42}.Release|Any CPU.Build.0 = Release|Any CPU - {B4060AD6-7A34-479C-B5EB-4C542A681F42}.Release|ARM.ActiveCfg = Release|Any CPU - {B4060AD6-7A34-479C-B5EB-4C542A681F42}.Release|ARM.Build.0 = Release|Any CPU - {B4060AD6-7A34-479C-B5EB-4C542A681F42}.Release|x64.ActiveCfg = Release|Any CPU - {B4060AD6-7A34-479C-B5EB-4C542A681F42}.Release|x64.Build.0 = Release|Any CPU - {B4060AD6-7A34-479C-B5EB-4C542A681F42}.Release|x86.ActiveCfg = Release|Any CPU - {B4060AD6-7A34-479C-B5EB-4C542A681F42}.Release|x86.Build.0 = Release|Any CPU - {B4060AD6-7A34-479C-B5EB-4C542A681F42}.Release-Signed|Any CPU.ActiveCfg = Release|Any CPU - {B4060AD6-7A34-479C-B5EB-4C542A681F42}.Release-Signed|Any CPU.Build.0 = Release|Any CPU - {B4060AD6-7A34-479C-B5EB-4C542A681F42}.Release-Signed|ARM.ActiveCfg = Release|Any CPU - {B4060AD6-7A34-479C-B5EB-4C542A681F42}.Release-Signed|ARM.Build.0 = Release|Any CPU - {B4060AD6-7A34-479C-B5EB-4C542A681F42}.Release-Signed|x64.ActiveCfg = Release|Any CPU - {B4060AD6-7A34-479C-B5EB-4C542A681F42}.Release-Signed|x64.Build.0 = Release|Any CPU - {B4060AD6-7A34-479C-B5EB-4C542A681F42}.Release-Signed|x86.ActiveCfg = Release|Any CPU - {B4060AD6-7A34-479C-B5EB-4C542A681F42}.Release-Signed|x86.Build.0 = Release|Any CPU - {E6C50355-D01E-4CAA-884D-D7929861315C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {E6C50355-D01E-4CAA-884D-D7929861315C}.Debug|Any CPU.Build.0 = Debug|Any CPU - {E6C50355-D01E-4CAA-884D-D7929861315C}.Debug|ARM.ActiveCfg = Debug|Any CPU - {E6C50355-D01E-4CAA-884D-D7929861315C}.Debug|ARM.Build.0 = Debug|Any CPU - {E6C50355-D01E-4CAA-884D-D7929861315C}.Debug|x64.ActiveCfg = Debug|Any CPU - {E6C50355-D01E-4CAA-884D-D7929861315C}.Debug|x64.Build.0 = Debug|Any CPU - {E6C50355-D01E-4CAA-884D-D7929861315C}.Debug|x86.ActiveCfg = Debug|Any CPU - {E6C50355-D01E-4CAA-884D-D7929861315C}.Debug|x86.Build.0 = Debug|Any CPU - {E6C50355-D01E-4CAA-884D-D7929861315C}.Release|Any CPU.ActiveCfg = Release|Any CPU - {E6C50355-D01E-4CAA-884D-D7929861315C}.Release|Any CPU.Build.0 = Release|Any CPU - {E6C50355-D01E-4CAA-884D-D7929861315C}.Release|ARM.ActiveCfg = Release|Any CPU - {E6C50355-D01E-4CAA-884D-D7929861315C}.Release|ARM.Build.0 = Release|Any CPU - {E6C50355-D01E-4CAA-884D-D7929861315C}.Release|x64.ActiveCfg = Release|Any CPU - {E6C50355-D01E-4CAA-884D-D7929861315C}.Release|x64.Build.0 = Release|Any CPU - {E6C50355-D01E-4CAA-884D-D7929861315C}.Release|x86.ActiveCfg = Release|Any CPU - {E6C50355-D01E-4CAA-884D-D7929861315C}.Release|x86.Build.0 = Release|Any CPU - {E6C50355-D01E-4CAA-884D-D7929861315C}.Release-Signed|Any CPU.ActiveCfg = Release|Any CPU - {E6C50355-D01E-4CAA-884D-D7929861315C}.Release-Signed|Any CPU.Build.0 = Release|Any CPU - {E6C50355-D01E-4CAA-884D-D7929861315C}.Release-Signed|ARM.ActiveCfg = Release|Any CPU - {E6C50355-D01E-4CAA-884D-D7929861315C}.Release-Signed|ARM.Build.0 = Release|Any CPU - {E6C50355-D01E-4CAA-884D-D7929861315C}.Release-Signed|x64.ActiveCfg = Release|Any CPU - {E6C50355-D01E-4CAA-884D-D7929861315C}.Release-Signed|x64.Build.0 = Release|Any CPU - {E6C50355-D01E-4CAA-884D-D7929861315C}.Release-Signed|x86.ActiveCfg = Release|Any CPU - {E6C50355-D01E-4CAA-884D-D7929861315C}.Release-Signed|x86.Build.0 = Release|Any CPU - {0797C306-43CD-4E8D-BC3D-3C1E7B40345F}.Debug|Any CPU.ActiveCfg = Debug|x86 - {0797C306-43CD-4E8D-BC3D-3C1E7B40345F}.Debug|Any CPU.Build.0 = Debug|x86 - {0797C306-43CD-4E8D-BC3D-3C1E7B40345F}.Debug|Any CPU.Deploy.0 = Debug|x86 - {0797C306-43CD-4E8D-BC3D-3C1E7B40345F}.Debug|ARM.ActiveCfg = Debug|ARM - {0797C306-43CD-4E8D-BC3D-3C1E7B40345F}.Debug|ARM.Build.0 = Debug|ARM - {0797C306-43CD-4E8D-BC3D-3C1E7B40345F}.Debug|ARM.Deploy.0 = Debug|ARM - {0797C306-43CD-4E8D-BC3D-3C1E7B40345F}.Debug|x64.ActiveCfg = Debug|x64 - {0797C306-43CD-4E8D-BC3D-3C1E7B40345F}.Debug|x64.Build.0 = Debug|x64 - {0797C306-43CD-4E8D-BC3D-3C1E7B40345F}.Debug|x64.Deploy.0 = Debug|x64 - {0797C306-43CD-4E8D-BC3D-3C1E7B40345F}.Debug|x86.ActiveCfg = Debug|x86 - {0797C306-43CD-4E8D-BC3D-3C1E7B40345F}.Debug|x86.Build.0 = Debug|x86 - {0797C306-43CD-4E8D-BC3D-3C1E7B40345F}.Debug|x86.Deploy.0 = Debug|x86 - {0797C306-43CD-4E8D-BC3D-3C1E7B40345F}.Release|Any CPU.ActiveCfg = Release|x86 - {0797C306-43CD-4E8D-BC3D-3C1E7B40345F}.Release|Any CPU.Build.0 = Release|x86 - {0797C306-43CD-4E8D-BC3D-3C1E7B40345F}.Release|Any CPU.Deploy.0 = Release|x86 - {0797C306-43CD-4E8D-BC3D-3C1E7B40345F}.Release|ARM.ActiveCfg = Release|ARM - {0797C306-43CD-4E8D-BC3D-3C1E7B40345F}.Release|ARM.Build.0 = Release|ARM - {0797C306-43CD-4E8D-BC3D-3C1E7B40345F}.Release|ARM.Deploy.0 = Release|ARM - {0797C306-43CD-4E8D-BC3D-3C1E7B40345F}.Release|x64.ActiveCfg = Release|x64 - {0797C306-43CD-4E8D-BC3D-3C1E7B40345F}.Release|x64.Build.0 = Release|x64 - {0797C306-43CD-4E8D-BC3D-3C1E7B40345F}.Release|x64.Deploy.0 = Release|x64 - {0797C306-43CD-4E8D-BC3D-3C1E7B40345F}.Release|x86.ActiveCfg = Release|x86 - {0797C306-43CD-4E8D-BC3D-3C1E7B40345F}.Release|x86.Build.0 = Release|x86 - {0797C306-43CD-4E8D-BC3D-3C1E7B40345F}.Release|x86.Deploy.0 = Release|x86 - {0797C306-43CD-4E8D-BC3D-3C1E7B40345F}.Release-Signed|Any CPU.ActiveCfg = Release|x64 - {0797C306-43CD-4E8D-BC3D-3C1E7B40345F}.Release-Signed|Any CPU.Build.0 = Release|x64 - {0797C306-43CD-4E8D-BC3D-3C1E7B40345F}.Release-Signed|Any CPU.Deploy.0 = Release|x64 - {0797C306-43CD-4E8D-BC3D-3C1E7B40345F}.Release-Signed|ARM.ActiveCfg = Release|ARM - {0797C306-43CD-4E8D-BC3D-3C1E7B40345F}.Release-Signed|ARM.Build.0 = Release|ARM - {0797C306-43CD-4E8D-BC3D-3C1E7B40345F}.Release-Signed|ARM.Deploy.0 = Release|ARM - {0797C306-43CD-4E8D-BC3D-3C1E7B40345F}.Release-Signed|x64.ActiveCfg = Release|x64 - {0797C306-43CD-4E8D-BC3D-3C1E7B40345F}.Release-Signed|x64.Build.0 = Release|x64 - {0797C306-43CD-4E8D-BC3D-3C1E7B40345F}.Release-Signed|x64.Deploy.0 = Release|x64 - {0797C306-43CD-4E8D-BC3D-3C1E7B40345F}.Release-Signed|x86.ActiveCfg = Release|x86 - {0797C306-43CD-4E8D-BC3D-3C1E7B40345F}.Release-Signed|x86.Build.0 = Release|x86 - {0797C306-43CD-4E8D-BC3D-3C1E7B40345F}.Release-Signed|x86.Deploy.0 = Release|x86 - {B8442C8A-B688-48D2-8BA7-325A675CC611}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {B8442C8A-B688-48D2-8BA7-325A675CC611}.Debug|Any CPU.Build.0 = Debug|Any CPU - {B8442C8A-B688-48D2-8BA7-325A675CC611}.Debug|ARM.ActiveCfg = Debug|ARM - {B8442C8A-B688-48D2-8BA7-325A675CC611}.Debug|ARM.Build.0 = Debug|ARM - {B8442C8A-B688-48D2-8BA7-325A675CC611}.Debug|x64.ActiveCfg = Debug|x64 - {B8442C8A-B688-48D2-8BA7-325A675CC611}.Debug|x64.Build.0 = Debug|x64 - {B8442C8A-B688-48D2-8BA7-325A675CC611}.Debug|x86.ActiveCfg = Debug|x86 - {B8442C8A-B688-48D2-8BA7-325A675CC611}.Debug|x86.Build.0 = Debug|x86 - {B8442C8A-B688-48D2-8BA7-325A675CC611}.Release|Any CPU.ActiveCfg = Release|Any CPU - {B8442C8A-B688-48D2-8BA7-325A675CC611}.Release|Any CPU.Build.0 = Release|Any CPU - {B8442C8A-B688-48D2-8BA7-325A675CC611}.Release|ARM.ActiveCfg = Release|ARM - {B8442C8A-B688-48D2-8BA7-325A675CC611}.Release|ARM.Build.0 = Release|ARM - {B8442C8A-B688-48D2-8BA7-325A675CC611}.Release|x64.ActiveCfg = Release|x64 - {B8442C8A-B688-48D2-8BA7-325A675CC611}.Release|x64.Build.0 = Release|x64 - {B8442C8A-B688-48D2-8BA7-325A675CC611}.Release|x86.ActiveCfg = Release|x86 - {B8442C8A-B688-48D2-8BA7-325A675CC611}.Release|x86.Build.0 = Release|x86 - {B8442C8A-B688-48D2-8BA7-325A675CC611}.Release-Signed|Any CPU.ActiveCfg = Release|Any CPU - {B8442C8A-B688-48D2-8BA7-325A675CC611}.Release-Signed|Any CPU.Build.0 = Release|Any CPU - {B8442C8A-B688-48D2-8BA7-325A675CC611}.Release-Signed|ARM.ActiveCfg = Release|ARM - {B8442C8A-B688-48D2-8BA7-325A675CC611}.Release-Signed|ARM.Build.0 = Release|ARM - {B8442C8A-B688-48D2-8BA7-325A675CC611}.Release-Signed|x64.ActiveCfg = Release|x64 - {B8442C8A-B688-48D2-8BA7-325A675CC611}.Release-Signed|x64.Build.0 = Release|x64 - {B8442C8A-B688-48D2-8BA7-325A675CC611}.Release-Signed|x86.ActiveCfg = Release|x86 - {B8442C8A-B688-48D2-8BA7-325A675CC611}.Release-Signed|x86.Build.0 = Release|x86 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection - GlobalSection(NestedProjects) = preSolution - {3B7C3599-A336-4DB2-8678-710E3B36203B} = {C91631C0-B24C-4AA1-BD59-0E3DBF72B6BB} - {B4060AD6-7A34-479C-B5EB-4C542A681F42} = {C91631C0-B24C-4AA1-BD59-0E3DBF72B6BB} - {E6C50355-D01E-4CAA-884D-D7929861315C} = {C91631C0-B24C-4AA1-BD59-0E3DBF72B6BB} - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - SolutionGuid = {4623C322-15CE-4495-B507-14006F272EB1} - EndGlobalSection -EndGlobal diff --git a/Sandbox/Windows10/SampleData/BindableBase.cs b/Sandbox/Windows10/SampleData/BindableBase.cs deleted file mode 100644 index c70e13710..000000000 --- a/Sandbox/Windows10/SampleData/BindableBase.cs +++ /dev/null @@ -1,36 +0,0 @@ -using System.ComponentModel; -using System.Runtime.CompilerServices; - -namespace SampleData -{ - public abstract class BindableBase : INotifyPropertyChanged - { - public event PropertyChangedEventHandler PropertyChanged; - - public virtual bool Set(ref T storage, T value, [CallerMemberName]string propertyName = null) - { - if (Equals(storage, value)) - { - return false; - } - storage = value; - RaisePropertyChanged(propertyName); - return true; - } - - public virtual void RaisePropertyChanged([CallerMemberName]string propertyName = null) - { - if (Windows.ApplicationModel.DesignMode.DesignModeEnabled) - { - return; - } - var handler = PropertyChanged; - if (Equals(handler, null)) - { - return; - } - var args = new PropertyChangedEventArgs(propertyName); - handler.Invoke(this, args); - } - } -} diff --git a/Sandbox/Windows10/SampleData/Email/Database.cs b/Sandbox/Windows10/SampleData/Email/Database.cs deleted file mode 100644 index 40ccabb9f..000000000 --- a/Sandbox/Windows10/SampleData/Email/Database.cs +++ /dev/null @@ -1,52 +0,0 @@ -using Bogus; -using Newtonsoft.Json; -using SampleData.StarTrek; -using System; -using System.Collections.Generic; -using System.Diagnostics; -using System.Linq; -using System.Threading.Tasks; -using Windows.Storage; - -namespace SampleData.Email -{ - public class Database - { - public Message[] Messages { get; private set; } - - public bool Open { get; private set; } = false; - - public Task OpenAsync() - { - if (Open) - { - return new Task(() => true); - } - - Randomizer.Seed = new Random(8675309); - Messages = GenerateMessages(100).ToArray(); - return new Task(() => Open = true); - - IEnumerable GenerateMessages(int count) - { - var to = GenerateRecipient(); - var messages = new Faker() - .RuleFor(x => x.From, f => GenerateRecipient()) - .RuleFor(x => x.To, f => to) - .RuleFor(x => x.Subject, f => f.Lorem.Sentence()) - .RuleFor(x => x.Date, f => f.Date.Recent()) - .RuleFor(x => x.Body, f => f.Lorem.Paragraphs(2, 5)); - return messages.Generate(count); - } - - Recipient GenerateRecipient() - { - var recipient = new Faker() - .RuleFor(x => x.Name, f => f.Name.FullName()) - .RuleFor(x => x.Email, f => f.Internet.Email()) - .RuleFor(x => x.Image, f => f.Image.People()); - return recipient.Generate(); - } - } - } -} diff --git a/Sandbox/Windows10/SampleData/Email/Message.cs b/Sandbox/Windows10/SampleData/Email/Message.cs deleted file mode 100644 index b3dc15fa1..000000000 --- a/Sandbox/Windows10/SampleData/Email/Message.cs +++ /dev/null @@ -1,22 +0,0 @@ -using System; - -namespace SampleData.Email -{ - public class Message: BindableBase - { - private Recipient _from = default(Recipient); - public Recipient From { get => _from; set => Set(ref _from, value); } - - private Recipient _to = default(Recipient); - public Recipient To { get => _to; set => Set(ref _to, value); } - - private DateTime _date = default(DateTime); - public DateTime Date { get => _date; set => Set(ref _date, value); } - - private string _subject = default(string); - public string Subject { get => _subject; set => Set(ref _subject, value); } - - private string _body = default(string); - public string Body { get => _body; set => Set(ref _body, value); } - } -} diff --git a/Sandbox/Windows10/SampleData/Email/Recipient.cs b/Sandbox/Windows10/SampleData/Email/Recipient.cs deleted file mode 100644 index ac3075152..000000000 --- a/Sandbox/Windows10/SampleData/Email/Recipient.cs +++ /dev/null @@ -1,19 +0,0 @@ -namespace SampleData.Email -{ - public class Recipient : BindableBase - { - private string _name = default(string); - public string Name { get => _name; set => Set(ref _name, value); } - - private string _email = default(string); - public string Email { get => _email; set => Set(ref _email, value); } - - private string _image = default(string); - public string Image { get => _image; set => Set(ref _image, value); } - - public override string ToString() - { - return $"{Name} <{Email}>"; - } - } -} diff --git a/Sandbox/Windows10/SampleData/IDatabase.cs b/Sandbox/Windows10/SampleData/IDatabase.cs deleted file mode 100644 index 38055b614..000000000 --- a/Sandbox/Windows10/SampleData/IDatabase.cs +++ /dev/null @@ -1,16 +0,0 @@ -using System.Threading.Tasks; - -namespace SampleData.StarTrek -{ - public interface IDatabase - { - string[] Genders { get; } - Member[] Members { get; } - bool Open { get; } - Ship[] Ships { get; } - Show[] Shows { get; } - string[] Species { get; } - - Task OpenAsync(); - } -} \ No newline at end of file diff --git a/Sandbox/Windows10/SampleData/Image01.png b/Sandbox/Windows10/SampleData/Image01.png deleted file mode 100644 index 4e50c5463..000000000 Binary files a/Sandbox/Windows10/SampleData/Image01.png and /dev/null differ diff --git a/Sandbox/Windows10/SampleData/Properties/AssemblyInfo.cs b/Sandbox/Windows10/SampleData/Properties/AssemblyInfo.cs deleted file mode 100644 index e6e1e9c0f..000000000 --- a/Sandbox/Windows10/SampleData/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,29 +0,0 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("SampleData")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("SampleData")] -[assembly: AssemblyCopyright("Copyright © 2018")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Build and Revision Numbers -// by using the '*' as shown below: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] -[assembly: ComVisible(false)] \ No newline at end of file diff --git a/Sandbox/Windows10/SampleData/Properties/SampleData.rd.xml b/Sandbox/Windows10/SampleData/Properties/SampleData.rd.xml deleted file mode 100644 index 95fce0331..000000000 --- a/Sandbox/Windows10/SampleData/Properties/SampleData.rd.xml +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - diff --git a/Sandbox/Windows10/SampleData/SampleData.csproj b/Sandbox/Windows10/SampleData/SampleData.csproj deleted file mode 100644 index 15801f634..000000000 --- a/Sandbox/Windows10/SampleData/SampleData.csproj +++ /dev/null @@ -1,213 +0,0 @@ - - - - - Debug - AnyCPU - {B8442C8A-B688-48D2-8BA7-325A675CC611} - Library - Properties - SampleData - SampleData - en-US - UAP - 10.0.17763.0 - 10.0.16299.0 - 14 - 512 - {A5A43C5B-DE2A-4C0C-9213-0A381AF9435A};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - - - AnyCPU - true - full - false - bin\Debug\ - DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP - prompt - 4 - - - AnyCPU - pdbonly - true - bin\Release\ - TRACE;NETFX_CORE;WINDOWS_UWP - prompt - 4 - - - x86 - true - bin\x86\Debug\ - DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP - ;2008 - full - x86 - false - prompt - - - x86 - bin\x86\Release\ - TRACE;NETFX_CORE;WINDOWS_UWP - true - ;2008 - pdbonly - x86 - false - prompt - - - ARM - true - bin\ARM\Debug\ - DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP - ;2008 - full - ARM - false - prompt - - - ARM - bin\ARM\Release\ - TRACE;NETFX_CORE;WINDOWS_UWP - true - ;2008 - pdbonly - ARM - false - prompt - - - x64 - true - bin\x64\Debug\ - DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP - ;2008 - full - x64 - false - prompt - - - x64 - bin\x64\Release\ - TRACE;NETFX_CORE;WINDOWS_UWP - true - ;2008 - pdbonly - x64 - false - prompt - - - PackageReference - - - - - - - - - - - - - - - - - - - 24.0.0 - - - 6.1.9 - - - 11.0.2 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 14.0 - - - - \ No newline at end of file diff --git a/Sandbox/Windows10/SampleData/StarTrek/Data.json b/Sandbox/Windows10/SampleData/StarTrek/Data.json deleted file mode 100644 index 642dcba91..000000000 --- a/Sandbox/Windows10/SampleData/StarTrek/Data.json +++ /dev/null @@ -1,498 +0,0 @@ -{ - "shows": [ - { - "ordinal": "1", - "abbreviation": "TOS", - "name": "The Original Series" - }, - { - "ordinal": "2", - "abbreviation": "TNG", - "name": "The Next Generation" - }, - { - "ordinal": "3", - "abbreviation": "VOY", - "name": "Voyager" - }, - { - "ordinal": "4", - "abbreviation": "DS9", - "name": "Deep Space Nine" - }, - { - "ordinal": "5", - "abbreviation": "ENT", - "name": "Enterprise" - }, - { - "ordinal": "6", - "abbreviation": "DSC", - "name": "Discovery" - } - ], - "ships": [ - { - "show": "TOS", - "registry": "NCC-1701", - "images": [ { "path": "NCC-1701.jpg" } ], - "name": "USS Enterprise" - }, - { - "show": "TNG", - "registry": "NCC-1701-D", - "images": [ { "path": "NCC-1701-D.jpg" } ], - "name": "USS Enterprise" - }, - { - "show": "VOY", - "registry": "NCC-74656", - "images": [ { "path": "NCC-74656.jpg" } ], - "name": "USS Voyager" - }, - { - "show": "DS9", - "registry": "DS9", - "images": [ { "path": "Deep_space_9.jpg" } ], - "name": "Deep Space 9" - }, - { - "show": "ENT", - "registry": "NX-01", - "images": [ { "path": "NX-01.jpg" } ], - "name": "USS Enterprise" - }, - { - "show": "DSC", - "registry": "NCC-1031", - "images": [ { "path": "NCC-1031.jpg" } ], - "name": "USS Discover" - } - ], - "members": [ - { - "show": "TOS", - "actor": "William Shatner", - "character": "James T. Kirk", - "images": [ { "path": "James_Kirk.jpg" } ], - "gender": "Male", - "species": "Human" - }, - { - "show": "TOS", - "actor": "Leonard Nimoy", - "character": "Spock", - "images": [ { "path": "Spock.jpg" } ], - "gender": "Male", - "species": "Vulcan" - }, - { - "show": "TOS", - "actor": "DeForest Kelley", - "character": "Leonard McCoy", - "images": [ { "path": "Leonard_McCoy.jpg" } ], - "gender": "Male", - "species": "Human" - }, - { - "show": "TOS", - "actor": "James Doohan", - "character": "Montgomery Scott", - "images": [ { "path": "Montgomery_Scott.jpg" } ], - "gender": "Male", - "species": "Human" - }, - { - "show": "TOS", - "actor": "Nichelle Nichols", - "character": "Nyota Uhura", - "images": [ { "path": "Nyota_Uhura.jpg" } ], - "gender": "Female", - "species": "Human" - }, - { - "show": "TOS", - "actor": "George Takei", - "character": "Hikaru Sulu", - "images": [ { "path": "Hikaru_Sulu.jpg" } ], - "gender": "Male", - "species": "Human" - }, - { - "show": "TOS", - "actor": "Walter Koenig", - "character": "Pavel Chekov", - "images": [ { "path": "Pavel_Chekov.jpg" } ], - "gender": "Male", - "species": "Human" - }, - { - "show": "TOS", - "actor": "Majel Barrett", - "character": "Christine Chapel", - "images": [ { "path": "Christine_Chapel.jpg" } ], - "gender": "Female", - "species": "Human" - }, - { - "show": "TOS", - "actor": "Grace Lee Whitney", - "character": "Janice Rand", - "images": [ { "path": "Janice_Rand.jpg" } ], - "gender": "Female", - "species": "Human" - }, - { - "show": "TNG", - "actor": "Patrick Stewart", - "character": "Jean-Luc Picard", - "images": [ { "path": "Jean-Luc_Picard.jpg" } ], - "gender": "Male", - "species": "Human" - }, - { - "show": "TNG", - "actor": "Jonathan Frakes", - "character": "William Riker", - "images": [ { "path": "William_Riker.jpg" } ], - "gender": "Male", - "species": "Human" - }, - { - "show": "TNG", - "actor": "LeVar Burton", - "character": "Geordi La Forge", - "images": [ { "path": "Geordi_La_Forge.jpg" } ], - "gender": "Male", - "species": "Human" - }, - { - "show": "TNG", - "actor": "Denise Crosby", - "character": "Tasha Yar", - "images": [ { "path": "Natasha_Yar.jpg" } ], - "gender": "Female", - "species": "Human" - }, - { - "show": "TNG", - "actor": "Michael Dorn", - "character": "Worf", - "images": [ { "path": "Worf_Tng.jpg" } ], - "gender": "Male", - "species": "Klingon" - }, - { - "show": "TNG", - "actor": "Gates McFadden", - "character": "Beverly Crusher", - "images": [ { "path": "Beverly_Crusher.jpg" } ], - "gender": "Female", - "species": "Human" - }, - { - "show": "TNG", - "actor": "Marina Sirtis", - "character": "Deanna Troi", - "images": [ { "path": "Deanna_Troi.jpg" } ], - "gender": "Female", - "species": "Human" - }, - { - "show": "TNG", - "actor": "Brent Spiner", - "character": "Data", - "images": [ { "path": "Data.jpg" } ], - "gender": "Male", - "species": "Android" - }, - { - "show": "TNG", - "actor": "Wil Wheaton", - "character": "Wesley Crusher", - "images": [ { "path": "Wesley_Crusher.jpg" } ], - "gender": "Male", - "species": "Human" - }, - { - "show": "DS9", - "actor": "Avery Brooks", - "character": "Benjamin Sisko", - "images": [ { "path": "Benjamin_Sisko.jpg" } ], - "gender": "Male", - "species": "Human" - }, - { - "show": "DS9", - "actor": "René Auberjonois", - "character": "Odo", - "images": [ { "path": "Odo.jpg" } ], - "gender": "Male", - "species": "Changeling" - }, - { - "show": "DS9", - "actor": "Terry Farrell", - "character": "Jadzia Dax", - "images": [ { "path": "Jadzia_Dax.jpg" } ], - "gender": "Female", - "species": "Trill" - }, - { - "show": "DS9", - "actor": "Cirroc Lofton", - "character": "Jake Sisko", - "images": [ { "path": "Jake_Sisko.jpg" } ], - "gender": "Male", - "species": "Human" - }, - { - "show": "DS9", - "actor": "Colm Meaney", - "character": "Miles O'Brien", - "images": [ { "path": "Miles_OBrien.jpg" } ], - "gender": "Male", - "species": "Human" - }, - { - "show": "DS9", - "actor": "Armin Shimerman", - "character": "Quark", - "images": [ { "path": "Quark.jpg" } ], - "gender": "Male", - "species": "Ferengi" - }, - { - "show": "DS9", - "actor": "Alexander Siddig", - "character": "Julian Bashir", - "images": [ { "path": "Julian_Bashir.jpg" } ], - "gender": "Male", - "species": "Human" - }, - { - "show": "DS9", - "actor": "Nana Visitor", - "character": "Kira Nerys", - "images": [ { "path": "Kira_Nerys.jpg" } ], - "gender": "Female", - "species": "Bajoran" - }, - { - "show": "DS9", - "actor": "Michael Dorn", - "character": "Worf", - "images": [ { "path": "Worf.jpg" } ], - "gender": "Male", - "species": "Klingon" - }, - { - "show": "DS9", - "actor": "Nicole de Boer", - "character": "Ezri Dax", - "images": [ { "path": "Ezri_Dax.jpg" } ], - "gender": "Female", - "species": "Trill" - }, - { - "show": "VOY", - "actor": "Kate Mulgrew", - "character": "Kathryn Janeway", - "images": [ { "path": "Kathryn_Janeway.jpg" } ], - "gender": "Female", - "species": "Human" - }, - { - "show": "VOY", - "actor": "Robert Beltran", - "character": "Chakotay", - "images": [ { "path": "Chakotay.jpg" } ], - "gender": "Male", - "species": "Human" - }, - { - "show": "VOY", - "actor": "Roxann Dawson", - "character": "B'Elanna Torres", - "images": [ { "path": "BElanna_Torres.jpg" } ], - "gender": "Female", - "species": "Klingon" - }, - { - "show": "VOY", - "actor": "Robert Duncan McNeill", - "character": "Tom Paris", - "images": [ { "path": "Tom_Paris.jpg" } ], - "gender": "Male", - "species": "Human" - }, - { - "show": "VOY", - "actor": "Jennifer Lien", - "character": "Kes", - "images": [ { "path": "Kes.jpg" } ], - "gender": "Female", - "species": "Ocampa" - }, - { - "show": "VOY", - "actor": "Ethan Phillips", - "character": "Neelix", - "images": [ { "path": "Neelix.jpg" } ], - "gender": "Male", - "species": "Talaxian" - }, - { - "show": "VOY", - "actor": "Robert Picardo", - "character": "The Doctor", - "images": [ { "path": "The_Doctor.jpg" } ], - "gender": "Male", - "species": "Hologram" - }, - { - "show": "VOY", - "actor": "Tim Russ", - "character": "Tuvok", - "images": [ { "path": "Tuvok.jpg" } ], - "gender": "Male", - "species": "Vulcan" - }, - { - "show": "VOY", - "actor": "Garrett Wang", - "character": "Harry Kim", - "images": [ { "path": "Harry_Kim.jpg" } ], - "gender": "Male", - "species": "Human" - }, - { - "show": "VOY", - "actor": "Jeri Ryan", - "character": "Seven of Nine", - "images": [ { "path": "Seven_of_Nine.jpg" } ], - "gender": "Female", - "species": "Human" - }, - { - "show": "ENT", - "actor": "Scott Bakula", - "character": "Jonathan Archer", - "images": [ { "path": "Jonathan_Archer.jpg" } ], - "gender": "Male", - "species": "Human" - }, - { - "show": "ENT", - "actor": "Jolene Blalock", - "character": "T'Pol", - "images": [ { "path": "TPol.jpg" } ], - "gender": "Female", - "species": "Vulcan" - }, - { - "show": "ENT", - "actor": "John Billingsley", - "character": "Phlox", - "images": [ { "path": "Phlox.jpg" } ], - "gender": "Male", - "species": "Denobulan" - }, - { - "show": "ENT", - "actor": "Dominic Keating", - "character": "Malcolm Reed", - "images": [ { "path": "Malcolm_Reed.jpg" } ], - "gender": "Male", - "species": "Human" - }, - { - "show": "ENT", - "actor": "Anthony Montgomery", - "character": "Travis Mayweather", - "images": [ { "path": "Travis_Mayweather.jpg" } ], - "gender": "Male", - "species": "Human" - }, - { - "show": "ENT", - "actor": "Linda Park", - "character": "Hoshi Sato", - "images": [ { "path": "Hoshi_Sato.jpg" } ], - "gender": "Female", - "species": "Human" - }, - { - "show": "ENT", - "actor": "Connor Trinneer", - "character": "Charles 'Trip' Tucker III", - "images": [ { "path": "Trip_Tucker.jpg" } ], - "gender": "Male", - "species": "Human" - }, - { - "show": "DSC", - "actor": "Sonequa Martin-Green", - "character": "Michael Burnham", - "images": [ { "path": "Michael_Burnham.jpg" } ], - "gender": "Female", - "species": "Human" - }, - { - "show": "DSC", - "actor": "Doug Jones", - "character": "Saru", - "images": [ { "path": "Saru.jpg" } ], - "gender": "Male", - "species": "Kelpien" - }, - { - "show": "DSC", - "actor": "Shazad Latif", - "character": "Ash Tyler", - "images": [ { "path": "Ash_Tyler.jpg" } ], - "gender": "Male", - "species": "Klingon" - }, - { - "show": "DSC", - "actor": "Anthony Rapp", - "character": "Paul Stamets", - "images": [ { "path": "Paul_Stamets.jpg" } ], - "gender": "Male", - "species": "Human" - }, - { - "show": "DSC", - "actor": "Mary Wiseman", - "character": "Sylvia Tilly", - "images": [ { "path": "Sylvia_Tilly.jpg" } ], - "gender": "Female", - "species": "Human" - }, - { - "show": "DSC", - "actor": "Jason Isaacs", - "character": "Gabriel Lorca", - "images": [ { "path": "Gabriel_Lorca.jpg" } ], - "gender": "Male", - "species": "Human" - }, - { - "show": "DSC", - "actor": "Wilson Cruz", - "character": "Hugh Culber", - "images": [ { "path": "Hugh_Culber.jpg" } ], - "gender": "Male", - "species": "Human" - }, - { - "show": "DSC", - "actor": "Anson Mount", - "character": "Christopher Pike", - "images": [ { "path": "Christopher_Pike.jpg" } ], - "gender": "Male", - "species": "Human" - } - ] -} \ No newline at end of file diff --git a/Sandbox/Windows10/SampleData/StarTrek/Database.cs b/Sandbox/Windows10/SampleData/StarTrek/Database.cs deleted file mode 100644 index c1ee7fc12..000000000 --- a/Sandbox/Windows10/SampleData/StarTrek/Database.cs +++ /dev/null @@ -1,90 +0,0 @@ -using Newtonsoft.Json; -using SampleData.StarTrek; -using System; -using System.Collections.Generic; -using System.Diagnostics; -using System.Linq; -using System.Threading.Tasks; -using Windows.Storage; - -namespace SampleData.StarTrek -{ - public class Database : IDatabase - { - public Member[] Members { get; private set; } - - public string[] Species { get; private set; } - - public string[] Genders { get; private set; } - - public Ship[] Ships { get; private set; } - - public Show[] Shows { get; private set; } - - public bool Open { get; private set; } = false; - - public async Task OpenAsync() - { - if (Open) - { - return Open; - } - - var root = await ReadJson(); - - Species = root.Members.Select(x => x.Species).Distinct().OrderBy(x => x).ToArray(); - - Genders = root.Members.Select(x => x.Gender).Distinct().OrderBy(x => x).ToArray(); - - foreach (var ship in Ships = root.Ships) - { - ship.Image = UpdateImagePaths(ship.Show, ship.Images); - } - - foreach (var member in Members = root.Members) - { - member.Image = UpdateImagePaths(member.Show, member.Images); - } - - foreach (var show in Shows = root.Shows) - { - UpdateImagePaths(show.Abbreviation, show.Images); - show.Image = Ships.First(x => x.Show == show.Abbreviation)?.Images?.First(); - } - - return Open = true; - - Image UpdateImagePaths(string show, params Image[] images) - { - if (images != null) - { - foreach (var image in images) - { - image.Path = $"ms-appx:///SampleData/StarTrek/Images/{show}/{image.Path}"; - } - return images.FirstOrDefault(); - } - else - { - return null; - } - } - - async Task ReadJson() - { - try - { - var path = new Uri("ms-appx:///SampleData/StarTrek/Data.json"); - var file = await StorageFile.GetFileFromApplicationUriAsync(path); - var json = await FileIO.ReadTextAsync(file); - return JsonConvert.DeserializeObject(json); - } - catch (Exception ex) - { - Debugger.Break(); - throw; - } - } - } - } -} diff --git a/Sandbox/Windows10/SampleData/StarTrek/Image.cs b/Sandbox/Windows10/SampleData/StarTrek/Image.cs deleted file mode 100644 index 310724743..000000000 --- a/Sandbox/Windows10/SampleData/StarTrek/Image.cs +++ /dev/null @@ -1,14 +0,0 @@ -using Newtonsoft.Json; -using Windows.UI.Xaml.Media; -using Windows.UI.Xaml.Media.Imaging; - -namespace SampleData.StarTrek -{ - public partial class Image - { - [JsonProperty("path")] - public string Path { get; set; } - - public ImageSource ImageSource => new BitmapImage(new System.Uri(Path, System.UriKind.Absolute)); - } -} \ No newline at end of file diff --git a/Sandbox/Windows10/SampleData/StarTrek/Images/DS9/Benjamin_Sisko.jpg b/Sandbox/Windows10/SampleData/StarTrek/Images/DS9/Benjamin_Sisko.jpg deleted file mode 100644 index 7754994db..000000000 Binary files a/Sandbox/Windows10/SampleData/StarTrek/Images/DS9/Benjamin_Sisko.jpg and /dev/null differ diff --git a/Sandbox/Windows10/SampleData/StarTrek/Images/DS9/Deep_space_9.jpg b/Sandbox/Windows10/SampleData/StarTrek/Images/DS9/Deep_space_9.jpg deleted file mode 100644 index 5d286a625..000000000 Binary files a/Sandbox/Windows10/SampleData/StarTrek/Images/DS9/Deep_space_9.jpg and /dev/null differ diff --git a/Sandbox/Windows10/SampleData/StarTrek/Images/DS9/Ezri_Dax.jpg b/Sandbox/Windows10/SampleData/StarTrek/Images/DS9/Ezri_Dax.jpg deleted file mode 100644 index 0a7141970..000000000 Binary files a/Sandbox/Windows10/SampleData/StarTrek/Images/DS9/Ezri_Dax.jpg and /dev/null differ diff --git a/Sandbox/Windows10/SampleData/StarTrek/Images/DS9/Jadzia_Dax.jpg b/Sandbox/Windows10/SampleData/StarTrek/Images/DS9/Jadzia_Dax.jpg deleted file mode 100644 index aeb6f800b..000000000 Binary files a/Sandbox/Windows10/SampleData/StarTrek/Images/DS9/Jadzia_Dax.jpg and /dev/null differ diff --git a/Sandbox/Windows10/SampleData/StarTrek/Images/DS9/Jake_Sisko.jpg b/Sandbox/Windows10/SampleData/StarTrek/Images/DS9/Jake_Sisko.jpg deleted file mode 100644 index 91e89b010..000000000 Binary files a/Sandbox/Windows10/SampleData/StarTrek/Images/DS9/Jake_Sisko.jpg and /dev/null differ diff --git a/Sandbox/Windows10/SampleData/StarTrek/Images/DS9/Julian_Bashir.jpg b/Sandbox/Windows10/SampleData/StarTrek/Images/DS9/Julian_Bashir.jpg deleted file mode 100644 index 6379ef603..000000000 Binary files a/Sandbox/Windows10/SampleData/StarTrek/Images/DS9/Julian_Bashir.jpg and /dev/null differ diff --git a/Sandbox/Windows10/SampleData/StarTrek/Images/DS9/Kira_Nerys.jpg b/Sandbox/Windows10/SampleData/StarTrek/Images/DS9/Kira_Nerys.jpg deleted file mode 100644 index e8c010212..000000000 Binary files a/Sandbox/Windows10/SampleData/StarTrek/Images/DS9/Kira_Nerys.jpg and /dev/null differ diff --git a/Sandbox/Windows10/SampleData/StarTrek/Images/DS9/Miles_OBrien.jpg b/Sandbox/Windows10/SampleData/StarTrek/Images/DS9/Miles_OBrien.jpg deleted file mode 100644 index 8f51898e1..000000000 Binary files a/Sandbox/Windows10/SampleData/StarTrek/Images/DS9/Miles_OBrien.jpg and /dev/null differ diff --git a/Sandbox/Windows10/SampleData/StarTrek/Images/DS9/Odo.jpg b/Sandbox/Windows10/SampleData/StarTrek/Images/DS9/Odo.jpg deleted file mode 100644 index a902bc893..000000000 Binary files a/Sandbox/Windows10/SampleData/StarTrek/Images/DS9/Odo.jpg and /dev/null differ diff --git a/Sandbox/Windows10/SampleData/StarTrek/Images/DS9/Quark.jpg b/Sandbox/Windows10/SampleData/StarTrek/Images/DS9/Quark.jpg deleted file mode 100644 index 5ffc19cad..000000000 Binary files a/Sandbox/Windows10/SampleData/StarTrek/Images/DS9/Quark.jpg and /dev/null differ diff --git a/Sandbox/Windows10/SampleData/StarTrek/Images/DS9/Worf.jpg b/Sandbox/Windows10/SampleData/StarTrek/Images/DS9/Worf.jpg deleted file mode 100644 index 8fda22159..000000000 Binary files a/Sandbox/Windows10/SampleData/StarTrek/Images/DS9/Worf.jpg and /dev/null differ diff --git a/Sandbox/Windows10/SampleData/StarTrek/Images/DSC/Ash_Tyler.jpg b/Sandbox/Windows10/SampleData/StarTrek/Images/DSC/Ash_Tyler.jpg deleted file mode 100644 index f09f46c15..000000000 Binary files a/Sandbox/Windows10/SampleData/StarTrek/Images/DSC/Ash_Tyler.jpg and /dev/null differ diff --git a/Sandbox/Windows10/SampleData/StarTrek/Images/DSC/Christopher_Pike.jpg b/Sandbox/Windows10/SampleData/StarTrek/Images/DSC/Christopher_Pike.jpg deleted file mode 100644 index 339445f1d..000000000 Binary files a/Sandbox/Windows10/SampleData/StarTrek/Images/DSC/Christopher_Pike.jpg and /dev/null differ diff --git a/Sandbox/Windows10/SampleData/StarTrek/Images/DSC/Gabriel_Lorca.jpg b/Sandbox/Windows10/SampleData/StarTrek/Images/DSC/Gabriel_Lorca.jpg deleted file mode 100644 index 170f9e31b..000000000 Binary files a/Sandbox/Windows10/SampleData/StarTrek/Images/DSC/Gabriel_Lorca.jpg and /dev/null differ diff --git a/Sandbox/Windows10/SampleData/StarTrek/Images/DSC/Hugh_Culber.jpg b/Sandbox/Windows10/SampleData/StarTrek/Images/DSC/Hugh_Culber.jpg deleted file mode 100644 index f18b6710f..000000000 Binary files a/Sandbox/Windows10/SampleData/StarTrek/Images/DSC/Hugh_Culber.jpg and /dev/null differ diff --git a/Sandbox/Windows10/SampleData/StarTrek/Images/DSC/Michael_Burnham.jpg b/Sandbox/Windows10/SampleData/StarTrek/Images/DSC/Michael_Burnham.jpg deleted file mode 100644 index 3b0a4515d..000000000 Binary files a/Sandbox/Windows10/SampleData/StarTrek/Images/DSC/Michael_Burnham.jpg and /dev/null differ diff --git a/Sandbox/Windows10/SampleData/StarTrek/Images/DSC/NCC-1031.jpg b/Sandbox/Windows10/SampleData/StarTrek/Images/DSC/NCC-1031.jpg deleted file mode 100644 index 853938320..000000000 Binary files a/Sandbox/Windows10/SampleData/StarTrek/Images/DSC/NCC-1031.jpg and /dev/null differ diff --git a/Sandbox/Windows10/SampleData/StarTrek/Images/DSC/Paul_Stamets.jpg b/Sandbox/Windows10/SampleData/StarTrek/Images/DSC/Paul_Stamets.jpg deleted file mode 100644 index 7500295f4..000000000 Binary files a/Sandbox/Windows10/SampleData/StarTrek/Images/DSC/Paul_Stamets.jpg and /dev/null differ diff --git a/Sandbox/Windows10/SampleData/StarTrek/Images/DSC/Saru.jpg b/Sandbox/Windows10/SampleData/StarTrek/Images/DSC/Saru.jpg deleted file mode 100644 index 7e440c3d9..000000000 Binary files a/Sandbox/Windows10/SampleData/StarTrek/Images/DSC/Saru.jpg and /dev/null differ diff --git a/Sandbox/Windows10/SampleData/StarTrek/Images/DSC/Sylvia_Tilly.jpg b/Sandbox/Windows10/SampleData/StarTrek/Images/DSC/Sylvia_Tilly.jpg deleted file mode 100644 index 3a9b01fea..000000000 Binary files a/Sandbox/Windows10/SampleData/StarTrek/Images/DSC/Sylvia_Tilly.jpg and /dev/null differ diff --git a/Sandbox/Windows10/SampleData/StarTrek/Images/ENT/Hoshi_Sato.jpg b/Sandbox/Windows10/SampleData/StarTrek/Images/ENT/Hoshi_Sato.jpg deleted file mode 100644 index d09553135..000000000 Binary files a/Sandbox/Windows10/SampleData/StarTrek/Images/ENT/Hoshi_Sato.jpg and /dev/null differ diff --git a/Sandbox/Windows10/SampleData/StarTrek/Images/ENT/Jonathan_Archer.jpg b/Sandbox/Windows10/SampleData/StarTrek/Images/ENT/Jonathan_Archer.jpg deleted file mode 100644 index ba17e9c2f..000000000 Binary files a/Sandbox/Windows10/SampleData/StarTrek/Images/ENT/Jonathan_Archer.jpg and /dev/null differ diff --git a/Sandbox/Windows10/SampleData/StarTrek/Images/ENT/Malcolm_Reed.jpg b/Sandbox/Windows10/SampleData/StarTrek/Images/ENT/Malcolm_Reed.jpg deleted file mode 100644 index 99f70c9e8..000000000 Binary files a/Sandbox/Windows10/SampleData/StarTrek/Images/ENT/Malcolm_Reed.jpg and /dev/null differ diff --git a/Sandbox/Windows10/SampleData/StarTrek/Images/ENT/NX-01.jpg b/Sandbox/Windows10/SampleData/StarTrek/Images/ENT/NX-01.jpg deleted file mode 100644 index b2852d6fa..000000000 Binary files a/Sandbox/Windows10/SampleData/StarTrek/Images/ENT/NX-01.jpg and /dev/null differ diff --git a/Sandbox/Windows10/SampleData/StarTrek/Images/ENT/Phlox.jpg b/Sandbox/Windows10/SampleData/StarTrek/Images/ENT/Phlox.jpg deleted file mode 100644 index 01b6135a9..000000000 Binary files a/Sandbox/Windows10/SampleData/StarTrek/Images/ENT/Phlox.jpg and /dev/null differ diff --git a/Sandbox/Windows10/SampleData/StarTrek/Images/ENT/TPol.jpg b/Sandbox/Windows10/SampleData/StarTrek/Images/ENT/TPol.jpg deleted file mode 100644 index b535a61be..000000000 Binary files a/Sandbox/Windows10/SampleData/StarTrek/Images/ENT/TPol.jpg and /dev/null differ diff --git a/Sandbox/Windows10/SampleData/StarTrek/Images/ENT/Travis_Mayweather.jpg b/Sandbox/Windows10/SampleData/StarTrek/Images/ENT/Travis_Mayweather.jpg deleted file mode 100644 index eae9f00fc..000000000 Binary files a/Sandbox/Windows10/SampleData/StarTrek/Images/ENT/Travis_Mayweather.jpg and /dev/null differ diff --git a/Sandbox/Windows10/SampleData/StarTrek/Images/ENT/Trip_Tucker.jpg b/Sandbox/Windows10/SampleData/StarTrek/Images/ENT/Trip_Tucker.jpg deleted file mode 100644 index c8c37e588..000000000 Binary files a/Sandbox/Windows10/SampleData/StarTrek/Images/ENT/Trip_Tucker.jpg and /dev/null differ diff --git a/Sandbox/Windows10/SampleData/StarTrek/Images/TNG/Beverly_Crusher.jpg b/Sandbox/Windows10/SampleData/StarTrek/Images/TNG/Beverly_Crusher.jpg deleted file mode 100644 index 81fc6b183..000000000 Binary files a/Sandbox/Windows10/SampleData/StarTrek/Images/TNG/Beverly_Crusher.jpg and /dev/null differ diff --git a/Sandbox/Windows10/SampleData/StarTrek/Images/TNG/Data.jpg b/Sandbox/Windows10/SampleData/StarTrek/Images/TNG/Data.jpg deleted file mode 100644 index 4dc027eb5..000000000 Binary files a/Sandbox/Windows10/SampleData/StarTrek/Images/TNG/Data.jpg and /dev/null differ diff --git a/Sandbox/Windows10/SampleData/StarTrek/Images/TNG/Deanna_Troi.jpg b/Sandbox/Windows10/SampleData/StarTrek/Images/TNG/Deanna_Troi.jpg deleted file mode 100644 index 490932819..000000000 Binary files a/Sandbox/Windows10/SampleData/StarTrek/Images/TNG/Deanna_Troi.jpg and /dev/null differ diff --git a/Sandbox/Windows10/SampleData/StarTrek/Images/TNG/Geordi_La_Forge.jpg b/Sandbox/Windows10/SampleData/StarTrek/Images/TNG/Geordi_La_Forge.jpg deleted file mode 100644 index 70aabad2b..000000000 Binary files a/Sandbox/Windows10/SampleData/StarTrek/Images/TNG/Geordi_La_Forge.jpg and /dev/null differ diff --git a/Sandbox/Windows10/SampleData/StarTrek/Images/TNG/Jean-Luc_Picard.jpg b/Sandbox/Windows10/SampleData/StarTrek/Images/TNG/Jean-Luc_Picard.jpg deleted file mode 100644 index b7fe88703..000000000 Binary files a/Sandbox/Windows10/SampleData/StarTrek/Images/TNG/Jean-Luc_Picard.jpg and /dev/null differ diff --git a/Sandbox/Windows10/SampleData/StarTrek/Images/TNG/NCC-1701-D.jpg b/Sandbox/Windows10/SampleData/StarTrek/Images/TNG/NCC-1701-D.jpg deleted file mode 100644 index eb556c8e8..000000000 Binary files a/Sandbox/Windows10/SampleData/StarTrek/Images/TNG/NCC-1701-D.jpg and /dev/null differ diff --git a/Sandbox/Windows10/SampleData/StarTrek/Images/TNG/Natasha_Yar.jpg b/Sandbox/Windows10/SampleData/StarTrek/Images/TNG/Natasha_Yar.jpg deleted file mode 100644 index 4e8bd88c0..000000000 Binary files a/Sandbox/Windows10/SampleData/StarTrek/Images/TNG/Natasha_Yar.jpg and /dev/null differ diff --git a/Sandbox/Windows10/SampleData/StarTrek/Images/TNG/Wesley_Crusher.jpg b/Sandbox/Windows10/SampleData/StarTrek/Images/TNG/Wesley_Crusher.jpg deleted file mode 100644 index 97fb5722a..000000000 Binary files a/Sandbox/Windows10/SampleData/StarTrek/Images/TNG/Wesley_Crusher.jpg and /dev/null differ diff --git a/Sandbox/Windows10/SampleData/StarTrek/Images/TNG/William_Riker.jpg b/Sandbox/Windows10/SampleData/StarTrek/Images/TNG/William_Riker.jpg deleted file mode 100644 index 4b9b436aa..000000000 Binary files a/Sandbox/Windows10/SampleData/StarTrek/Images/TNG/William_Riker.jpg and /dev/null differ diff --git a/Sandbox/Windows10/SampleData/StarTrek/Images/TNG/Worf_Tng.jpg b/Sandbox/Windows10/SampleData/StarTrek/Images/TNG/Worf_Tng.jpg deleted file mode 100644 index 61623a6c2..000000000 Binary files a/Sandbox/Windows10/SampleData/StarTrek/Images/TNG/Worf_Tng.jpg and /dev/null differ diff --git a/Sandbox/Windows10/SampleData/StarTrek/Images/TOS/Christine_Chapel.jpg b/Sandbox/Windows10/SampleData/StarTrek/Images/TOS/Christine_Chapel.jpg deleted file mode 100644 index af4703364..000000000 Binary files a/Sandbox/Windows10/SampleData/StarTrek/Images/TOS/Christine_Chapel.jpg and /dev/null differ diff --git a/Sandbox/Windows10/SampleData/StarTrek/Images/TOS/Hikaru_Sulu.jpg b/Sandbox/Windows10/SampleData/StarTrek/Images/TOS/Hikaru_Sulu.jpg deleted file mode 100644 index 689b4b1f5..000000000 Binary files a/Sandbox/Windows10/SampleData/StarTrek/Images/TOS/Hikaru_Sulu.jpg and /dev/null differ diff --git a/Sandbox/Windows10/SampleData/StarTrek/Images/TOS/James_Kirk.jpg b/Sandbox/Windows10/SampleData/StarTrek/Images/TOS/James_Kirk.jpg deleted file mode 100644 index 169246233..000000000 Binary files a/Sandbox/Windows10/SampleData/StarTrek/Images/TOS/James_Kirk.jpg and /dev/null differ diff --git a/Sandbox/Windows10/SampleData/StarTrek/Images/TOS/Janice_Rand.jpg b/Sandbox/Windows10/SampleData/StarTrek/Images/TOS/Janice_Rand.jpg deleted file mode 100644 index 900eefe94..000000000 Binary files a/Sandbox/Windows10/SampleData/StarTrek/Images/TOS/Janice_Rand.jpg and /dev/null differ diff --git a/Sandbox/Windows10/SampleData/StarTrek/Images/TOS/Leonard_McCoy.jpg b/Sandbox/Windows10/SampleData/StarTrek/Images/TOS/Leonard_McCoy.jpg deleted file mode 100644 index d3f78b9d2..000000000 Binary files a/Sandbox/Windows10/SampleData/StarTrek/Images/TOS/Leonard_McCoy.jpg and /dev/null differ diff --git a/Sandbox/Windows10/SampleData/StarTrek/Images/TOS/Montgomery_Scott.jpg b/Sandbox/Windows10/SampleData/StarTrek/Images/TOS/Montgomery_Scott.jpg deleted file mode 100644 index 56dd16756..000000000 Binary files a/Sandbox/Windows10/SampleData/StarTrek/Images/TOS/Montgomery_Scott.jpg and /dev/null differ diff --git a/Sandbox/Windows10/SampleData/StarTrek/Images/TOS/NCC-1701.jpg b/Sandbox/Windows10/SampleData/StarTrek/Images/TOS/NCC-1701.jpg deleted file mode 100644 index d48be6659..000000000 Binary files a/Sandbox/Windows10/SampleData/StarTrek/Images/TOS/NCC-1701.jpg and /dev/null differ diff --git a/Sandbox/Windows10/SampleData/StarTrek/Images/TOS/Nyota_Uhura.jpg b/Sandbox/Windows10/SampleData/StarTrek/Images/TOS/Nyota_Uhura.jpg deleted file mode 100644 index b62e80492..000000000 Binary files a/Sandbox/Windows10/SampleData/StarTrek/Images/TOS/Nyota_Uhura.jpg and /dev/null differ diff --git a/Sandbox/Windows10/SampleData/StarTrek/Images/TOS/Pavel_Chekov.jpg b/Sandbox/Windows10/SampleData/StarTrek/Images/TOS/Pavel_Chekov.jpg deleted file mode 100644 index e74fc693c..000000000 Binary files a/Sandbox/Windows10/SampleData/StarTrek/Images/TOS/Pavel_Chekov.jpg and /dev/null differ diff --git a/Sandbox/Windows10/SampleData/StarTrek/Images/TOS/Spock.jpg b/Sandbox/Windows10/SampleData/StarTrek/Images/TOS/Spock.jpg deleted file mode 100644 index 17c5cbb15..000000000 Binary files a/Sandbox/Windows10/SampleData/StarTrek/Images/TOS/Spock.jpg and /dev/null differ diff --git a/Sandbox/Windows10/SampleData/StarTrek/Images/VOY/BElanna_Torres.jpg b/Sandbox/Windows10/SampleData/StarTrek/Images/VOY/BElanna_Torres.jpg deleted file mode 100644 index 8ad74d34e..000000000 Binary files a/Sandbox/Windows10/SampleData/StarTrek/Images/VOY/BElanna_Torres.jpg and /dev/null differ diff --git a/Sandbox/Windows10/SampleData/StarTrek/Images/VOY/Chakotay.jpg b/Sandbox/Windows10/SampleData/StarTrek/Images/VOY/Chakotay.jpg deleted file mode 100644 index 77f6587d4..000000000 Binary files a/Sandbox/Windows10/SampleData/StarTrek/Images/VOY/Chakotay.jpg and /dev/null differ diff --git a/Sandbox/Windows10/SampleData/StarTrek/Images/VOY/Harry_Kim.jpg b/Sandbox/Windows10/SampleData/StarTrek/Images/VOY/Harry_Kim.jpg deleted file mode 100644 index 0d425017f..000000000 Binary files a/Sandbox/Windows10/SampleData/StarTrek/Images/VOY/Harry_Kim.jpg and /dev/null differ diff --git a/Sandbox/Windows10/SampleData/StarTrek/Images/VOY/Kathryn_Janeway.jpg b/Sandbox/Windows10/SampleData/StarTrek/Images/VOY/Kathryn_Janeway.jpg deleted file mode 100644 index b2a8ea41e..000000000 Binary files a/Sandbox/Windows10/SampleData/StarTrek/Images/VOY/Kathryn_Janeway.jpg and /dev/null differ diff --git a/Sandbox/Windows10/SampleData/StarTrek/Images/VOY/Kes.jpg b/Sandbox/Windows10/SampleData/StarTrek/Images/VOY/Kes.jpg deleted file mode 100644 index 277f8bfd1..000000000 Binary files a/Sandbox/Windows10/SampleData/StarTrek/Images/VOY/Kes.jpg and /dev/null differ diff --git a/Sandbox/Windows10/SampleData/StarTrek/Images/VOY/NCC-74656.jpg b/Sandbox/Windows10/SampleData/StarTrek/Images/VOY/NCC-74656.jpg deleted file mode 100644 index 681d4f394..000000000 Binary files a/Sandbox/Windows10/SampleData/StarTrek/Images/VOY/NCC-74656.jpg and /dev/null differ diff --git a/Sandbox/Windows10/SampleData/StarTrek/Images/VOY/Neelix.jpg b/Sandbox/Windows10/SampleData/StarTrek/Images/VOY/Neelix.jpg deleted file mode 100644 index 6fd61693e..000000000 Binary files a/Sandbox/Windows10/SampleData/StarTrek/Images/VOY/Neelix.jpg and /dev/null differ diff --git a/Sandbox/Windows10/SampleData/StarTrek/Images/VOY/Seven_of_Nine.jpg b/Sandbox/Windows10/SampleData/StarTrek/Images/VOY/Seven_of_Nine.jpg deleted file mode 100644 index e20172eaa..000000000 Binary files a/Sandbox/Windows10/SampleData/StarTrek/Images/VOY/Seven_of_Nine.jpg and /dev/null differ diff --git a/Sandbox/Windows10/SampleData/StarTrek/Images/VOY/The_Doctor.jpg b/Sandbox/Windows10/SampleData/StarTrek/Images/VOY/The_Doctor.jpg deleted file mode 100644 index 4348a5696..000000000 Binary files a/Sandbox/Windows10/SampleData/StarTrek/Images/VOY/The_Doctor.jpg and /dev/null differ diff --git a/Sandbox/Windows10/SampleData/StarTrek/Images/VOY/Tom_Paris.jpg b/Sandbox/Windows10/SampleData/StarTrek/Images/VOY/Tom_Paris.jpg deleted file mode 100644 index 3ea064545..000000000 Binary files a/Sandbox/Windows10/SampleData/StarTrek/Images/VOY/Tom_Paris.jpg and /dev/null differ diff --git a/Sandbox/Windows10/SampleData/StarTrek/Images/VOY/Tuvok.jpg b/Sandbox/Windows10/SampleData/StarTrek/Images/VOY/Tuvok.jpg deleted file mode 100644 index f11dcebc6..000000000 Binary files a/Sandbox/Windows10/SampleData/StarTrek/Images/VOY/Tuvok.jpg and /dev/null differ diff --git a/Sandbox/Windows10/SampleData/StarTrek/JsonRoot.cs b/Sandbox/Windows10/SampleData/StarTrek/JsonRoot.cs deleted file mode 100644 index b5a757a1a..000000000 --- a/Sandbox/Windows10/SampleData/StarTrek/JsonRoot.cs +++ /dev/null @@ -1,20 +0,0 @@ -using Newtonsoft.Json; - -namespace SampleData.StarTrek -{ - // represents the root of the json document read by the database - - public partial class JsonRoot - { - [JsonProperty("shows")] - public Show[] Shows { get; set; } - - [JsonProperty("ships")] - public Ship[] Ships { get; set; } - - [JsonProperty("members")] - public Member[] Members { get; set; } - - public Image Image { get; set; } - } -} diff --git a/Sandbox/Windows10/SampleData/StarTrek/Member.cs b/Sandbox/Windows10/SampleData/StarTrek/Member.cs deleted file mode 100644 index ee0035705..000000000 --- a/Sandbox/Windows10/SampleData/StarTrek/Member.cs +++ /dev/null @@ -1,47 +0,0 @@ -using Newtonsoft.Json; - -namespace SampleData.StarTrek -{ - public partial class Member - { - [JsonProperty("show")] - public string Show { get; set; } - - [JsonProperty("actor")] - public string Actor { get; set; } - - [JsonProperty("gender")] - public string Gender { get; set; } - - [JsonProperty("character")] - public string Character { get; set; } - - [JsonProperty("images")] - public Image[] Images { get; set; } - - [JsonProperty("species")] - public string Species { get; set; } - - public Image Image { get; set; } - - public string ToJson() => JsonConvert.SerializeObject(this); - public static bool TryFromJson(string json, out Member member) - { - try - { - member = JsonConvert.DeserializeObject(json); - return true; - } - catch (System.Exception) - { - member = default(Member); - return false; - } - } - - public override string ToString() - { - return $"{Character} by {Actor}"; - } - } -} \ No newline at end of file diff --git a/Sandbox/Windows10/SampleData/StarTrek/Ship.cs b/Sandbox/Windows10/SampleData/StarTrek/Ship.cs deleted file mode 100644 index 7a63954f1..000000000 --- a/Sandbox/Windows10/SampleData/StarTrek/Ship.cs +++ /dev/null @@ -1,21 +0,0 @@ -using Newtonsoft.Json; - -namespace SampleData.StarTrek -{ - public partial class Ship - { - [JsonProperty("show")] - public string Show { get; set; } - - [JsonProperty("registry")] - public string Registry { get; set; } - - [JsonProperty("images")] - public Image[] Images { get; set; } - - [JsonProperty("name")] - public string Name { get; set; } - - public Image Image { get; set; } - } -} \ No newline at end of file diff --git a/Sandbox/Windows10/SampleData/StarTrek/Show.cs b/Sandbox/Windows10/SampleData/StarTrek/Show.cs deleted file mode 100644 index 01e4b92f8..000000000 --- a/Sandbox/Windows10/SampleData/StarTrek/Show.cs +++ /dev/null @@ -1,27 +0,0 @@ -using Newtonsoft.Json; - -namespace SampleData.StarTrek -{ - public partial class Show - { - - [JsonProperty("ordinal")] - public string Ordinal { get; set; } - - [JsonProperty("abbreviation")] - public string Abbreviation { get; set; } - - [JsonProperty("name")] - public string Name { get; set; } - - [JsonProperty("images")] - public Image[] Images { get; set; } - - public Image Image { get; set; } - - public override string ToString() - { - return $"{Ordinal} {Abbreviation} {Name}"; - } - } -} \ No newline at end of file diff --git a/Source/Prism/Prism.csproj b/Source/Prism/Prism.csproj index ee7118db0..c951a93e7 100644 --- a/Source/Prism/Prism.csproj +++ b/Source/Prism/Prism.csproj @@ -1,7 +1,7 @@  - netstandard2.0;netcoreapp3.0;net45;uap10.0.15063;uap10.0.16299 + netstandard2.0;netcoreapp3.0;net45 Prism Prism.Core pdbonly diff --git a/Source/PrismLibrary.sln b/Source/PrismLibrary.sln index 1d36aa3e3..4c90dad4d 100644 --- a/Source/PrismLibrary.sln +++ b/Source/PrismLibrary.sln @@ -31,7 +31,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tests", "Tests", "{AD25EEBB EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tests", "Tests", "{2556BF50-B8A0-4F08-8309-FE53A1B9EFC6}" EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Win10", "Win10", "{785CEF4D-2A96-4B25-91A9-3C18EF055223}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tests", "Tests", "{BD870EC2-18B3-4537-A74A-63784B915EB8}" EndProject @@ -41,10 +40,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Prism.DryIoc.Wpf.Tests", "W EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Prism.DryIoc.Wpf", "Wpf\Prism.DryIoc.Wpf\Prism.DryIoc.Wpf.csproj", "{8ACF42B5-7765-44D0-BA22-D320F7ABC911}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Prism.Windows", "Windows10\Prism.Windows\Prism.Windows.csproj", "{3B7C3599-A336-4DB2-8678-710E3B36203B}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Prism.Unity.Windows", "Windows10\Prism.Unity.Windows\Prism.Unity.Windows.csproj", "{B4060AD6-7A34-479C-B5EB-4C542A681F42}" -EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Prism.Forms.Tests", "Xamarin\Prism.Forms.Tests\Prism.Forms.Tests.csproj", "{C8C1CC40-9850-49D5-92F1-2126DDC1EC8B}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Prism.DryIoc.Forms.Tests", "Xamarin\Prism.DryIoc.Forms.Tests\Prism.DryIoc.Forms.Tests.csproj", "{5DB3F17B-EF88-431D-A8FE-3DED63F0EB7F}" @@ -53,8 +48,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Prism.Unity.Forms.Tests", " EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Prism.Ninject.Wpf.Tests", "Wpf\Prism.Ninject.Wpf.Tests\Prism.Ninject.Wpf.Tests.csproj", "{E20AAE94-4851-4BAB-A0D3-66FBBFFD6531}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Prism.DryIoc.Windows", "Windows10\Prism.DryIoc.Windows\Prism.DryIoc.Windows.csproj", "{1691BA2E-8DE6-4FF4-9970-5E3F5813149A}" -EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -215,38 +208,6 @@ Global {8ACF42B5-7765-44D0-BA22-D320F7ABC911}.Release|x64.Build.0 = Release|Any CPU {8ACF42B5-7765-44D0-BA22-D320F7ABC911}.Release|x86.ActiveCfg = Release|Any CPU {8ACF42B5-7765-44D0-BA22-D320F7ABC911}.Release|x86.Build.0 = Release|Any CPU - {3B7C3599-A336-4DB2-8678-710E3B36203B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {3B7C3599-A336-4DB2-8678-710E3B36203B}.Debug|Any CPU.Build.0 = Debug|Any CPU - {3B7C3599-A336-4DB2-8678-710E3B36203B}.Debug|ARM.ActiveCfg = Debug|Any CPU - {3B7C3599-A336-4DB2-8678-710E3B36203B}.Debug|ARM.Build.0 = Debug|Any CPU - {3B7C3599-A336-4DB2-8678-710E3B36203B}.Debug|x64.ActiveCfg = Debug|Any CPU - {3B7C3599-A336-4DB2-8678-710E3B36203B}.Debug|x64.Build.0 = Debug|Any CPU - {3B7C3599-A336-4DB2-8678-710E3B36203B}.Debug|x86.ActiveCfg = Debug|Any CPU - {3B7C3599-A336-4DB2-8678-710E3B36203B}.Debug|x86.Build.0 = Debug|Any CPU - {3B7C3599-A336-4DB2-8678-710E3B36203B}.Release|Any CPU.ActiveCfg = Release|Any CPU - {3B7C3599-A336-4DB2-8678-710E3B36203B}.Release|Any CPU.Build.0 = Release|Any CPU - {3B7C3599-A336-4DB2-8678-710E3B36203B}.Release|ARM.ActiveCfg = Release|Any CPU - {3B7C3599-A336-4DB2-8678-710E3B36203B}.Release|ARM.Build.0 = Release|Any CPU - {3B7C3599-A336-4DB2-8678-710E3B36203B}.Release|x64.ActiveCfg = Release|Any CPU - {3B7C3599-A336-4DB2-8678-710E3B36203B}.Release|x64.Build.0 = Release|Any CPU - {3B7C3599-A336-4DB2-8678-710E3B36203B}.Release|x86.ActiveCfg = Release|Any CPU - {3B7C3599-A336-4DB2-8678-710E3B36203B}.Release|x86.Build.0 = Release|Any CPU - {B4060AD6-7A34-479C-B5EB-4C542A681F42}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {B4060AD6-7A34-479C-B5EB-4C542A681F42}.Debug|Any CPU.Build.0 = Debug|Any CPU - {B4060AD6-7A34-479C-B5EB-4C542A681F42}.Debug|ARM.ActiveCfg = Debug|Any CPU - {B4060AD6-7A34-479C-B5EB-4C542A681F42}.Debug|ARM.Build.0 = Debug|Any CPU - {B4060AD6-7A34-479C-B5EB-4C542A681F42}.Debug|x64.ActiveCfg = Debug|Any CPU - {B4060AD6-7A34-479C-B5EB-4C542A681F42}.Debug|x64.Build.0 = Debug|Any CPU - {B4060AD6-7A34-479C-B5EB-4C542A681F42}.Debug|x86.ActiveCfg = Debug|Any CPU - {B4060AD6-7A34-479C-B5EB-4C542A681F42}.Debug|x86.Build.0 = Debug|Any CPU - {B4060AD6-7A34-479C-B5EB-4C542A681F42}.Release|Any CPU.ActiveCfg = Release|Any CPU - {B4060AD6-7A34-479C-B5EB-4C542A681F42}.Release|Any CPU.Build.0 = Release|Any CPU - {B4060AD6-7A34-479C-B5EB-4C542A681F42}.Release|ARM.ActiveCfg = Release|Any CPU - {B4060AD6-7A34-479C-B5EB-4C542A681F42}.Release|ARM.Build.0 = Release|Any CPU - {B4060AD6-7A34-479C-B5EB-4C542A681F42}.Release|x64.ActiveCfg = Release|Any CPU - {B4060AD6-7A34-479C-B5EB-4C542A681F42}.Release|x64.Build.0 = Release|Any CPU - {B4060AD6-7A34-479C-B5EB-4C542A681F42}.Release|x86.ActiveCfg = Release|Any CPU - {B4060AD6-7A34-479C-B5EB-4C542A681F42}.Release|x86.Build.0 = Release|Any CPU {C8C1CC40-9850-49D5-92F1-2126DDC1EC8B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {C8C1CC40-9850-49D5-92F1-2126DDC1EC8B}.Debug|Any CPU.Build.0 = Debug|Any CPU {C8C1CC40-9850-49D5-92F1-2126DDC1EC8B}.Debug|ARM.ActiveCfg = Debug|Any CPU @@ -311,22 +272,6 @@ Global {E20AAE94-4851-4BAB-A0D3-66FBBFFD6531}.Release|x64.Build.0 = Release|Any CPU {E20AAE94-4851-4BAB-A0D3-66FBBFFD6531}.Release|x86.ActiveCfg = Release|Any CPU {E20AAE94-4851-4BAB-A0D3-66FBBFFD6531}.Release|x86.Build.0 = Release|Any CPU - {1691BA2E-8DE6-4FF4-9970-5E3F5813149A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {1691BA2E-8DE6-4FF4-9970-5E3F5813149A}.Debug|Any CPU.Build.0 = Debug|Any CPU - {1691BA2E-8DE6-4FF4-9970-5E3F5813149A}.Debug|ARM.ActiveCfg = Debug|Any CPU - {1691BA2E-8DE6-4FF4-9970-5E3F5813149A}.Debug|ARM.Build.0 = Debug|Any CPU - {1691BA2E-8DE6-4FF4-9970-5E3F5813149A}.Debug|x64.ActiveCfg = Debug|Any CPU - {1691BA2E-8DE6-4FF4-9970-5E3F5813149A}.Debug|x64.Build.0 = Debug|Any CPU - {1691BA2E-8DE6-4FF4-9970-5E3F5813149A}.Debug|x86.ActiveCfg = Debug|Any CPU - {1691BA2E-8DE6-4FF4-9970-5E3F5813149A}.Debug|x86.Build.0 = Debug|Any CPU - {1691BA2E-8DE6-4FF4-9970-5E3F5813149A}.Release|Any CPU.ActiveCfg = Release|Any CPU - {1691BA2E-8DE6-4FF4-9970-5E3F5813149A}.Release|Any CPU.Build.0 = Release|Any CPU - {1691BA2E-8DE6-4FF4-9970-5E3F5813149A}.Release|ARM.ActiveCfg = Release|Any CPU - {1691BA2E-8DE6-4FF4-9970-5E3F5813149A}.Release|ARM.Build.0 = Release|Any CPU - {1691BA2E-8DE6-4FF4-9970-5E3F5813149A}.Release|x64.ActiveCfg = Release|Any CPU - {1691BA2E-8DE6-4FF4-9970-5E3F5813149A}.Release|x64.Build.0 = Release|Any CPU - {1691BA2E-8DE6-4FF4-9970-5E3F5813149A}.Release|x86.ActiveCfg = Release|Any CPU - {1691BA2E-8DE6-4FF4-9970-5E3F5813149A}.Release|x86.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -342,17 +287,13 @@ Global {FF6F1B2C-BECC-4477-B918-B75615BAA3A5} = {AD25EEBB-B23F-4238-BF4B-0E3199142E7F} {AD25EEBB-B23F-4238-BF4B-0E3199142E7F} = {6BED0A37-BE6B-42D2-AAF0-C612FF57D9EB} {2556BF50-B8A0-4F08-8309-FE53A1B9EFC6} = {77BDC65B-6FFD-447F-82A5-BA026A7719AE} - {BD870EC2-18B3-4537-A74A-63784B915EB8} = {785CEF4D-2A96-4B25-91A9-3C18EF055223} {CC969CD2-BE7E-4A83-BB5E-55E504C96E79} = {77BDC65B-6FFD-447F-82A5-BA026A7719AE} {FCF3AC90-40B9-40D1-A2B7-754251DEFC1D} = {AD25EEBB-B23F-4238-BF4B-0E3199142E7F} {8ACF42B5-7765-44D0-BA22-D320F7ABC911} = {6BED0A37-BE6B-42D2-AAF0-C612FF57D9EB} - {3B7C3599-A336-4DB2-8678-710E3B36203B} = {785CEF4D-2A96-4B25-91A9-3C18EF055223} - {B4060AD6-7A34-479C-B5EB-4C542A681F42} = {785CEF4D-2A96-4B25-91A9-3C18EF055223} {C8C1CC40-9850-49D5-92F1-2126DDC1EC8B} = {2556BF50-B8A0-4F08-8309-FE53A1B9EFC6} {5DB3F17B-EF88-431D-A8FE-3DED63F0EB7F} = {2556BF50-B8A0-4F08-8309-FE53A1B9EFC6} {CCE50109-7ED2-4D7D-948F-6CB36AD767DB} = {2556BF50-B8A0-4F08-8309-FE53A1B9EFC6} {E20AAE94-4851-4BAB-A0D3-66FBBFFD6531} = {AD25EEBB-B23F-4238-BF4B-0E3199142E7F} - {1691BA2E-8DE6-4FF4-9970-5E3F5813149A} = {785CEF4D-2A96-4B25-91A9-3C18EF055223} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {9A6B5A49-790C-425F-BBF5-99D104959C33} diff --git a/Source/PrismLibrary_Win10.sln b/Source/PrismLibrary_Win10.sln deleted file mode 100644 index 00fa7ac7a..000000000 --- a/Source/PrismLibrary_Win10.sln +++ /dev/null @@ -1,126 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 15 -VisualStudioVersion = 15.0.26730.16 -MinimumVisualStudioVersion = 15.0.26124.0 -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Prism", "Prism\Prism.csproj", "{E6C50355-D01E-4CAA-884D-D7929861315C}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Core", "Core", "{643425A5-9223-491A-84D9-DFCC6BDD7F9B}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Prism.Tests", "Prism.Tests\Prism.Tests.csproj", "{B6E74918-D92B-4690-BEC9-0BB199A6E933}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tests", "Tests", "{ACFF5AEC-62BC-421B-B37E-A5703806901A}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Prism.Windows", "Windows10\Prism.Windows\Prism.Windows.csproj", "{3B7C3599-A336-4DB2-8678-710E3B36203B}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Prism.Unity.Windows", "Windows10\Prism.Unity.Windows\Prism.Unity.Windows.csproj", "{CC3018EB-6D2B-4306-94A1-3A7CBA7A8F18}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Prism.DryIoc.Windows", "Windows10\Prism.DryIoc.Windows\Prism.DryIoc.Windows.csproj", "{A184F10A-BCF0-45FC-A100-B3C355A52494}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Debug|ARM = Debug|ARM - Debug|x64 = Debug|x64 - Debug|x86 = Debug|x86 - Release|Any CPU = Release|Any CPU - Release|ARM = Release|ARM - Release|x64 = Release|x64 - Release|x86 = Release|x86 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {E6C50355-D01E-4CAA-884D-D7929861315C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {E6C50355-D01E-4CAA-884D-D7929861315C}.Debug|Any CPU.Build.0 = Debug|Any CPU - {E6C50355-D01E-4CAA-884D-D7929861315C}.Debug|ARM.ActiveCfg = Debug|Any CPU - {E6C50355-D01E-4CAA-884D-D7929861315C}.Debug|ARM.Build.0 = Debug|Any CPU - {E6C50355-D01E-4CAA-884D-D7929861315C}.Debug|x64.ActiveCfg = Debug|Any CPU - {E6C50355-D01E-4CAA-884D-D7929861315C}.Debug|x64.Build.0 = Debug|Any CPU - {E6C50355-D01E-4CAA-884D-D7929861315C}.Debug|x86.ActiveCfg = Debug|Any CPU - {E6C50355-D01E-4CAA-884D-D7929861315C}.Debug|x86.Build.0 = Debug|Any CPU - {E6C50355-D01E-4CAA-884D-D7929861315C}.Release|Any CPU.ActiveCfg = Release|Any CPU - {E6C50355-D01E-4CAA-884D-D7929861315C}.Release|Any CPU.Build.0 = Release|Any CPU - {E6C50355-D01E-4CAA-884D-D7929861315C}.Release|ARM.ActiveCfg = Release|Any CPU - {E6C50355-D01E-4CAA-884D-D7929861315C}.Release|ARM.Build.0 = Release|Any CPU - {E6C50355-D01E-4CAA-884D-D7929861315C}.Release|x64.ActiveCfg = Release|Any CPU - {E6C50355-D01E-4CAA-884D-D7929861315C}.Release|x64.Build.0 = Release|Any CPU - {E6C50355-D01E-4CAA-884D-D7929861315C}.Release|x86.ActiveCfg = Release|Any CPU - {E6C50355-D01E-4CAA-884D-D7929861315C}.Release|x86.Build.0 = Release|Any CPU - {B6E74918-D92B-4690-BEC9-0BB199A6E933}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {B6E74918-D92B-4690-BEC9-0BB199A6E933}.Debug|Any CPU.Build.0 = Debug|Any CPU - {B6E74918-D92B-4690-BEC9-0BB199A6E933}.Debug|ARM.ActiveCfg = Debug|Any CPU - {B6E74918-D92B-4690-BEC9-0BB199A6E933}.Debug|ARM.Build.0 = Debug|Any CPU - {B6E74918-D92B-4690-BEC9-0BB199A6E933}.Debug|x64.ActiveCfg = Debug|Any CPU - {B6E74918-D92B-4690-BEC9-0BB199A6E933}.Debug|x64.Build.0 = Debug|Any CPU - {B6E74918-D92B-4690-BEC9-0BB199A6E933}.Debug|x86.ActiveCfg = Debug|Any CPU - {B6E74918-D92B-4690-BEC9-0BB199A6E933}.Debug|x86.Build.0 = Debug|Any CPU - {B6E74918-D92B-4690-BEC9-0BB199A6E933}.Release|Any CPU.ActiveCfg = Release|Any CPU - {B6E74918-D92B-4690-BEC9-0BB199A6E933}.Release|Any CPU.Build.0 = Release|Any CPU - {B6E74918-D92B-4690-BEC9-0BB199A6E933}.Release|ARM.ActiveCfg = Release|Any CPU - {B6E74918-D92B-4690-BEC9-0BB199A6E933}.Release|ARM.Build.0 = Release|Any CPU - {B6E74918-D92B-4690-BEC9-0BB199A6E933}.Release|x64.ActiveCfg = Release|Any CPU - {B6E74918-D92B-4690-BEC9-0BB199A6E933}.Release|x64.Build.0 = Release|Any CPU - {B6E74918-D92B-4690-BEC9-0BB199A6E933}.Release|x86.ActiveCfg = Release|Any CPU - {B6E74918-D92B-4690-BEC9-0BB199A6E933}.Release|x86.Build.0 = Release|Any CPU - {3B7C3599-A336-4DB2-8678-710E3B36203B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {3B7C3599-A336-4DB2-8678-710E3B36203B}.Debug|Any CPU.Build.0 = Debug|Any CPU - {3B7C3599-A336-4DB2-8678-710E3B36203B}.Debug|ARM.ActiveCfg = Debug|Any CPU - {3B7C3599-A336-4DB2-8678-710E3B36203B}.Debug|ARM.Build.0 = Debug|Any CPU - {3B7C3599-A336-4DB2-8678-710E3B36203B}.Debug|x64.ActiveCfg = Debug|Any CPU - {3B7C3599-A336-4DB2-8678-710E3B36203B}.Debug|x64.Build.0 = Debug|Any CPU - {3B7C3599-A336-4DB2-8678-710E3B36203B}.Debug|x86.ActiveCfg = Debug|Any CPU - {3B7C3599-A336-4DB2-8678-710E3B36203B}.Debug|x86.Build.0 = Debug|Any CPU - {3B7C3599-A336-4DB2-8678-710E3B36203B}.Release|Any CPU.ActiveCfg = Release|Any CPU - {3B7C3599-A336-4DB2-8678-710E3B36203B}.Release|Any CPU.Build.0 = Release|Any CPU - {3B7C3599-A336-4DB2-8678-710E3B36203B}.Release|ARM.ActiveCfg = Release|Any CPU - {3B7C3599-A336-4DB2-8678-710E3B36203B}.Release|ARM.Build.0 = Release|Any CPU - {3B7C3599-A336-4DB2-8678-710E3B36203B}.Release|x64.ActiveCfg = Release|Any CPU - {3B7C3599-A336-4DB2-8678-710E3B36203B}.Release|x64.Build.0 = Release|Any CPU - {3B7C3599-A336-4DB2-8678-710E3B36203B}.Release|x86.ActiveCfg = Release|Any CPU - {3B7C3599-A336-4DB2-8678-710E3B36203B}.Release|x86.Build.0 = Release|Any CPU - {CC3018EB-6D2B-4306-94A1-3A7CBA7A8F18}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {CC3018EB-6D2B-4306-94A1-3A7CBA7A8F18}.Debug|Any CPU.Build.0 = Debug|Any CPU - {CC3018EB-6D2B-4306-94A1-3A7CBA7A8F18}.Debug|ARM.ActiveCfg = Debug|Any CPU - {CC3018EB-6D2B-4306-94A1-3A7CBA7A8F18}.Debug|ARM.Build.0 = Debug|Any CPU - {CC3018EB-6D2B-4306-94A1-3A7CBA7A8F18}.Debug|x64.ActiveCfg = Debug|Any CPU - {CC3018EB-6D2B-4306-94A1-3A7CBA7A8F18}.Debug|x64.Build.0 = Debug|Any CPU - {CC3018EB-6D2B-4306-94A1-3A7CBA7A8F18}.Debug|x86.ActiveCfg = Debug|Any CPU - {CC3018EB-6D2B-4306-94A1-3A7CBA7A8F18}.Debug|x86.Build.0 = Debug|Any CPU - {CC3018EB-6D2B-4306-94A1-3A7CBA7A8F18}.Release|Any CPU.ActiveCfg = Release|Any CPU - {CC3018EB-6D2B-4306-94A1-3A7CBA7A8F18}.Release|Any CPU.Build.0 = Release|Any CPU - {CC3018EB-6D2B-4306-94A1-3A7CBA7A8F18}.Release|ARM.ActiveCfg = Release|Any CPU - {CC3018EB-6D2B-4306-94A1-3A7CBA7A8F18}.Release|ARM.Build.0 = Release|Any CPU - {CC3018EB-6D2B-4306-94A1-3A7CBA7A8F18}.Release|x64.ActiveCfg = Release|Any CPU - {CC3018EB-6D2B-4306-94A1-3A7CBA7A8F18}.Release|x64.Build.0 = Release|Any CPU - {CC3018EB-6D2B-4306-94A1-3A7CBA7A8F18}.Release|x86.ActiveCfg = Release|Any CPU - {CC3018EB-6D2B-4306-94A1-3A7CBA7A8F18}.Release|x86.Build.0 = Release|Any CPU - {A184F10A-BCF0-45FC-A100-B3C355A52494}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {A184F10A-BCF0-45FC-A100-B3C355A52494}.Debug|Any CPU.Build.0 = Debug|Any CPU - {A184F10A-BCF0-45FC-A100-B3C355A52494}.Debug|ARM.ActiveCfg = Debug|Any CPU - {A184F10A-BCF0-45FC-A100-B3C355A52494}.Debug|ARM.Build.0 = Debug|Any CPU - {A184F10A-BCF0-45FC-A100-B3C355A52494}.Debug|x64.ActiveCfg = Debug|Any CPU - {A184F10A-BCF0-45FC-A100-B3C355A52494}.Debug|x64.Build.0 = Debug|Any CPU - {A184F10A-BCF0-45FC-A100-B3C355A52494}.Debug|x86.ActiveCfg = Debug|Any CPU - {A184F10A-BCF0-45FC-A100-B3C355A52494}.Debug|x86.Build.0 = Debug|Any CPU - {A184F10A-BCF0-45FC-A100-B3C355A52494}.Release|Any CPU.ActiveCfg = Release|Any CPU - {A184F10A-BCF0-45FC-A100-B3C355A52494}.Release|Any CPU.Build.0 = Release|Any CPU - {A184F10A-BCF0-45FC-A100-B3C355A52494}.Release|ARM.ActiveCfg = Release|Any CPU - {A184F10A-BCF0-45FC-A100-B3C355A52494}.Release|ARM.Build.0 = Release|Any CPU - {A184F10A-BCF0-45FC-A100-B3C355A52494}.Release|x64.ActiveCfg = Release|Any CPU - {A184F10A-BCF0-45FC-A100-B3C355A52494}.Release|x64.Build.0 = Release|Any CPU - {A184F10A-BCF0-45FC-A100-B3C355A52494}.Release|x86.ActiveCfg = Release|Any CPU - {A184F10A-BCF0-45FC-A100-B3C355A52494}.Release|x86.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection - GlobalSection(NestedProjects) = preSolution - {E6C50355-D01E-4CAA-884D-D7929861315C} = {643425A5-9223-491A-84D9-DFCC6BDD7F9B} - {B6E74918-D92B-4690-BEC9-0BB199A6E933} = {ACFF5AEC-62BC-421B-B37E-A5703806901A} - {3B7C3599-A336-4DB2-8678-710E3B36203B} = {643425A5-9223-491A-84D9-DFCC6BDD7F9B} - {CC3018EB-6D2B-4306-94A1-3A7CBA7A8F18} = {643425A5-9223-491A-84D9-DFCC6BDD7F9B} - {A184F10A-BCF0-45FC-A100-B3C355A52494} = {643425A5-9223-491A-84D9-DFCC6BDD7F9B} - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - SolutionGuid = {23680635-D8C7-406F-97E5-46FD92C39166} - EndGlobalSection -EndGlobal diff --git a/Source/Windows10/Prism.DryIoc.Windows/DryIocContainerExtension.cs b/Source/Windows10/Prism.DryIoc.Windows/DryIocContainerExtension.cs deleted file mode 100644 index 239af5622..000000000 --- a/Source/Windows10/Prism.DryIoc.Windows/DryIocContainerExtension.cs +++ /dev/null @@ -1,85 +0,0 @@ -using System; -using System.Linq; -using DryIoc; -using Prism.Ioc; - -namespace Prism.DryIoc -{ - public sealed class DryIocContainerExtension : IContainerExtension - { - public IContainer Instance { get; } - - public DryIocContainerExtension(IContainer container) - { - Instance = container; - } - - public void FinalizeExtension() { } - - public IContainerRegistry RegisterInstance(Type type, object instance) - { - Instance.UseInstance(type, instance); - return this; - } - - public IContainerRegistry RegisterInstance(Type type, object instance, string name) - { - Instance.UseInstance(type, instance, serviceKey: name); - return this; - } - - public IContainerRegistry RegisterSingleton(Type from, Type to) - { - Instance.Register(from, to, Reuse.Singleton); - return this; - } - - public IContainerRegistry RegisterSingleton(Type from, Type to, string name) - { - Instance.Register(from, to, Reuse.Singleton, serviceKey: name); - return this; - } - - public IContainerRegistry Register(Type from, Type to) - { - Instance.Register(from, to); - return this; - } - - public IContainerRegistry Register(Type from, Type to, string name) - { - Instance.Register(from, to, serviceKey: name); - return this; - } - - public object Resolve(Type type) - { - return Instance.Resolve(type); - } - - public object Resolve(Type type, string name) - { - return Instance.Resolve(type, serviceKey: name); - } - - public object Resolve(Type type, params (Type Type, object Instance)[] parameters) - { - return Instance.Resolve(type, args: parameters.Select(p => p.Instance).ToArray()); - } - - public object Resolve(Type type, string name, params (Type Type, object Instance)[] parameters) - { - return Instance.Resolve(type, name, args: parameters.Select(p => p.Instance).ToArray()); - } - - public bool IsRegistered(Type type) - { - return Instance.IsRegistered(type); - } - - public bool IsRegistered(Type type, string name) - { - return Instance.IsRegistered(type, name); - } - } -} diff --git a/Source/Windows10/Prism.DryIoc.Windows/Prism.DryIoc.Windows.csproj b/Source/Windows10/Prism.DryIoc.Windows/Prism.DryIoc.Windows.csproj deleted file mode 100644 index 9bad58d1d..000000000 --- a/Source/Windows10/Prism.DryIoc.Windows/Prism.DryIoc.Windows.csproj +++ /dev/null @@ -1,29 +0,0 @@ - - - - - Prism.DryIoc - uap10.0.15063;uap10.0.16299 - DryIoc for Prism for UWP - pdbonly - - - Prism provides an implementation of a collection of design patterns that are helpful in writing well structured and maintainable XAML applications, including MVVM, dependency injection, commanding, event aggregation, and more. Prism's core functionality is a shared code base in a Portable Class Library targeting these platforms; WPF, Windows 10 UWP, and Xamarin Forms. Features that need to be platform specific are implemented in the respective libraries for the target platform. Prism for UWP helps you more easily design and build rich, flexible, and easy to maintain UWP applications. - prism;win10;mvvm;uwp;dryIoc; - $(PRISM_DRYIOC_WINDOWS_VERSION) - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/Source/Windows10/Prism.DryIoc.Windows/PrismApplication.cs b/Source/Windows10/Prism.DryIoc.Windows/PrismApplication.cs deleted file mode 100644 index 7a1875b43..000000000 --- a/Source/Windows10/Prism.DryIoc.Windows/PrismApplication.cs +++ /dev/null @@ -1,28 +0,0 @@ -using DryIoc; -using Prism.Ioc; - -namespace Prism.DryIoc -{ - /// - /// Application base class using DryIoc - /// - public abstract class PrismApplication : PrismApplicationBase - { - /// - /// Creates the for DryIoc - /// - /// - protected override IContainerExtension CreateContainerExtension() - { - return new DryIocContainerExtension(new Container(CreateContainerRules())); - } - - /// - /// Create to alter behavior of - /// - /// An instance of - protected virtual Rules CreateContainerRules() => Rules.Default.WithAutoConcreteTypeResolution() - .With(Made.Of(FactoryMethod.ConstructorWithResolvableArguments)) - .WithDefaultIfAlreadyRegistered(IfAlreadyRegistered.Replace); - } -} \ No newline at end of file diff --git a/Source/Windows10/Prism.DryIoc.Windows/PrismIocExtensions.cs b/Source/Windows10/Prism.DryIoc.Windows/PrismIocExtensions.cs deleted file mode 100644 index a4fd97b71..000000000 --- a/Source/Windows10/Prism.DryIoc.Windows/PrismIocExtensions.cs +++ /dev/null @@ -1,18 +0,0 @@ -using DryIoc; -using Prism.Ioc; - -namespace Prism.DryIoc -{ - public static class PrismIocExtensions - { - public static IContainer GetContainer(this IContainerProvider containerProvider) - { - return ((IContainerExtension)containerProvider).Instance; - } - - public static IContainer GetContainer(this IContainerRegistry containerRegistry) - { - return ((IContainerExtension)containerRegistry).Instance; - } - } -} \ No newline at end of file diff --git a/Source/Windows10/Prism.DryIoc.Windows/Properties/Prism.DryIoc.Windows.rd.xml b/Source/Windows10/Prism.DryIoc.Windows/Properties/Prism.DryIoc.Windows.rd.xml deleted file mode 100644 index 165e10e69..000000000 --- a/Source/Windows10/Prism.DryIoc.Windows/Properties/Prism.DryIoc.Windows.rd.xml +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - diff --git a/Source/Windows10/Prism.Unity.Windows/Prism.Unity.Windows.csproj b/Source/Windows10/Prism.Unity.Windows/Prism.Unity.Windows.csproj deleted file mode 100644 index 2fa17b10c..000000000 --- a/Source/Windows10/Prism.Unity.Windows/Prism.Unity.Windows.csproj +++ /dev/null @@ -1,29 +0,0 @@ - - - - - Prism.Unity - uap10.0.15063;uap10.0.16299 - Unity for Prism for UWP - pdbonly - - - Prism provides an implementation of a collection of design patterns that are helpful in writing well structured and maintainable XAML applications, including MVVM, dependency injection, commanding, event aggregation, and more. Prism's core functionality is a shared code base in a Portable Class Library targeting these platforms; WPF, Windows 10 UWP, and Xamarin Forms. Features that need to be platform specific are implemented in the respective libraries for the target platform. Prism for UWP helps you more easily design and build rich, flexible, and easy to maintain UWP applications. - prism;win10;mvvm;uwp;unity; - $(PRISM_UNITY_WINDOWS_VERSION) - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/Source/Windows10/Prism.Unity.Windows/PrismApplication.cs b/Source/Windows10/Prism.Unity.Windows/PrismApplication.cs deleted file mode 100644 index eeb9e8fe7..000000000 --- a/Source/Windows10/Prism.Unity.Windows/PrismApplication.cs +++ /dev/null @@ -1,13 +0,0 @@ -using Prism.Ioc; -using Unity; - -namespace Prism.Unity -{ - public abstract class PrismApplication : PrismApplicationBase - { - protected override IContainerExtension CreateContainerExtension() - { - return new UnityContainerExtension(new UnityContainer()); - } - } -} diff --git a/Source/Windows10/Prism.Unity.Windows/PrismIocExtensions.cs b/Source/Windows10/Prism.Unity.Windows/PrismIocExtensions.cs deleted file mode 100644 index 5ff44cdad..000000000 --- a/Source/Windows10/Prism.Unity.Windows/PrismIocExtensions.cs +++ /dev/null @@ -1,20 +0,0 @@ -using System; -using Prism.Ioc; -using Unity; -using Unity.Resolution; - -namespace Prism.Unity -{ - public static class PrismIocExtensions - { - public static IUnityContainer GetContainer(this IContainerProvider containerProvider) - { - return ((IContainerExtension)containerProvider).Instance; - } - - public static IUnityContainer GetContainer(this IContainerRegistry containerRegistry) - { - return ((IContainerExtension)containerRegistry).Instance; - } - } -} diff --git a/Source/Windows10/Prism.Unity.Windows/Properties/Prism.Unity.Windows.rd.xml b/Source/Windows10/Prism.Unity.Windows/Properties/Prism.Unity.Windows.rd.xml deleted file mode 100644 index aae33e958..000000000 --- a/Source/Windows10/Prism.Unity.Windows/Properties/Prism.Unity.Windows.rd.xml +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - diff --git a/Source/Windows10/Prism.Unity.Windows/UnityContainerExtension.cs b/Source/Windows10/Prism.Unity.Windows/UnityContainerExtension.cs deleted file mode 100644 index 363edb86d..000000000 --- a/Source/Windows10/Prism.Unity.Windows/UnityContainerExtension.cs +++ /dev/null @@ -1,85 +0,0 @@ -using System; -using System.Linq; -using Prism.Ioc; -using Unity; -using Unity.Resolution; - -namespace Prism.Unity -{ - public sealed class UnityContainerExtension : IContainerExtension - { - public IUnityContainer Instance { get; } - - public UnityContainerExtension(IUnityContainer container) => Instance = container; - - public void FinalizeExtension() { } - - public IContainerRegistry RegisterInstance(Type type, object instance) - { - Instance.RegisterInstance(type, instance); - return this; - } - - public IContainerRegistry RegisterInstance(Type type, object instance, string name) - { - Instance.RegisterInstance(type, name, instance); - return this; - } - - public IContainerRegistry RegisterSingleton(Type from, Type to) - { - Instance.RegisterSingleton(from, to); - return this; - } - - public IContainerRegistry RegisterSingleton(Type from, Type to, string name) - { - Instance.RegisterSingleton(from, to, name); - return this; - } - - public IContainerRegistry Register(Type from, Type to) - { - Instance.RegisterType(from, to); - return this; - } - - public IContainerRegistry Register(Type from, Type to, string name) - { - Instance.RegisterType(from, to, name); - return this; - } - - public object Resolve(Type type) - { - return Instance.Resolve(type); - } - - public object Resolve(Type type, string name) - { - return Instance.Resolve(type, name); - } - - public object Resolve(Type type, params (Type Type, object Instance)[] parameters) - { - var overrides = parameters.Select(p => new DependencyOverride(p.Type, p.Instance)).ToArray(); - return Instance.Resolve(type, overrides); - } - - public object Resolve(Type type, string name, params (Type Type, object Instance)[] parameters) - { - var overrides = parameters.Select(p => new DependencyOverride(p.Type, p.Instance)).ToArray(); - return Instance.Resolve(type, name, overrides); - } - - public bool IsRegistered(Type type) - { - return Instance.IsRegistered(type); - } - - public bool IsRegistered(Type type, string name) - { - return Instance.IsRegistered(type, name); - } - } -} diff --git a/Source/Windows10/Prism.Windows/IPrismApplicationEvents.cs b/Source/Windows10/Prism.Windows/IPrismApplicationEvents.cs deleted file mode 100644 index 52c38f992..000000000 --- a/Source/Windows10/Prism.Windows/IPrismApplicationEvents.cs +++ /dev/null @@ -1,12 +0,0 @@ -using Windows.Foundation; -using Windows.UI.Xaml; - -namespace Prism -{ - public interface IPrismApplicationEvents - { - event EnteredBackgroundEventHandler EnteredBackground; - event LeavingBackgroundEventHandler LeavingBackground; - event TypedEventHandler WindowCreated; - } -} diff --git a/Source/Windows10/Prism.Windows/IResumeArgs.cs b/Source/Windows10/Prism.Windows/IResumeArgs.cs deleted file mode 100644 index 880f4abd0..000000000 --- a/Source/Windows10/Prism.Windows/IResumeArgs.cs +++ /dev/null @@ -1,12 +0,0 @@ -using System; -using Windows.ApplicationModel.Activation; - -namespace Prism -{ - public interface IResumeArgs - { - ApplicationExecutionState PreviousExecutionState { get; set; } - ActivationKind Kind { get; set; } - DateTime SuspensionDate { get; set; } - } -} diff --git a/Source/Windows10/Prism.Windows/IStartArgs.cs b/Source/Windows10/Prism.Windows/IStartArgs.cs deleted file mode 100644 index 8a145973e..000000000 --- a/Source/Windows10/Prism.Windows/IStartArgs.cs +++ /dev/null @@ -1,8 +0,0 @@ -namespace Prism -{ - public interface IStartArgs - { - object Arguments { get; } - StartCauses StartCause { get; } - } -} diff --git a/Source/Windows10/Prism.Windows/Ioc/ContainerProvider.cs b/Source/Windows10/Prism.Windows/Ioc/ContainerProvider.cs deleted file mode 100644 index 650ab8769..000000000 --- a/Source/Windows10/Prism.Windows/Ioc/ContainerProvider.cs +++ /dev/null @@ -1,66 +0,0 @@ -namespace Prism.Ioc -{ - /// - /// Provides Types and Services registered with the Container - /// - /// The type to Resolve - /// - /// We can use this to build better types such as ValueConverters with full dependency injection - /// - /// public class MyValueConverter : IValueConverter - /// { - /// private ILoggerFacade _logger { get; } - /// public MyValueConverter(ILoggerFacade logger) - /// { - /// _logger = logger; - /// } - /// - /// public object Convert(object value, Type targetType, object parameter, CultureInfo culture) - /// { - /// _logger.Log($"Converting {value.GetType().Name} to {targetType.Name}", Category.Debug, Priority.None); - /// // do stuff - /// } - /// - /// public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) - /// { - /// _logger.Log($"Converting back from {value.GetType().Name} to {targetType.Name}", Category.Debug, Priority.None); - /// return null; - /// } - /// } - /// - /// We can then simply use our ValueConveter or other class directly in XAML - /// - /// - /// - /// - /// - /// - /// - public class ContainerProvider - { - /// - /// The Name used to register the type with the Container - /// - public string Name { get; set; } - - /// - /// Resolves the specified type from the Application's Container - /// - /// - public static implicit operator T(ContainerProvider containerProvider) - { - var container = PrismApplicationBase.Current.Container; - if (container == null) return default(T); - if (string.IsNullOrWhiteSpace(containerProvider.Name)) - { - return container.Resolve(); - } - - return container.Resolve(containerProvider.Name); - } - } -} diff --git a/Source/Windows10/Prism.Windows/Ioc/IContainerRegistryExtensions.cs b/Source/Windows10/Prism.Windows/Ioc/IContainerRegistryExtensions.cs deleted file mode 100644 index 704e03fc5..000000000 --- a/Source/Windows10/Prism.Windows/Ioc/IContainerRegistryExtensions.cs +++ /dev/null @@ -1,28 +0,0 @@ -using Prism.Mvvm; -using Prism.Navigation; -using System; - -namespace Prism.Ioc -{ - public static partial class IContainerRegistryExtensions - { - public static void Register(IContainerRegistry container, string key, Type view, Type viewModel) - { - if (viewModel != null) - { - container.Register(viewModel); - ViewModelLocationProvider.Register(view.ToString(), viewModel); - } - PageRegistry.Register(key, (view, viewModel)); - } - - public static void RegisterForNavigation(this IContainerRegistry registry) - => Register(registry, typeof(TView).Name, typeof(TView), typeof(TViewModel)); - public static void RegisterForNavigation(this IContainerRegistry registry, string key) - => Register(registry, key, typeof(TView), typeof(TViewModel)); - public static void RegisterForNavigation(this IContainerRegistry registry) - => Register(registry, typeof(TView).Name, typeof(TView), null); - public static void RegisterForNavigation(this IContainerRegistry registry, string key) - => Register(registry, key, typeof(TView), null); - } -} diff --git a/Source/Windows10/Prism.Windows/Modularity/IModuleCatalogExtensions.cs b/Source/Windows10/Prism.Windows/Modularity/IModuleCatalogExtensions.cs deleted file mode 100644 index 0621e0ca0..000000000 --- a/Source/Windows10/Prism.Windows/Modularity/IModuleCatalogExtensions.cs +++ /dev/null @@ -1,88 +0,0 @@ -namespace Prism.Modularity -{ - /// - /// extensions. - /// - public static class IModuleCatalogExtensions - { - /// - /// Adds the module. - /// - /// The module. - /// Catalog - /// - /// The type parameter. - public static IModuleCatalog AddModule(this IModuleCatalog catalog, InitializationMode mode = InitializationMode.WhenAvailable) - where T : IModule => - catalog.AddModule(typeof(T).Name, mode); - - public static IModuleCatalog AddModule(this IModuleCatalog catalog, string name) - where T : IModule => - catalog.AddModule(name, InitializationMode.WhenAvailable); - - /// - /// Adds the module. - /// - /// The module. - /// Catalog. - /// Name. - /// . - /// The type parameter. - public static IModuleCatalog AddModule(this IModuleCatalog catalog, string name, InitializationMode mode) - where T : IModule => - catalog.AddModule(new ModuleInfo(typeof(T), name, mode)); - - /// - /// Adds the - /// - /// Type of - /// The to add the to. - /// The names of the 's that should be loaded when this is loaded. - /// The - public static IModuleCatalog AddModule(this IModuleCatalog catalog, params string[] dependsOn) - where T : IModule => catalog.AddModule(InitializationMode.WhenAvailable, dependsOn); - - /// - /// Adds the - /// - /// Type of - /// The to add the to. - /// The name of the - /// The names of the 's that should be loaded when this is loaded. - /// The - public static IModuleCatalog AddModule(this IModuleCatalog catalog, string name, params string[] dependsOn) - where T : IModule => - catalog.AddModule(name, InitializationMode.WhenAvailable, dependsOn); - - /// - /// Adds the - /// - /// Type of - /// The to add the to. - /// - /// The names of the 's that should be loaded when this is loaded. - /// The - public static IModuleCatalog AddModule(this IModuleCatalog catalog, InitializationMode mode, params string[] dependsOn) - where T : IModule => - catalog.AddModule(typeof(T).Name, mode, dependsOn); - - /// - /// Adds the - /// - /// Type of - /// The to add the to. - /// The name of the - /// The - /// The names of the 's that should be loaded when this is loaded. - /// The - public static IModuleCatalog AddModule(this IModuleCatalog catalog, string name, InitializationMode mode, params string[] dependsOn) - where T : IModule - { - var moduleInfo = new ModuleInfo(name, typeof(T).AssemblyQualifiedName, dependsOn) - { - InitializationMode = mode - }; - return catalog.AddModule(moduleInfo); - } - } -} diff --git a/Source/Windows10/Prism.Windows/Modularity/ModuleCatalog.cs b/Source/Windows10/Prism.Windows/Modularity/ModuleCatalog.cs deleted file mode 100644 index 2e9d235ce..000000000 --- a/Source/Windows10/Prism.Windows/Modularity/ModuleCatalog.cs +++ /dev/null @@ -1,15 +0,0 @@ -using Windows.UI.Xaml.Markup; - -namespace Prism.Modularity -{ - /// - /// The holds information about the modules that can be used by the - /// application. Each module is described in a class, that records the - /// name and type of the module. - /// - [ContentProperty(Name = nameof(Items))] - public class ModuleCatalog : ModuleCatalogBase - { - - } -} diff --git a/Source/Windows10/Prism.Windows/Modularity/ModuleInfo.cs b/Source/Windows10/Prism.Windows/Modularity/ModuleInfo.cs deleted file mode 100644 index 5b1fe43d2..000000000 --- a/Source/Windows10/Prism.Windows/Modularity/ModuleInfo.cs +++ /dev/null @@ -1,141 +0,0 @@ -using System; -using System.Collections.ObjectModel; -using System.Reflection; - -namespace Prism.Modularity -{ - /// - /// Defines the metadata that describes a module. - /// - public partial class ModuleInfo : IModuleInfo - { - /// - /// Initializes a new empty instance of . - /// - public ModuleInfo() - { - } - - /// - /// Initializes a new instance of . - /// - /// The module's name. - /// The module 's AssemblyQualifiedName. - /// The modules this instance depends on. - /// An is thrown if is . - public ModuleInfo(string name, string type, params string[] dependsOn) - { - if (string.IsNullOrWhiteSpace(name)) - throw new ArgumentNullException(nameof(name)); - if (dependsOn == null) - throw new ArgumentNullException(nameof(dependsOn)); - - ModuleName = name; - ModuleType = Type.GetType(type) ?? throw new ArgumentNullException(nameof(type)); - foreach (string dependency in dependsOn) - { - if (!DependsOn.Contains(dependency)) - { - DependsOn.Add(dependency); - } - } - } - - /// - /// Initializes a new instance of . - /// - /// The module's name. - /// The module's type. - public ModuleInfo(string name, string type) : this(name, type, new string[0]) - { - } - - /// - /// Initializes a new instance of . - /// - /// The module's type. - public ModuleInfo(Type moduleType) - : this(moduleType, moduleType.Name) { } - - /// - /// Initializes a new instance of . - /// - /// The module's type. - /// The module's name. - public ModuleInfo(Type moduleType, string moduleName) - : this(moduleType, moduleName, InitializationMode.WhenAvailable) { } - - /// - /// Initializes a new instance of . - /// - /// The module's type. - /// The module's name. - /// The module's . - public ModuleInfo(Type moduleType, string moduleName, InitializationMode initializationMode) - : this(moduleName, moduleType.AssemblyQualifiedName) - { - InitializationMode = initializationMode; - } - - /// - /// Gets or sets the name of the module. - /// - /// The name of the module. - public string ModuleName { get; set; } - - string IModuleInfo.ModuleType - { - get => ModuleType.AssemblyQualifiedName; - set => ModuleType = Type.GetType(value); - } - - /// - /// Gets or sets the module 's AssemblyQualifiedName. - /// - /// The type of the module. - public Type ModuleType { get; set; } - - private Collection _dependsOn; - /// - /// Gets or sets the list of modules that this module depends upon. - /// - /// The list of modules that this module depends upon. - public Collection DependsOn - { - get - { - if(_dependsOn == null) - { - _dependsOn = new Collection(); - var moduleType = ModuleType; - foreach(var dependencyAttribute in moduleType.GetTypeInfo().GetCustomAttributes()) - { - _dependsOn.Add(dependencyAttribute.ModuleName); - } - } - - return _dependsOn; - } - set => _dependsOn = value; - } - - /// - /// Specifies on which stage the Module will be initialized. - /// - public InitializationMode InitializationMode { get; set; } - - /// - /// Reference to the location of the module assembly. Not Supported by Xamarin.Forms - /// - public string Ref - { - get => throw new NotSupportedException("Module Reference Location is not supported in UWP Applications"); - set { } - } - - /// - /// Gets or sets the state of the with regards to the module loading and initialization process. - /// - public ModuleState State { get; set; } - } -} diff --git a/Source/Windows10/Prism.Windows/Modularity/ModuleInitializer.cs b/Source/Windows10/Prism.Windows/Modularity/ModuleInitializer.cs deleted file mode 100644 index e192feda1..000000000 --- a/Source/Windows10/Prism.Windows/Modularity/ModuleInitializer.cs +++ /dev/null @@ -1,30 +0,0 @@ -using Prism.Ioc; -using System; - -namespace Prism.Modularity -{ - public class ModuleInitializer : IModuleInitializer - { - private IContainerExtension _container { get; } - - public ModuleInitializer(IContainerExtension container) - { - _container = container; - } - - public void Initialize(IModuleInfo moduleInfo) - { - var module = CreateModule(Type.GetType(moduleInfo.ModuleType, true)); - if (module != null) - { - module.RegisterTypes(_container); - module.OnInitialized(_container); - } - } - - protected virtual IModule CreateModule(Type moduleType) - { - return (IModule)_container.Resolve(moduleType); - } - } -} diff --git a/Source/Windows10/Prism.Windows/Modularity/ModuleManager.cs b/Source/Windows10/Prism.Windows/Modularity/ModuleManager.cs deleted file mode 100644 index c69f179d3..000000000 --- a/Source/Windows10/Prism.Windows/Modularity/ModuleManager.cs +++ /dev/null @@ -1,115 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Globalization; -using System.Linq; -using Prism.Properties; - -namespace Prism.Modularity -{ - /// - /// Component responsible for coordinating the modules' type loading and module initialization process. - /// - public class ModuleManager : IModuleManager - { - /// - /// The module catalog. - /// - protected IModuleCatalog ModuleCatalog { get; } - - /// - /// Raised when a module is loaded or fails to load. - /// - public event EventHandler LoadModuleCompleted; - - /// - /// The module initializer. - /// - protected IModuleInitializer ModuleInitializer { get; } - - /// - /// Initializes an instance of the class. - /// - /// Service used for initialization of modules. - /// Catalog that enumerates the modules to be loaded and initialized. - public ModuleManager(IModuleInitializer moduleInitializer, IModuleCatalog moduleCatalog) - { - ModuleInitializer = moduleInitializer ?? throw new ArgumentNullException(nameof(moduleInitializer)); - ModuleCatalog = moduleCatalog ?? throw new ArgumentNullException(nameof(moduleCatalog)); - } - - /// - /// Initializes the modules marked as in the . - /// - public void Run() - { - LoadModulesWhenAvailable(); - } - - /// - /// Loads and initializes the module in the with the name . - /// - /// Name of the module requested for initialization. - public void LoadModule(string moduleName) - { - var modules = ModuleCatalog.Modules.Where(m => m.ModuleName == moduleName); - if (modules == null || modules.Count() == 0) - { - throw new ModuleNotFoundException(moduleName, string.Format(CultureInfo.CurrentCulture, Resources.ModuleNotFound, moduleName)); - } - else if(modules.Count() > 1) - { - throw new DuplicateModuleException(moduleName, string.Format(CultureInfo.CurrentCulture, Resources.DuplicatedModuleInCatalog, moduleName)); - } - - var modulesToLoad = ModuleCatalog.CompleteListWithDependencies(modules); - - LoadModules(modulesToLoad); - } - - /// - /// Loads the 's with - /// - protected void LoadModulesWhenAvailable() - { - var whenAvailableModules = ModuleCatalog.Modules.Where(m => m.InitializationMode == InitializationMode.WhenAvailable && m.State == ModuleState.NotStarted); - if (whenAvailableModules != null) - LoadModules(whenAvailableModules); - } - - /// - /// Loads the specified modules. - /// - /// . - protected virtual void LoadModules(IEnumerable moduleInfos) - { - foreach (var moduleInfo in moduleInfos) - { - if (moduleInfo.State == ModuleState.NotStarted) - { - try - { - moduleInfo.State = ModuleState.Initializing; - ModuleInitializer.Initialize(moduleInfo); - moduleInfo.State = ModuleState.Initialized; - RaiseLoadModuleCompleted(moduleInfo); - } - catch (Exception ex) - { - RaiseLoadModuleCompleted(moduleInfo, ex); - } - - } - } - } - - /// - /// Raises the event. - /// - /// The that was just loaded. - /// An if any that was thrown during the loading of the - protected void RaiseLoadModuleCompleted(IModuleInfo moduleInfo, Exception ex = null) - { - LoadModuleCompleted?.Invoke(this, new LoadModuleCompletedEventArgs(moduleInfo, ex)); - } - } -} diff --git a/Source/Windows10/Prism.Windows/Mvvm/ViewModelLocator.cs b/Source/Windows10/Prism.Windows/Mvvm/ViewModelLocator.cs deleted file mode 100644 index be6a025c8..000000000 --- a/Source/Windows10/Prism.Windows/Mvvm/ViewModelLocator.cs +++ /dev/null @@ -1,33 +0,0 @@ -using Windows.UI.Xaml; - -namespace Prism.Mvvm -{ - public class ViewModelLocator - { - public static bool? GetAutowireViewModel(DependencyObject obj) - { - return (bool?)obj.GetValue(AutowireViewModelProperty); - } - public static void SetAutowireViewModel(DependencyObject obj, bool? value) - { - obj.SetValue(AutowireViewModelProperty, value); - } - public static readonly DependencyProperty AutowireViewModelProperty = - DependencyProperty.RegisterAttached("AutowireViewModel", typeof(bool?), - typeof(ViewModelLocator), new PropertyMetadata(null, AutowireViewModelChanged)); - private static void AutowireViewModelChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) - { - if (!Windows.ApplicationModel.DesignMode.DesignModeEnabled) - { - if (((bool?)e.NewValue) == true) - { - ViewModelLocationProvider.AutoWireViewModelChanged(d, Bind); - } - } - } - private static void Bind(object view, object viewmodel) - { - (view as FrameworkElement).DataContext = viewmodel; - } - } -} diff --git a/Source/Windows10/Prism.Windows/Navigation/FrameFacade.cs b/Source/Windows10/Prism.Windows/Navigation/FrameFacade.cs deleted file mode 100644 index 10bc8789d..000000000 --- a/Source/Windows10/Prism.Windows/Navigation/FrameFacade.cs +++ /dev/null @@ -1,460 +0,0 @@ -using System; -using System.Threading; -using System.Threading.Tasks; -using Prism.Logging; -using Prism.Utilities; -using Windows.UI.Core; -using Windows.UI.Xaml.Controls; -using Windows.UI.Xaml.Media.Animation; -using Windows.UI.Xaml.Navigation; - -namespace Prism.Navigation -{ - public class FrameFacade : IFrameFacade, IFrameProvider - { - private readonly bool _logStartingEvents = false; - - private readonly Frame _frame; - private readonly CoreDispatcher _dispatcher; - private readonly SynchronizationContext _syncContext; - private readonly ILoggerFacade _logger; - - public event EventHandler CanGoBackChanged; - public event EventHandler CanGoForwardChanged; - - public FrameFacade(Frame frame, ILoggerFacade logger) - { - _frame = frame; - _frame.ContentTransitions = new TransitionCollection - { - new NavigationThemeTransition() - }; - _frame.RegisterPropertyChangedCallback(Frame.CanGoBackProperty, (s, p) - => CanGoBackChanged?.Invoke(this, EventArgs.Empty)); - _frame.RegisterPropertyChangedCallback(Frame.CanGoForwardProperty, (s, p) - => CanGoForwardChanged?.Invoke(this, EventArgs.Empty)); - - _dispatcher = frame.Dispatcher; - _syncContext = SynchronizationContext.Current; - _logger = logger; - } - - Frame IFrameProvider.Frame - => _frame; - - public bool CanGoBack() - => _frame.CanGoBack; - - public bool CanGoForward() - => _frame.CanGoForward; - - public async Task GoBackAsync(INavigationParameters parameters, - NavigationTransitionInfo infoOverride) - { - _logger.Log("FrameFacade.GoBackAsync()", Category.Info, Priority.Low); - - if (!CanGoBack()) - { - return this.NavigationFailure($"{nameof(CanGoBack)} is false; exiting GoBackAsync()."); - } - - return await OrchestrateAsync( - parameters: parameters, - mode: NavigationMode.Back, -#pragma warning disable CS1998 // Async method lacks 'await' operators and will run synchronously - navigate: async () => -#pragma warning restore CS1998 // Async method lacks 'await' operators and will run synchronously - { - _frame.GoBack(infoOverride); - return true; - }); - } - - public async Task GoForwardAsync(INavigationParameters parameters) - { - _logger.Log("FrameFacade.GoForwardAsync()", Category.Info, Priority.Low); - - if (!CanGoForward()) - { - return this.NavigationFailure($"{nameof(CanGoForward)} is false."); - } - - return await OrchestrateAsync( - parameters: parameters, - mode: NavigationMode.Forward, -#pragma warning disable CS1998 // Async method lacks 'await' operators and will run synchronously - navigate: async () => -#pragma warning restore CS1998 // Async method lacks 'await' operators and will run synchronously - { - _frame.GoForward(); - return true; - }); - } - - public INavigationParameters CurrentParameters { get; private set; } - - public async Task RefreshAsync() - { - _logger.Log("FrameFacade.RefreshAsync()", Category.Info, Priority.Low); - - var original = _frame.BackStackDepth; - var state = _frame.GetNavigationState(); - - return await OrchestrateAsync( - parameters: CurrentParameters, - mode: NavigationMode.Refresh, -#pragma warning disable CS1998 // Async method lacks 'await' operators and will run synchronously - navigate: async () => -#pragma warning restore CS1998 // Async method lacks 'await' operators and will run synchronously - { - _frame.SetNavigationState(state); - return Equals(_frame.BackStackDepth, original); - }); - } - - async Task NavigateAsync( - string path, - INavigationParameters parameter, - NavigationTransitionInfo infoOverride) - { - return await NavigateAsync( - queue: NavigationQueue.Parse(path, parameter), - infoOverride: infoOverride); - } - - public async Task NavigateAsync( - Uri path, - INavigationParameters parameter, - NavigationTransitionInfo infoOverride) - { - return await NavigateAsync( - queue: NavigationQueue.Parse(path, parameter), - infoOverride: infoOverride); - } - - private async Task NavigateAsync( - NavigationQueue queue, - NavigationTransitionInfo infoOverride) - { - _logger.Log($"{nameof(FrameFacade)}.{nameof(NavigateAsync)}({queue})", Category.Info, Priority.None); - - // clear stack, if requested - - if (queue.ClearBackStack) - { - _frame.SetNavigationState(new Frame().GetNavigationState()); - } - - // iterate through queue - - while (queue.Count > 0) - { - var pageNavinfo = queue.Dequeue(); - - var result = await NavigateAsync( - pageNavInfo: pageNavinfo, - infoOverride: infoOverride); - - // do not continue on failure - - if (!result.Success) - { - return result; - } - } - - // finally - - return this.NavigationSuccess(); - } - - private async Task NavigateAsync( - INavigationPath pageNavInfo, - NavigationTransitionInfo infoOverride) - { - _logger.Log($"{nameof(FrameFacade)}.{nameof(NavigateAsync)}({pageNavInfo})", Category.Info, Priority.Low); - - return await OrchestrateAsync( - parameters: pageNavInfo.Parameters, - mode: NavigationMode.New, -#pragma warning disable CS1998 // Async method lacks 'await' operators and will run synchronously - navigate: async () => -#pragma warning restore CS1998 // Async method lacks 'await' operators and will run synchronously - { - /* - * To enable serialization of the frame's state using GetNavigationState, - * you must pass only basic types to this method, such as string, char, - * numeric, and GUID types. If you pass an object as a parameter, an entry - * in the frame's navigation stack holds a reference on the object until the - * frame is released or that entry is released upon a new navigation that - * diverges from the stack. In general, we discourage passing a non-basic - * type as a parameter to Navigate because it can’t be serialized when the - * application is suspended, and can consume more memory because a reference - * is held by the frame’s navigation stack to allow the application to go forward and back. - * https://docs.microsoft.com/en-us/uwp/api/Windows.UI.Xaml.Controls.Frame#Windows_UI_Xaml_Controls_Frame_Navigate_Windows_UI_Xaml_Interop_TypeName_System_Object_ - */ - var parameter = pageNavInfo.QueryString; - return _frame.Navigate( - sourcePageType: pageNavInfo.View, - parameter: parameter, - infoOverride: infoOverride); - }); - } - - private async Task OrchestrateAsync( - INavigationParameters parameters, - Prism.Navigation.NavigationMode mode, - Func> navigate) - { - // setup default parameters - - CurrentParameters = parameters; - parameters = UpdateInternalParameters(parameters, mode); - - // pre-events - - var old_vm = (_frame.Content as Page)?.DataContext; - if (old_vm is null) - { - _logger.Log($"No view-model is set for source page; this is okay; skipping all the [from] overrides including CanNavigate/Async.", Category.Info, Priority.None); - } - else if (!await CanNavigateAsync(parameters, old_vm)) - { - return this.NavigationFailure($"[From]{old_vm}.CanNavigateAsync returned false; this is okay; FrameFacade orchestration will stop here."); - } - else if (!CanNavigate(parameters, old_vm)) - { - return this.NavigationFailure($"[From]{old_vm}.CanNavigate returned false; this is okay; FrameFacade orchestration will stop here."); - } - - // navigate - - var success = await NavigateFrameAsync(navigate); - _logger.Log($"{nameof(FrameFacade)}.{nameof(OrchestrateAsync)}.NavigateFrameAsync() returned {success}.", Category.Info, Priority.None); - if (!success) - { - return this.NavigationFailure("NavigateFrameAsync() returned false; this is very unusual, but possibly okay; FrameFacade orchestration will stop here."); - } - - if (!(_frame.Content is Page new_page)) - { - var message = "There is no new page in FrameFacade after NavigateFrameAsync; this is a critical failure. Check the page constructor, maybe?"; - _logger.Log(message, Category.Exception, Priority.High); - throw new Exception(message); - } - - // post-events - - if (old_vm != null) - { - OnNavigatedFrom(parameters, old_vm); - } - - var new_vm = new_page?.DataContext; - if (new_vm is null) - { - if (Mvvm.ViewModelLocator.GetAutowireViewModel(new_page) is null) - { - // developer didn't set autowire, and did't set datacontext manually - _logger.Log("No view-model is set for target page, we will attempt to find view-model declared using RegisterForNavigation().", Category.Info, Priority.None); - - // set the autowire & see if we can find it for them - Mvvm.ViewModelLocator.SetAutowireViewModel(new_page, true); - - // TODO: I wonder if I need to delay for a second? - - new_vm = new_page.DataContext; - - if (new_vm != null) - { - _logger.Log($"View-Model: {new_vm} found for target View: {new_page}.", Category.Info, Priority.None); - } - } - } - - if (new_vm is null) - { - _logger.Log($"View-Model for source page not found; this is okay, skipping all the [to] overides.", Category.Info, Priority.None); - } - else - { - OnNavigatingTo(parameters, new_vm); - await OnNavigatedToAsync(parameters, new_vm); - OnNavigatedTo(parameters, new_vm); - } - - // refresh-bindings - - BindingUtilities.UpdateBindings(new_page); - - // finally - - return this.NavigationSuccess(); - } - - private async Task CanNavigateAsync(INavigationParameters parameters, object vm) - { - if (_logStartingEvents) - { - _logger.Log($"STARTING {nameof(CanNavigateAsync)} parameters:{parameters}", Category.Info, Priority.None); - } - - var confirm = true; - if (vm is IConfirmNavigationAsync old_vm_confirma) - { - confirm = await old_vm_confirma.CanNavigateAsync(parameters); - _logger.Log($"[From]{old_vm_confirma}.{nameof(IConfirmNavigationAsync)} returned {confirm}.", Category.Info, Priority.None); - } - else - { - _logger.Log($"[From]{nameof(IConfirmNavigationAsync)} not implemented; this is okay; we'll move on to next step in FrameFacade orchestration.", Category.Info, Priority.None); - } - return confirm; - } - - private bool CanNavigate(INavigationParameters parameters, object vm) - { - if (_logStartingEvents) - { - _logger.Log($"STARTING {nameof(CanNavigate)} parameters:{parameters}", Category.Info, Priority.None); - } - - var confirm = true; - if (vm is IConfirmNavigation old_vm_confirms) - { - confirm = old_vm_confirms.CanNavigate(parameters); - _logger.Log($"[From]{old_vm_confirms}.{nameof(IConfirmNavigation)} is {confirm}.", Category.Info, Priority.None); - } - else - { - _logger.Log($"[From]{nameof(IConfirmNavigation)} not implemented; this is okay; we'll move on to next step in FrameFacade orchestration.", Category.Info, Priority.None); - } - return confirm; - } - - private void OnNavigatedFrom(INavigationParameters parameters, object vm) - { - if (_logStartingEvents) - { - _logger.Log($"STARTING {nameof(OnNavigatedFrom)} parameters:{parameters}", Category.Info, Priority.None); - } - - if (vm != null) - { - if (vm is INavigatedAware old_vm_ed) - { - old_vm_ed.OnNavigatedFrom(parameters); - _logger.Log($"{nameof(INavigatedAware)}.OnNavigatedFrom() called.", Category.Info, Priority.None); - } - else - { - _logger.Log($"{nameof(INavigatedAware)} not implemented; this is okay; we'll move on to next step in FrameFacade orchestration.", Category.Info, Priority.None); - } - } - } - - private void OnNavigatingTo(INavigationParameters parameters, object vm) - { - if (_logStartingEvents) - { - _logger.Log($"STARTING {nameof(OnNavigatingTo)} parameters:{parameters}", Category.Info, Priority.None); - } - - if (vm is INavigatingAware new_vm_ing) - { - new_vm_ing.OnNavigatingTo(parameters); - _logger.Log($"{nameof(INavigatingAware)}.OnNavigatingTo() called.", Category.Info, Priority.None); - } - else - { - _logger.Log($"{nameof(INavigatingAware)} not implemented; this is okay; we'll move on to next step in FrameFacade orchestration.", Category.Info, Priority.None); - } - } - - private async Task OnNavigatedToAsync(INavigationParameters parameters, object vm) - { - if (_logStartingEvents) - { - _logger.Log($"STARTING {nameof(OnNavigatedToAsync)} parameters:{parameters}", Category.Info, Priority.None); - } - - if (vm is INavigatedAwareAsync new_vm_ed) - { - await new_vm_ed.OnNavigatedToAsync(parameters); - _logger.Log($"{nameof(INavigatedAwareAsync)}.OnNavigatedToAsync() called.", Category.Info, Priority.None); - } - else - { - _logger.Log($"{nameof(INavigatedAwareAsync)} not implemented; this is okay; we'll move on to next step in FrameFacade orchestration.", Category.Info, Priority.None); - } - } - - private void OnNavigatedTo(INavigationParameters parameters, object vm) - { - if (_logStartingEvents) - { - _logger.Log($"STARTING {nameof(OnNavigatedTo)} parameters:{parameters}", Category.Info, Priority.None); - } - - if (vm is INavigatedAware new_vm_ed) - { - new_vm_ed.OnNavigatedTo(parameters); - _logger.Log($"{nameof(INavigatedAware)}.OnNavigatedTo() called.", Category.Info, Priority.None); - } - else - { - _logger.Log($"{nameof(INavigatedAware)} not implemented; this is okay; we'll move on to next step in FrameFacade orchestration.", Category.Info, Priority.None); - } - } - - private INavigationParameters UpdateInternalParameters(INavigationParameters parameters, Prism.Navigation.NavigationMode mode) - { - parameters = parameters ?? new NavigationParameters(); - parameters.SetNavigationMode(mode); - parameters.SetSyncronizationContext(_syncContext); - return parameters; - } - - private async Task NavigateFrameAsync(Func> navigate) - { - if (_logStartingEvents) - { - _logger.Log($"STARTING {nameof(FrameFacade)}.{nameof(NavigateFrameAsync)} HasThreadAccess: {_dispatcher.HasThreadAccess}", Category.Info, Priority.None); - } - - void failedHandler(object s, NavigationFailedEventArgs e) - { - _logger.Log($"Frame.NavigationFailed raised. {e.SourcePageType}:{e.Exception.Message}", Category.Exception, Priority.High); - throw e.Exception; - } - - try - { - _frame.NavigationFailed += failedHandler; - - if (_dispatcher.HasThreadAccess) - { - return await navigate(); - } - else - { - var result = false; - await _dispatcher.RunAsync(CoreDispatcherPriority.Normal, async () => - { - result = await navigate(); - }); - return result; - } - } - catch (Exception ex) - { - _logger.Log($"Exception in FrameFacade.NavigateFrameAsync() {ex}", Category.Exception, Priority.None); - throw new Exception("Exception in FrameFacade.NavigateFrameAsync().", ex); - } - finally - { - _frame.NavigationFailed -= failedHandler; - } - } - } -} diff --git a/Source/Windows10/Prism.Windows/Navigation/FrameFacadeExtensions.cs b/Source/Windows10/Prism.Windows/Navigation/FrameFacadeExtensions.cs deleted file mode 100644 index 5f80cacc7..000000000 --- a/Source/Windows10/Prism.Windows/Navigation/FrameFacadeExtensions.cs +++ /dev/null @@ -1,17 +0,0 @@ -using System; - -namespace Prism.Navigation -{ - internal static partial class FrameFacadeExtensions - { - internal static INavigationResult NavigationSuccess(this FrameFacade result) - => new NavigationResult { Success = true, Exception = null }; - - internal static INavigationResult NavigationFailure(this FrameFacade result, Exception exception) - => new NavigationResult { Success = false, Exception = exception }; - - internal static INavigationResult NavigationFailure(this FrameFacade result, string message) - => new NavigationResult { Success = false, Exception = new Exception(message) }; - } - -} diff --git a/Source/Windows10/Prism.Windows/Navigation/IFrameFacade.cs b/Source/Windows10/Prism.Windows/Navigation/IFrameFacade.cs deleted file mode 100644 index cef5b1720..000000000 --- a/Source/Windows10/Prism.Windows/Navigation/IFrameFacade.cs +++ /dev/null @@ -1,23 +0,0 @@ -using System; -using System.Threading.Tasks; -using Windows.UI.Xaml.Media.Animation; - -namespace Prism.Navigation -{ - public interface IFrameFacade - { - bool CanGoBack(); - event EventHandler CanGoBackChanged; - Task GoBackAsync(INavigationParameters parameters, NavigationTransitionInfo infoOverride); - - bool CanGoForward(); - event EventHandler CanGoForwardChanged; - Task GoForwardAsync(INavigationParameters parameters); - - Task RefreshAsync(); - - Task NavigateAsync(Uri uri, INavigationParameters parameter, NavigationTransitionInfo infoOverride); - - INavigationParameters CurrentParameters { get; } - } -} diff --git a/Source/Windows10/Prism.Windows/Navigation/IFrameFacadeProvider.cs b/Source/Windows10/Prism.Windows/Navigation/IFrameFacadeProvider.cs deleted file mode 100644 index e658c6ac8..000000000 --- a/Source/Windows10/Prism.Windows/Navigation/IFrameFacadeProvider.cs +++ /dev/null @@ -1,7 +0,0 @@ -namespace Prism.Navigation -{ - public interface IFrameFacadeProvider - { - IFrameFacade FrameFacade { get; } - } -} diff --git a/Source/Windows10/Prism.Windows/Navigation/IFrameProvider.cs b/Source/Windows10/Prism.Windows/Navigation/IFrameProvider.cs deleted file mode 100644 index 05dc9dfeb..000000000 --- a/Source/Windows10/Prism.Windows/Navigation/IFrameProvider.cs +++ /dev/null @@ -1,9 +0,0 @@ -using Windows.UI.Xaml.Controls; - -namespace Prism.Navigation -{ - public interface IFrameProvider - { - Frame Frame { get; } - } -} diff --git a/Source/Windows10/Prism.Windows/Navigation/INavigationParametersExtensions.cs b/Source/Windows10/Prism.Windows/Navigation/INavigationParametersExtensions.cs deleted file mode 100644 index 11e1f45f9..000000000 --- a/Source/Windows10/Prism.Windows/Navigation/INavigationParametersExtensions.cs +++ /dev/null @@ -1,54 +0,0 @@ -using System.Threading; - -namespace Prism.Navigation -{ - public static class INavigationParametersExtensions - { - internal static void SetNavigationMode(this INavigationParameters parameters, NavigationMode mode) - { - if ((parameters as INavigationParametersInternal).ContainsKey(nameof(NavigationMode))) - { - (parameters as INavigationParametersInternal).Remove(nameof(NavigationMode)); - } - (parameters as INavigationParametersInternal).Add(nameof(NavigationMode), mode); - } - - internal static void SetNavigationService(this INavigationParameters parameters, IPlatformNavigationService service) - { - if ((parameters as INavigationParametersInternal).ContainsKey(nameof(NavigationService))) - { - (parameters as INavigationParametersInternal).Remove(nameof(NavigationService)); - } - (parameters as INavigationParametersInternal).Add(nameof(NavigationService), service); - } - - internal static void SetSyncronizationContext(this INavigationParameters parameters, SynchronizationContext context) - { - if ((parameters as INavigationParametersInternal).ContainsKey(nameof(SynchronizationContext))) - { - (parameters as INavigationParametersInternal).Remove(nameof(SynchronizationContext)); - } - (parameters as INavigationParametersInternal).Add(nameof(SynchronizationContext), context); - } - - public static NavigationMode GetNavigationMode(this INavigationParameters parameters) - { - if (!(parameters as INavigationParametersInternal).ContainsKey(nameof(NavigationMode))) - { - return default(NavigationMode); - } - - return (parameters as INavigationParametersInternal).GetValue(nameof(NavigationMode)); - } - - public static SynchronizationContext GetSynchronizationContext(this INavigationParameters parameters) - { - if (!(parameters as INavigationParametersInternal).ContainsKey(nameof(SynchronizationContext))) - { - return null; - } - - return (parameters as INavigationParametersInternal).GetValue(nameof(SynchronizationContext)); - } - } -} diff --git a/Source/Windows10/Prism.Windows/Navigation/INavigationPath.cs b/Source/Windows10/Prism.Windows/Navigation/INavigationPath.cs deleted file mode 100644 index de39f0c3f..000000000 --- a/Source/Windows10/Prism.Windows/Navigation/INavigationPath.cs +++ /dev/null @@ -1,16 +0,0 @@ -using System; - -namespace Prism.Navigation -{ - public interface INavigationPath - { - int Index { get; } - string Key { get; } - Type View { get; } - INavigationParameters Parameters { get; } - string QueryString { get; } - Type ViewModel { get; } - - string ToString(); - } -} \ No newline at end of file diff --git a/Source/Windows10/Prism.Windows/Navigation/INavigationServiceExtensions.cs b/Source/Windows10/Prism.Windows/Navigation/INavigationServiceExtensions.cs deleted file mode 100644 index 5905c2a93..000000000 --- a/Source/Windows10/Prism.Windows/Navigation/INavigationServiceExtensions.cs +++ /dev/null @@ -1,76 +0,0 @@ -using System; -using System.ComponentModel; -using System.Threading.Tasks; -using Windows.UI.Xaml; -using Windows.UI.Xaml.Controls; -using Windows.UI.Xaml.Media.Animation; - -namespace Prism.Navigation -{ - public static class INavigationServiceExtensions - { - internal static Frame GetXamlFrame(this INavigationService service) - { - return ((service as IFrameFacadeProvider).FrameFacade as IFrameProvider).Frame; - } - - [EditorBrowsable(EditorBrowsableState.Never)] - public static INavigationService SetAsWindowContent(this INavigationService service, Window window, bool activate) - { - window.Content = service.GetXamlFrame(); - if (activate) - { - window.Activate(); - } - return service; - } - - public static async Task NavigateAsync(this INavigationService service, string path, params (string Name, object Value)[] parameters) - { - return await service.NavigateAsync(path, GetNavigationParameters(parameters)); - } - - public static async Task NavigateAsync(this INavigationService service, string path, NavigationTransitionInfo infoOverride = null, params (string Name, object Value)[] parameters) - { - return await service.NavigateAsync(path, GetNavigationParameters(parameters), infoOverride); - } - - public static Task RefreshAsync(this INavigationService service) - => (service as IPlatformNavigationService).RefreshAsync(); - - public static bool CanGoBack(this INavigationService service) - => (service as IPlatformNavigationService).CanGoBack(); - - public static bool CanGoForward(this INavigationService service) - => (service as IPlatformNavigationService).CanGoForward(); - - public static Task GoForwardAsync(this INavigationService service, INavigationParameters parameter) - => (service as IPlatformNavigationService).GoForwardAsync(parameter); - - public static Task NavigateAsync(this INavigationService service, string path, INavigationParameters parameter, NavigationTransitionInfo infoOverride) - => (service as IPlatformNavigationService).NavigateAsync(path, parameter, infoOverride); - - public static Task NavigateAsync(this INavigationService service, Uri path, INavigationParameters parameter, NavigationTransitionInfo infoOverride) - => (service as IPlatformNavigationService).NavigateAsync(path, parameter, infoOverride); - - public static Task GoBackAsync(this INavigationService navigationService, params (string Name, object Value)[] parameters) - { - return navigationService.GoBackAsync(GetNavigationParameters(parameters)); - } - - public static Task NavigateAsync(this INavigationService navigationService, Uri uri, params (string Name, object Value)[] parameters) - { - return navigationService.NavigateAsync(uri, GetNavigationParameters(parameters)); - } - - private static INavigationParameters GetNavigationParameters((string Name, object Value)[] parameters) - { - var navParams = new NavigationParameters(); - foreach (var (Name, Value) in parameters) - { - navParams.Add(Name, Value); - } - return navParams; - } - } -} diff --git a/Source/Windows10/Prism.Windows/Navigation/IPlatformNavigationService.cs b/Source/Windows10/Prism.Windows/Navigation/IPlatformNavigationService.cs deleted file mode 100644 index a9268cb9d..000000000 --- a/Source/Windows10/Prism.Windows/Navigation/IPlatformNavigationService.cs +++ /dev/null @@ -1,23 +0,0 @@ -using System; -using System.Threading.Tasks; -using Windows.UI.Xaml.Media.Animation; - -namespace Prism.Navigation -{ - public interface IPlatformNavigationService : INavigationService - { - Task RefreshAsync(); - - bool CanGoBack(); - event EventHandler CanGoBackChanged; - Task GoBackAsync(INavigationParameters parameters, NavigationTransitionInfo infoOverride); - - bool CanGoForward(); - event EventHandler CanGoForwardChanged; - Task GoForwardAsync(); - Task GoForwardAsync(INavigationParameters parameter); - - Task NavigateAsync(string path, INavigationParameters parameter, NavigationTransitionInfo infoOverride); - Task NavigateAsync(Uri path, INavigationParameters parameter, NavigationTransitionInfo infoOverride); - } -} diff --git a/Source/Windows10/Prism.Windows/Navigation/NavigationEventArgsExtensions.cs b/Source/Windows10/Prism.Windows/Navigation/NavigationEventArgsExtensions.cs deleted file mode 100644 index 2b507f633..000000000 --- a/Source/Windows10/Prism.Windows/Navigation/NavigationEventArgsExtensions.cs +++ /dev/null @@ -1,44 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using Windows.Foundation; -using Windows.UI.Xaml.Navigation; - -namespace Prism.Navigation -{ - public static class NavigationEventArgsExtensions - { - public static bool TryGetParameter(this NavigationEventArgs args, string name, out T value) - { - try - { - var www = new WwwFormUrlDecoder(args.Parameter.ToString()); - var result = www.GetFirstValueByName(name); - value = (T)Convert.ChangeType(result, typeof(T)); - return true; - } - catch - { - value = default(T); - return false; - } - } - - public static bool TryGetParameters(this NavigationEventArgs args, string name, out IEnumerable values) - { - try - { - var www = new WwwFormUrlDecoder(args.Parameter.ToString()); - values = www - .Where(x => x.Name == name) - .Select(x => (T)Convert.ChangeType(x.Value, typeof(T))); - return true; - } - catch - { - values = default(IEnumerable); - return false; - } - } - } -} diff --git a/Source/Windows10/Prism.Windows/Navigation/NavigationParameters.cs b/Source/Windows10/Prism.Windows/Navigation/NavigationParameters.cs deleted file mode 100644 index 85489d440..000000000 --- a/Source/Windows10/Prism.Windows/Navigation/NavigationParameters.cs +++ /dev/null @@ -1,113 +0,0 @@ -using System; -using System.Collections; -using System.Collections.Generic; -using System.Linq; - -namespace Prism.Navigation -{ - public class NavigationParameters : INavigationParameters, INavigationParametersInternal - { - public NavigationParameters() - { - // empty - } - - public NavigationParameters(params (string Name, object Value)[] parameters) - : this() - { - foreach (var (Name, Value) in parameters) - { - _external.Add(Name, Value); - } - } - - public NavigationParameters(string query) - : this(string.IsNullOrWhiteSpace(query) ? Array.Empty<(string key, object value)>() : new Windows.Foundation.WwwFormUrlDecoder(query).Select(x => (x.Name, (object)x.Value)).ToArray()) - { - // empty - } - - public override string ToString() - { - var i = string.Join(",", _internal.Select(x => $"({x.Key}:{x.Value})")); - var e = string.Join(",", _external.Select(x => $"({x.Key}:{x.Value})")); - return $"{{internal:{i} external:{e}}}"; - } - - Dictionary _external = new Dictionary(); - internal Dictionary _internal = new Dictionary(); - - public object this[string key] - => _external[key]; - - public int Count - => _external.Count; - - public IEnumerable Keys - => _external.Keys; - - public void Add(string key, object value) - => _external.Add(key, value); - - public bool ContainsKey(string key) - => _external.ContainsKey(key); - - public IEnumerator> GetEnumerator() - => _external.GetEnumerator(); - - public T GetValue(string key) - { - return (T)Convert.ChangeType(_external[key], typeof(T)); - } - - public IEnumerable GetValues(string key) - => _external.Where(x => x.Key == key).Select(x => (T)x.Value); - - public bool TryGetValue(string key, out T value) - { - try - { - value = (T)Convert.ChangeType(_external[key], typeof(T)); - return true; - } - catch - { - value = default(T); - return false; - } - } - - IEnumerator IEnumerable.GetEnumerator() - => _external.GetEnumerator(); - - // internal - - void INavigationParametersInternal.Add(string key, object value) - => _internal.Add(key, value); - - bool INavigationParametersInternal.ContainsKey(string key) - => _internal.ContainsKey(key); - - T INavigationParametersInternal.GetValue(string key) - { - try - { - if (_internal.TryGetValue(key, out var result)) - { - if (result is T resultAsT) - { - return resultAsT; - } - - return (T)Convert.ChangeType(result, typeof(T)); - } - } - catch - { - // ignore and return default - } - - return default(T); - } - } -} diff --git a/Source/Windows10/Prism.Windows/Navigation/NavigationParametersExtensions.cs b/Source/Windows10/Prism.Windows/Navigation/NavigationParametersExtensions.cs deleted file mode 100644 index da1c37a8e..000000000 --- a/Source/Windows10/Prism.Windows/Navigation/NavigationParametersExtensions.cs +++ /dev/null @@ -1,11 +0,0 @@ -namespace Prism.Navigation -{ - public static class NavigationParametersExtensions - { - public static void Remove(this INavigationParametersInternal nav, string key) - { - (nav as NavigationParameters)._internal.Remove(key); - } - } - -} diff --git a/Source/Windows10/Prism.Windows/Navigation/NavigationPath.cs b/Source/Windows10/Prism.Windows/Navigation/NavigationPath.cs deleted file mode 100644 index aa7da3ebf..000000000 --- a/Source/Windows10/Prism.Windows/Navigation/NavigationPath.cs +++ /dev/null @@ -1,81 +0,0 @@ -using System; -using System.Linq; -using Windows.Foundation; - -namespace Prism.Navigation -{ - public class NavigationPath : INavigationPath - { - private readonly string _originalString; - - public string QueryString { get; } - - public NavigationPath(int index, string originalString, INavigationParameters parameters) - { - Index = index; - - _originalString = originalString; - - // parse name/key - - Key = originalString.Split('?').First(); - - // parse query - - var queryString = originalString.Split('?').Last(); - if (queryString != Key) - { - QueryString = queryString; - } - - // parse parameters - - if (!string.IsNullOrEmpty(QueryString)) - { - var query = new WwwFormUrlDecoder(QueryString); - foreach (var item in query) - { - Parameters.Add(item.Name, item.Value); - } - } - - // merge parameters - - if (parameters != null) - { - foreach (var item in parameters) - { - Parameters.Add(item.Key, item.Value); - } - } - - // get types - - if (PageRegistry.TryGetRegistration(Key, out var info)) - { - Key = info.Key; - View = info.View; - ViewModel = info.ViewModel; - } - else - { - throw new Exception($"Count not find Key:[{Key}]. Use RegisterTypes()/container.RegisterForNavigation()."); - } - } - - public int Index { get; } - - public INavigationParameters Parameters { get; } = new NavigationParameters(); - - public string Key { get; } - - public Type View { get; } - - public Type ViewModel { get; } - - public override string ToString() - { - return _originalString; - } - } -} diff --git a/Source/Windows10/Prism.Windows/Navigation/NavigationQueue.cs b/Source/Windows10/Prism.Windows/Navigation/NavigationQueue.cs deleted file mode 100644 index e973f80bc..000000000 --- a/Source/Windows10/Prism.Windows/Navigation/NavigationQueue.cs +++ /dev/null @@ -1,73 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; - -namespace Prism.Navigation -{ - public class NavigationQueue : Queue - { - public NavigationQueue(IEnumerable collection) - : base(collection.OrderBy(x => x.Index)) - { - // empty - } - - public bool ClearBackStack { get; set; } - - public override string ToString() - { - var prefix = ClearBackStack ? "/" : string.Empty; - return $"{prefix}{string.Join("/", ToArray().Select(x => x.ToString()))}"; - } - - public static NavigationQueue Parse(string path, INavigationParameters parameters) - => TryParse(path, parameters, out var queue) ? queue : throw new Exception(); - - public static NavigationQueue Parse(Uri path, INavigationParameters parameters) - => TryParse(path, parameters, out var queue) ? queue : throw new Exception(); - - public static bool TryParse(string path, INavigationParameters parameters, out NavigationQueue queue) - { - if (string.IsNullOrEmpty(path)) - { - queue = null; - return false; - } - - if (Uri.TryCreate(path, UriKind.RelativeOrAbsolute, out var uri)) - { - return TryParse(new Uri(path, UriKind.Relative), parameters, out queue); - } - else - { - queue = null; - return false; - } - } - - public static bool TryParse(Uri uri, INavigationParameters parameters, out NavigationQueue queue) - { - if (uri == null) - { - queue = null; - return false; - } - - if (uri.IsAbsoluteUri) - { - throw new Exception("Navigation path must not be absolute Uri."); - } - - var groups = uri.OriginalString.Split('/') - .Where(x => !string.IsNullOrEmpty(x)) - .Select((path, index) => new NavigationPath(index, path, parameters)); - - queue = new NavigationQueue(groups) - { - ClearBackStack = uri.OriginalString.StartsWith("/"), - }; - - return queue.Any(); - } - } -} diff --git a/Source/Windows10/Prism.Windows/Navigation/NavigationService.cs b/Source/Windows10/Prism.Windows/Navigation/NavigationService.cs deleted file mode 100644 index 17f79f7b5..000000000 --- a/Source/Windows10/Prism.Windows/Navigation/NavigationService.cs +++ /dev/null @@ -1,141 +0,0 @@ -using System; -using System.Diagnostics; -using System.Linq; -using System.Threading.Tasks; -using Prism.Logging; -using Windows.UI.Xaml.Media.Animation; - -namespace Prism.Navigation -{ - public class NavigationService : IPlatformNavigationService, IFrameFacadeProvider - { - IFrameFacade IFrameFacadeProvider.FrameFacade => _frameFacade; - - private IFrameFacade _frameFacade { get; } - private ILoggerFacade _logger { get; } - - public NavigationService(ILoggerFacade logger, IFrameFacade frameFacade) - { - _frameFacade = frameFacade; - _frameFacade.CanGoBackChanged += (s, e) => - CanGoBackChanged?.Invoke(this, EventArgs.Empty); - _frameFacade.CanGoForwardChanged += (s, e) => - CanGoForwardChanged?.Invoke(this, EventArgs.Empty); - _logger = logger; - } - - public async Task RefreshAsync() - => await _frameFacade.RefreshAsync(); - - // go forward - - public event EventHandler CanGoForwardChanged; - - public bool CanGoForward() - => _frameFacade.CanGoForward(); - - public async Task GoForwardAsync() - => await GoForwardAsync( - parameters: default(INavigationParameters)); - - public async Task GoForwardAsync(INavigationParameters parameters) - { - if (parameters == null && _frameFacade is IFrameProvider frameProvider && frameProvider.Frame.ForwardStack.Any()) - { - var previous = frameProvider.Frame.ForwardStack.Last().Parameter?.ToString(); - parameters = new NavigationParameters(previous); - } - - return await _frameFacade.GoForwardAsync( - parameters: parameters); - } - - // go back - - public event EventHandler CanGoBackChanged; - - public bool CanGoBack() - => _frameFacade.CanGoBack(); - - public async Task GoBackAsync() - => await GoBackAsync( - parameters: default(INavigationParameters), - infoOverride: default(NavigationTransitionInfo)); - - public async Task GoBackAsync(INavigationParameters parameters) - => await GoBackAsync( - parameters: parameters, - infoOverride: default(NavigationTransitionInfo)); - - public async Task GoBackAsync(INavigationParameters parameters = null, NavigationTransitionInfo infoOverride = null) - { - if (parameters == null && _frameFacade is IFrameProvider frameProvider && frameProvider.Frame.BackStack.Any()) - { - var previous = frameProvider.Frame.BackStack.Last().Parameter?.ToString(); - if (previous is null) - { - parameters = new NavigationParameters(); - } - else - { - parameters = new NavigationParameters(previous); - } - } - - return await _frameFacade.GoBackAsync( - parameters: parameters, - infoOverride: infoOverride); - } - - public async Task NavigateAsync(string path) - => await NavigateAsync( - uri: new Uri(path, UriKind.RelativeOrAbsolute), - parameter: default(INavigationParameters), - infoOverride: default(NavigationTransitionInfo)); - - public async Task NavigateAsync(string path, INavigationParameters parameters) - => await NavigateAsync( - uri: new Uri(path, UriKind.RelativeOrAbsolute), - parameter: parameters, - infoOverride: default(NavigationTransitionInfo)); - - public async Task NavigateAsync(string path, INavigationParameters parameter, NavigationTransitionInfo infoOverride) - => await NavigateAsync( - uri: new Uri(path, UriKind.RelativeOrAbsolute), - parameter: parameter, - infoOverride: infoOverride); - - // navigate(uri) - - public async Task NavigateAsync(Uri uri) - => await NavigateAsync( - uri: uri, - parameter: default(INavigationParameters), - infoOverride: default(NavigationTransitionInfo)); - - public async Task NavigateAsync(Uri uri, INavigationParameters parameters) - => await NavigateAsync( - uri: uri, - parameter: parameters, - infoOverride: default(NavigationTransitionInfo)); - - public async Task NavigateAsync(Uri uri, INavigationParameters parameter, NavigationTransitionInfo infoOverride) - { - _logger.Log($"{nameof(NavigationService)}.{nameof(NavigateAsync)}(uri:{uri} parameter:{parameter} info:{infoOverride})", Category.Info, Priority.None); - - try - { - return await _frameFacade.NavigateAsync( - uri: uri, - parameter: parameter, - infoOverride: infoOverride); - } - catch (Exception ex) - { - _logger.Log($"Navigation error: {ex.Message}", Category.Exception, Priority.High); - Debugger.Break(); - throw; - } - } - } -} diff --git a/Source/Windows10/Prism.Windows/Navigation/PageRegistry.cs b/Source/Windows10/Prism.Windows/Navigation/PageRegistry.cs deleted file mode 100644 index 579c0db15..000000000 --- a/Source/Windows10/Prism.Windows/Navigation/PageRegistry.cs +++ /dev/null @@ -1,50 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; - -namespace Prism.Navigation -{ - public static class PageRegistry - { - static Dictionary _cache - = new Dictionary(); - - public static void Register(string key, (Type View, Type ViewModel) info) - { - _cache.Add(key, info); - } - - public static bool TryGetRegistration(string key, out (string Key, Type View, Type ViewModel) info) - { - if (_cache.ContainsKey(key)) - { - info = (key, _cache[key].View, _cache[key].ViewModel); - return true; - } - else - { - info = (null, null, null); - return false; - } - } - - public static bool TryGetRegistration(Type view, out (string Key, Type View, Type ViewModel) info) - { - if (_cache.Any(x => x.Value.View == view)) - { - var cache = _cache.FirstOrDefault(x => x.Value.View == view); - info = (cache.Key, view, cache.Value.ViewModel); - return true; - } - else if (TryGetRegistration(view.Name, out info)) - { - return true; - } - else - { - info = (null, null, null); - return false; - } - } - } -} diff --git a/Source/Windows10/Prism.Windows/Prism.Windows.csproj b/Source/Windows10/Prism.Windows/Prism.Windows.csproj deleted file mode 100644 index d37f77499..000000000 --- a/Source/Windows10/Prism.Windows/Prism.Windows.csproj +++ /dev/null @@ -1,49 +0,0 @@ - - - - - uap10.0.15063;uap10.0.16299 - Prism - Prism for UWP - - - Prism provides an implementation of a collection of design patterns that are helpful in writing well structured and maintainable XAML applications, including MVVM, dependency injection, commanding, event aggregation, and more. Prism's core functionality is a shared code base in a Portable Class Library targeting these platforms; WPF, Windows 10 UWP, and Xamarin Forms. Features that need to be platform specific are implemented in the respective libraries for the target platform. Prism for UWP helps you more easily design and build rich, flexible, and easy to maintain UWP applications. - prism;win10;mvvm;uwp; - $(PRISM_WINDOWS_VERSION) - - - - - - - - - - - - - - - - - - True - True - Resources.resx - - - - - - ResXFileCodeGenerator - Resources.Designer.cs - - - - - - \ No newline at end of file diff --git a/Source/Windows10/Prism.Windows/PrismApplicationBase.cs b/Source/Windows10/Prism.Windows/PrismApplicationBase.cs deleted file mode 100644 index b50c1203c..000000000 --- a/Source/Windows10/Prism.Windows/PrismApplicationBase.cs +++ /dev/null @@ -1,299 +0,0 @@ -using System; -using System.ComponentModel; -using System.Diagnostics; -using System.Linq; -using System.Threading; -using System.Threading.Tasks; -using Prism.Events; -using Prism.Ioc; -using Prism.Logging; -using Prism.Modularity; -using Prism.Mvvm; -using Prism.Navigation; -using Prism.Services; -using Windows.ApplicationModel.Activation; -using Windows.Foundation; -using Windows.Storage; -using Windows.UI.Core; -using Windows.UI.Xaml; -using Windows.UI.Xaml.Controls; - -namespace Prism -{ - public abstract class PrismApplicationBase : Application, IPrismApplicationEvents - { - static int _initialized = 0; - public new static PrismApplicationBase Current => (PrismApplicationBase)Application.Current; - private static readonly SemaphoreSlim _startSemaphore = new SemaphoreSlim(1, 1); - public const string NavigationServiceParameterName = "navigationService"; - - public PrismApplicationBase() - { - InternalInitialize(); - - base.Suspending += async (s, e) => - { - if (ApplicationData.Current.LocalSettings.Values.ContainsKey("Suspend_Data")) - { - ApplicationData.Current.LocalSettings.Values.Remove("Suspend_Data"); - } - ApplicationData.Current.LocalSettings.Values.Add("Suspend_Data", DateTime.Now.ToString()); - var deferral = e.SuspendingOperation.GetDeferral(); - try - { - OnSuspending(); - await OnSuspendingAsync(); - } - finally - { - deferral.Complete(); - } - }; - base.Resuming += async (s, e) => - { - await InternalStartAsync(new StartArgs(ResumeArgs.Create(ApplicationExecutionState.Suspended), StartKinds.Resume)); - }; - } - - private IContainerExtension _containerExtension; - public IContainerProvider Container => _containerExtension; - - protected INavigationService NavigationService { get; private set; } - - private void InternalInitialize() - { - // dependecy injection - _containerExtension = CreateContainerExtension(); - RegisterRequiredTypes(_containerExtension); - - RegisterTypes(_containerExtension); - - _containerExtension.FinalizeExtension(); - - // finalize the application - ConfigureViewModelLocator(); - - ConfigureModuleCatalog(Container.Resolve()); - InitializeModules(); - } - - - private void CallOnInitializedOnce() - { - // once and only once, ever - if (Interlocked.Increment(ref _initialized) == 1) - { - NavigationService = CreateNavigationService(null, null, SupportedNavigationGestures()); - - OnInitialized(); - } - } - - private async Task InternalStartAsync(StartArgs startArgs) - { - await _startSemaphore.WaitAsync(); - - try - { - CallOnInitializedOnce(); - TestResuming(startArgs); - OnStart(startArgs); - await OnStartAsync(startArgs); - Window.Current.Activate(); - } - catch (Exception ex) - { - Container.Resolve().Log(ex.ToString(), Category.Exception, Priority.High); - } - finally - { - _startSemaphore.Release(); - } - } - - private static void TestResuming(StartArgs startArgs) - { - if (startArgs.Arguments is ILaunchActivatedEventArgs e - && e.PreviousExecutionState == ApplicationExecutionState.Terminated) - { - if (ApplicationData.Current.LocalSettings.Values.ContainsKey("Suspend_Data")) - { - ApplicationData.Current.LocalSettings.Values.Remove("Suspend_Data"); - startArgs.Arguments = ResumeArgs.Create(ApplicationExecutionState.Terminated); - startArgs.StartKind = StartKinds.Resume; - } - } - } - - protected virtual void OnSuspending() { /* empty */ } - - protected virtual Task OnSuspendingAsync() => Task.CompletedTask; - - protected abstract void RegisterTypes(IContainerRegistry containerRegistry); - - protected virtual void OnInitialized() - { - NavigationService.SetAsWindowContent(Window.Current, true); - } - - protected virtual void OnStart(StartArgs args) { /* empty */ } - - protected virtual Task OnStartAsync(StartArgs args) => Task.CompletedTask; - - protected virtual Gesture[] SupportedNavigationGestures() => new Gesture[] { Gesture.Back, Gesture.Forward, Gesture.Refresh }; - - protected virtual void ConfigureViewModelLocator() - { - ViewModelLocationProvider.SetDefaultViewModelFactory((view, viewModelType) => - { - INavigationService navigationService = null; - - if (view is Page page && page.Frame != null) - { - navigationService = CreateNavigationService(page.Frame, null, SupportedNavigationGestures()); - } - - return Container.Resolve(viewModelType, (typeof(INavigationService), navigationService)); - }); - } - - protected virtual void ConfigureModuleCatalog(IModuleCatalog moduleCatalog) { /* empty */ } - - protected virtual void InitializeModules() - { - if (Container.Resolve().Modules.Any()) - { - IModuleManager manager = Container.Resolve(); - manager.Run(); - } - } - - protected abstract IContainerExtension CreateContainerExtension(); - - protected virtual void RegisterRequiredTypes(IContainerRegistry containerRegistry) - { - containerRegistry.Register(NavigationServiceParameterName); - containerRegistry.Register(); - containerRegistry.Register(); - - // standard prism services - containerRegistry.RegisterInstance(_containerExtension); - containerRegistry.RegisterSingleton(); - containerRegistry.RegisterSingleton(); - containerRegistry.RegisterSingleton(); - containerRegistry.RegisterSingleton(); - containerRegistry.RegisterSingleton(); - } - - #region Factory Methods - - private INavigationService CreateNavigationService(Frame frame, CoreWindow window, params Gesture[] gestures) - { - if (frame is null) - frame = new Frame(); - - if (window is null) - window = Window.Current.CoreWindow; - - var gesture_service = CreateGestureServiceForWindow(window); - var navigation_service = Container.Resolve(NavigationServiceParameterName, (typeof(Frame), frame)); - foreach (var gesture in gestures) - { - switch (gesture) - { - case Gesture.Back: - gesture_service.BackRequested += async (s, e) => await navigation_service.GoBackAsync(); - break; - case Gesture.Forward: - gesture_service.ForwardRequested += async (s, e) => await navigation_service.GoForwardAsync(default(INavigationParameters)); - break; - case Gesture.Refresh: - gesture_service.RefreshRequested += async (s, e) => await navigation_service.RefreshAsync(); - break; - } - } - - return navigation_service; - } - - IGestureService CreateGestureServiceForWindow(CoreWindow window) - { - var service = Container.Resolve((typeof(CoreWindow), window)); - - // remove when closed - void Window_Closed(CoreWindow sender, CoreWindowEventArgs args) - { - window.Closed -= Window_Closed; - if (service is IDestructibleGestureService disposable) - { - disposable.Destroy(window); - } - } - window.Closed += Window_Closed; - - return service; - } - - #endregion - - #region Sealed Application Methods - - protected override sealed async void OnActivated(IActivatedEventArgs e) => await InternalStartAsync(new StartArgs(e, StartKinds.Activate)); - protected override sealed async void OnCachedFileUpdaterActivated(CachedFileUpdaterActivatedEventArgs e) => await InternalStartAsync(new StartArgs(e, StartKinds.Activate)); - protected override sealed async void OnFileActivated(FileActivatedEventArgs e) => await InternalStartAsync(new StartArgs(e, StartKinds.Activate)); - protected override sealed async void OnFileOpenPickerActivated(FileOpenPickerActivatedEventArgs e) => await InternalStartAsync(new StartArgs(e, StartKinds.Activate)); - protected override sealed async void OnFileSavePickerActivated(FileSavePickerActivatedEventArgs e) => await InternalStartAsync(new StartArgs(e, StartKinds.Activate)); - protected override sealed async void OnSearchActivated(SearchActivatedEventArgs e) => await InternalStartAsync(new StartArgs(e, StartKinds.Activate)); - protected override sealed async void OnShareTargetActivated(ShareTargetActivatedEventArgs e) => await InternalStartAsync(new StartArgs(e, StartKinds.Activate)); - protected override sealed async void OnLaunched(LaunchActivatedEventArgs e) => await InternalStartAsync(new StartArgs(e, StartKinds.Launch)); - protected override sealed async void OnBackgroundActivated(BackgroundActivatedEventArgs e) => await InternalStartAsync(new StartArgs(e, StartKinds.Background)); - - protected override void OnWindowCreated(WindowCreatedEventArgs args) - { - base.OnWindowCreated(args); - _windowCreated?.Invoke(this, args); - } - -#endregion - -#region Prism Events - -#pragma warning disable CS0067 // unused events - [EditorBrowsable(EditorBrowsableState.Never)] - private new event EventHandler Resuming; - - [EditorBrowsable(EditorBrowsableState.Never)] - private new event SuspendingEventHandler Suspending; - - [EditorBrowsable(EditorBrowsableState.Never)] - private new event EnteredBackgroundEventHandler EnteredBackground; - - [EditorBrowsable(EditorBrowsableState.Never)] - private new event LeavingBackgroundEventHandler LeavingBackground; - -#pragma warning restore CS0067 - - EnteredBackgroundEventHandler _enteredBackground; - event EnteredBackgroundEventHandler IPrismApplicationEvents.EnteredBackground - { - add { _enteredBackground += value; } - remove { _enteredBackground -= value; } - } - - LeavingBackgroundEventHandler _leavingBackground; - event LeavingBackgroundEventHandler IPrismApplicationEvents.LeavingBackground - { - add { _leavingBackground += value; } - remove { _leavingBackground -= value; } - } - - TypedEventHandler _windowCreated; - event TypedEventHandler IPrismApplicationEvents.WindowCreated - { - add { _windowCreated += value; } - remove { _windowCreated -= value; } - } - -#endregion - } -} diff --git a/Source/Windows10/Prism.Windows/Properties/Prism.Windows.rd.xml b/Source/Windows10/Prism.Windows/Properties/Prism.Windows.rd.xml deleted file mode 100644 index d9c14e5e4..000000000 --- a/Source/Windows10/Prism.Windows/Properties/Prism.Windows.rd.xml +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - diff --git a/Source/Windows10/Prism.Windows/Properties/Resources.Designer.cs b/Source/Windows10/Prism.Windows/Properties/Resources.Designer.cs deleted file mode 100644 index cdae65335..000000000 --- a/Source/Windows10/Prism.Windows/Properties/Resources.Designer.cs +++ /dev/null @@ -1,82 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// Runtime Version:4.0.30319.42000 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -namespace Prism.Properties { - using System; - using System.Reflection; - - - /// - /// A strongly-typed resource class, for looking up localized strings, etc. - /// - // This class was auto-generated by the StronglyTypedResourceBuilder - // class via a tool like ResGen or Visual Studio. - // To add or remove a member, edit your .ResX file then rerun ResGen - // with the /str option, or rebuild your VS project. - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "15.0.0.0")] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - internal class Resources { - - private static global::System.Resources.ResourceManager resourceMan; - - private static global::System.Globalization.CultureInfo resourceCulture; - - [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] - internal Resources() { - } - - /// - /// Returns the cached ResourceManager instance used by this class. - /// - [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - internal static global::System.Resources.ResourceManager ResourceManager { - get { - if (object.ReferenceEquals(resourceMan, null)) { - global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Prism.Properties.Resources", typeof(Resources).GetTypeInfo().Assembly); - resourceMan = temp; - } - return resourceMan; - } - } - - /// - /// Overrides the current thread's CurrentUICulture property for all - /// resource lookups using this strongly typed resource class. - /// - [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - internal static global::System.Globalization.CultureInfo Culture { - get { - return resourceCulture; - } - set { - resourceCulture = value; - } - } - - /// - /// Looks up a localized string similar to A duplicated module with name {0} has been found in the ModuleCatalog.. - /// - internal static string DuplicatedModuleInCatalog { - get { - return ResourceManager.GetString("DuplicatedModuleInCatalog", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Module {0} was not found in the catalog.. - /// - internal static string ModuleNotFound { - get { - return ResourceManager.GetString("ModuleNotFound", resourceCulture); - } - } - } -} diff --git a/Source/Windows10/Prism.Windows/Properties/Resources.resx b/Source/Windows10/Prism.Windows/Properties/Resources.resx deleted file mode 100644 index f69f6bc28..000000000 --- a/Source/Windows10/Prism.Windows/Properties/Resources.resx +++ /dev/null @@ -1,107 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 1.3 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.3500.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.3500.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - A duplicated module with name {0} has been found in the ModuleCatalog. - - - Module {0} was not found in the catalog. - - \ No newline at end of file diff --git a/Source/Windows10/Prism.Windows/ResumeArgs.cs b/Source/Windows10/Prism.Windows/ResumeArgs.cs deleted file mode 100644 index 0251fa14a..000000000 --- a/Source/Windows10/Prism.Windows/ResumeArgs.cs +++ /dev/null @@ -1,27 +0,0 @@ -using System; -using Windows.ApplicationModel.Activation; -using Windows.Storage; - -namespace Prism -{ - public class ResumeArgs : IResumeArgs, IActivatedEventArgs - { - public ActivationKind Kind { get; set; } - public ApplicationExecutionState PreviousExecutionState { get; set; } - public SplashScreen SplashScreen { get; set; } - public DateTime SuspensionDate { get; set; } - internal static ResumeArgs Create(ApplicationExecutionState state) - { - var args = new ResumeArgs - { - PreviousExecutionState = state - }; - if (ApplicationData.Current.LocalSettings.Values.TryGetValue("Suspend_Data", out var value) && value is DateTime date) - { - args.SuspensionDate = date; - } - ApplicationData.Current.LocalSettings.Values.Remove("Suspend_Data"); - return args; - } - } -} diff --git a/Source/Windows10/Prism.Windows/Services/Gesture/Gesture.cs b/Source/Windows10/Prism.Windows/Services/Gesture/Gesture.cs deleted file mode 100644 index f9848df04..000000000 --- a/Source/Windows10/Prism.Windows/Services/Gesture/Gesture.cs +++ /dev/null @@ -1,11 +0,0 @@ -namespace Prism.Services -{ - public enum Gesture - { - Back, - Forward, - Menu, - Refresh, - Search - } -} \ No newline at end of file diff --git a/Source/Windows10/Prism.Windows/Services/Gesture/GestureBarrier.cs b/Source/Windows10/Prism.Windows/Services/Gesture/GestureBarrier.cs deleted file mode 100644 index 6f7247593..000000000 --- a/Source/Windows10/Prism.Windows/Services/Gesture/GestureBarrier.cs +++ /dev/null @@ -1,13 +0,0 @@ -using System; - -namespace Prism.Services -{ - public class GestureBarrier - { - public Gesture Gesture { internal set; get; } - public Action Complete { internal set; get; } - public event EventHandler Event; - internal void RaiseEvent(EventArgs args) - => Event?.Invoke(this, args); - } -} \ No newline at end of file diff --git a/Source/Windows10/Prism.Windows/Services/Gesture/GestureService.cs b/Source/Windows10/Prism.Windows/Services/Gesture/GestureService.cs deleted file mode 100644 index 1e2d7acb3..000000000 --- a/Source/Windows10/Prism.Windows/Services/Gesture/GestureService.cs +++ /dev/null @@ -1,175 +0,0 @@ -using Prism.Logging; -using Prism.Ioc; -using System; -using System.Collections.Generic; -using System.Linq; -using Windows.Foundation; -using Windows.System; -using Windows.UI.Core; -using Windows.UI.Input; -using Windows.UI.Xaml; -using System.ComponentModel; - -namespace Prism.Services -{ - public class GestureService : IGestureService, IDestructibleGestureService - { - public GestureService(CoreWindow window, ILoggerFacade logger) - { - window.Dispatcher.AcceleratorKeyActivated += Dispatcher_AcceleratorKeyActivated; - window.PointerPressed += CoreWindow_PointerPressed; - SystemNavigationManager.GetForCurrentView().BackRequested += GestureService_BackRequested; - _logger = logger; - } - - public event EventHandler MenuRequested; - public event EventHandler BackRequested; - public event EventHandler SearchRequested; - public event EventHandler RefreshRequested; - public event EventHandler ForwardRequested; - public event TypedEventHandler KeyDown; - - #region Barrier - - List _barriers = new List(); - private readonly ILoggerFacade _logger; - - public GestureBarrier CreateBarrier(Gesture gesture) - { - GestureBarrier barrier = null; - return barrier = new GestureBarrier - { - Gesture = gesture, - Complete = () => _barriers.Remove(barrier), - }; - } - bool IfCanRaiseEvent(Gesture evt, Action action) - { - if (_barriers.Any(x => x.Gesture.Equals(evt))) - { - return false; - } - action(); - return true; - } - - #endregion - - public bool RaiseRefreshRequested() => IfCanRaiseEvent(Gesture.Refresh, () => RefreshRequested?.Invoke(this, EventArgs.Empty)); - public bool RaiseBackRequested() => IfCanRaiseEvent(Gesture.Back, () => BackRequested?.Invoke(this, EventArgs.Empty)); - public bool RaiseForwardRequested() => IfCanRaiseEvent(Gesture.Forward, () => ForwardRequested?.Invoke(this, EventArgs.Empty)); - public bool RaiseSearchRequested() => IfCanRaiseEvent(Gesture.Search, () => SearchRequested?.Invoke(this, EventArgs.Empty)); - public bool RaiseMenuRequested() => IfCanRaiseEvent(Gesture.Menu, () => MenuRequested?.Invoke(null, EventArgs.Empty)); - - public void Destroy(CoreWindow window) - { - window.Dispatcher.AcceleratorKeyActivated -= Dispatcher_AcceleratorKeyActivated; - window.PointerPressed -= CoreWindow_PointerPressed; - SystemNavigationManager.GetForCurrentView().BackRequested -= GestureService_BackRequested; - } - - private void GestureService_BackRequested(object sender, BackRequestedEventArgs e) - { - RaiseBackRequested(); - } - - private void CoreWindow_PointerPressed(CoreWindow sender, PointerEventArgs e) - { - var properties = e.CurrentPoint.Properties; - // Ignore button chords with the left, right, and middle buttons - if (properties.IsLeftButtonPressed - || properties.IsRightButtonPressed - || properties.IsMiddleButtonPressed) - { - return; - } - TestForNavigateRequested(e, properties); - } - - private void Dispatcher_AcceleratorKeyActivated(CoreDispatcher sender, AcceleratorKeyEventArgs e) - { - if (!e.EventType.ToString().Contains("Down") || e.Handled) - { - return; - } - var args = new KeyDownEventArgs(e.VirtualKey) { EventArgs = e }; - TestForSearchRequested(args); - TestForMenuRequested(args); - TestForNavigateRequested(args); - KeyDown?.Invoke(null, args); - } - - private void TestForNavigateRequested(KeyDownEventArgs e) - { - if ((e.VirtualKey == VirtualKey.GoBack) - || (e.VirtualKey == VirtualKey.NavigationLeft) - || (e.VirtualKey == VirtualKey.GamepadMenu) - || (e.VirtualKey == VirtualKey.GamepadLeftShoulder) - || (e.OnlyAlt && e.VirtualKey == VirtualKey.Back) - || (e.OnlyAlt && e.VirtualKey == VirtualKey.Left)) - { - _logger.Log($"{nameof(GestureService)}.{nameof(BackRequested)}", Category.Info, Priority.None); - RaiseBackRequested(); - } - else if ((e.VirtualKey == VirtualKey.GoForward) - || (e.VirtualKey == VirtualKey.NavigationRight) - || (e.VirtualKey == VirtualKey.GamepadRightShoulder) - || (e.OnlyAlt && e.VirtualKey == VirtualKey.Right)) - { - _logger.Log($"{nameof(GestureService)}.{nameof(ForwardRequested)}", Category.Info, Priority.None); - RaiseForwardRequested(); - } - else if ((e.VirtualKey == VirtualKey.Refresh) - || (e.VirtualKey == VirtualKey.F5)) - { - _logger.Log($"{nameof(GestureService)}.{nameof(RefreshRequested)}", Category.Info, Priority.None); - RaiseRefreshRequested(); - } - // this is still a preliminary value? - else if ((e.VirtualKey == VirtualKey.M) && e.OnlyAlt) - { - _logger.Log($"{nameof(GestureService)}.{nameof(MenuRequested)}", Category.Info, Priority.None); - RaiseMenuRequested(); - } - } - - private void TestForNavigateRequested(PointerEventArgs e, PointerPointProperties properties) - { - // If back or foward are pressed (but not both) - var backPressed = properties.IsXButton1Pressed; - var forwardPressed = properties.IsXButton2Pressed; - if (backPressed ^ forwardPressed) - { - e.Handled = true; - if (backPressed) - { - _logger.Log($"{nameof(GestureService)}.{nameof(BackRequested)}", Category.Info, Priority.None); - RaiseBackRequested(); - } - else if (forwardPressed) - { - _logger.Log($"{nameof(GestureService)}.{nameof(ForwardRequested)}", Category.Info, Priority.None); - RaiseForwardRequested(); - } - } - } - - private void TestForMenuRequested(KeyDownEventArgs args) - { - if (args.VirtualKey == VirtualKey.GamepadMenu) - { - _logger.Log($"{nameof(GestureService)}.{nameof(MenuRequested)}", Category.Info, Priority.None); - RaiseMenuRequested(); - } - } - - private void TestForSearchRequested(KeyDownEventArgs args) - { - if (args.OnlyControl && args.Character.ToString().ToLower().Equals("e")) - { - _logger.Log($"{nameof(GestureService)}.{nameof(SearchRequested)}", Category.Info, Priority.None); - RaiseSearchRequested(); - } - } - } -} diff --git a/Source/Windows10/Prism.Windows/Services/Gesture/IDestructibleGestureService.cs b/Source/Windows10/Prism.Windows/Services/Gesture/IDestructibleGestureService.cs deleted file mode 100644 index 31f0be119..000000000 --- a/Source/Windows10/Prism.Windows/Services/Gesture/IDestructibleGestureService.cs +++ /dev/null @@ -1,9 +0,0 @@ -using Windows.UI.Core; - -namespace Prism.Services -{ - public interface IDestructibleGestureService - { - void Destroy(CoreWindow window); - } -} diff --git a/Source/Windows10/Prism.Windows/Services/Gesture/IGestureService.cs b/Source/Windows10/Prism.Windows/Services/Gesture/IGestureService.cs deleted file mode 100644 index 9f1d6fbfe..000000000 --- a/Source/Windows10/Prism.Windows/Services/Gesture/IGestureService.cs +++ /dev/null @@ -1,24 +0,0 @@ -using System; -using Windows.Foundation; - -namespace Prism.Services -{ - public interface IGestureService - { - event TypedEventHandler KeyDown; - - GestureBarrier CreateBarrier(Gesture evt); - - event EventHandler BackRequested; - event EventHandler ForwardRequested; - event EventHandler MenuRequested; - event EventHandler RefreshRequested; - event EventHandler SearchRequested; - - bool RaiseBackRequested(); - bool RaiseForwardRequested(); - bool RaiseMenuRequested(); - bool RaiseRefreshRequested(); - bool RaiseSearchRequested(); - } -} \ No newline at end of file diff --git a/Source/Windows10/Prism.Windows/Services/Gesture/KeyDownEventArgs.cs b/Source/Windows10/Prism.Windows/Services/Gesture/KeyDownEventArgs.cs deleted file mode 100644 index ad1ec4e65..000000000 --- a/Source/Windows10/Prism.Windows/Services/Gesture/KeyDownEventArgs.cs +++ /dev/null @@ -1,79 +0,0 @@ -using System; -using System.Linq; -using Windows.System; -using Windows.UI.Core; -using Windows.UI.Xaml; - -namespace Prism.Services -{ - public class KeyDownEventArgs : EventArgs - { - public KeyDownEventArgs(VirtualKey virtualKey) - { - var alt = (Window.Current.CoreWindow.GetKeyState(VirtualKey.Menu) & CoreVirtualKeyStates.Down) == CoreVirtualKeyStates.Down; - var shift = (Window.Current.CoreWindow.GetKeyState(VirtualKey.Shift) & CoreVirtualKeyStates.Down) == CoreVirtualKeyStates.Down; - var control = (Window.Current.CoreWindow.GetKeyState(VirtualKey.Control) & CoreVirtualKeyStates.Down) == CoreVirtualKeyStates.Down; - var windows = ((Window.Current.CoreWindow.GetKeyState(VirtualKey.LeftWindows) & CoreVirtualKeyStates.Down) == CoreVirtualKeyStates.Down) - || ((Window.Current.CoreWindow.GetKeyState(VirtualKey.RightWindows) & CoreVirtualKeyStates.Down) == CoreVirtualKeyStates.Down); - - AltKey = alt; - ControlKey = control; - ShiftKey = shift; - WindowsKey = windows; - VirtualKey = virtualKey; - Character = ToChar(virtualKey, shift); - } - - public bool Handled { get; set; } = false; - public bool AltKey { get; set; } - public bool ControlKey { get; set; } - public bool ShiftKey { get; set; } - public VirtualKey VirtualKey { get; set; } - public AcceleratorKeyEventArgs EventArgs { get; set; } - public char? Character { get; set; } - public bool WindowsKey { get; internal set; } - - public bool OnlyWindows => WindowsKey & !AltKey & !ControlKey & !ShiftKey; - public bool OnlyAlt => !WindowsKey & AltKey & !ControlKey & !ShiftKey; - public bool OnlyControl => !WindowsKey & !AltKey & ControlKey & !ShiftKey; - public bool OnlyShift => !WindowsKey & !AltKey & !ControlKey & ShiftKey; - public bool Combo => new[] { AltKey, ControlKey, ShiftKey }.Any(x => x) & Character.HasValue; - - public override string ToString() - { - return $"KeyboardEventArgs = Handled {Handled}, AltKey {AltKey}, ControlKey {ControlKey}, ShiftKey {ShiftKey}, VirtualKey {VirtualKey}, Character {Character}, WindowsKey {WindowsKey}, OnlyWindows {OnlyWindows}, OnlyAlt {OnlyAlt}, OnlyControl {OnlyControl}, OnlyShift {OnlyShift}"; - } - - private static char? ToChar(VirtualKey key, bool shift) - { - // convert virtual key to char - if (32 == (int)key) - { - return ' '; - } - - VirtualKey search; - - // look for simple letter - foreach (var letter in "ABCDEFGHIJKLMNOPQRSTUVWXYZ") - { - if (Enum.TryParse(letter.ToString(), out search) && search.Equals(key)) - { - return (shift) ? letter : letter.ToString().ToLower()[0]; - } - } - - // look for simple number - foreach (var number in "1234567890") - { - if (Enum.TryParse("Number" + number.ToString(), out search) && search.Equals(key)) - { - return number; - } - } - - // not found - return null; - } - } -} diff --git a/Source/Windows10/Prism.Windows/StartArgs.cs b/Source/Windows10/Prism.Windows/StartArgs.cs deleted file mode 100644 index 018a33b0b..000000000 --- a/Source/Windows10/Prism.Windows/StartArgs.cs +++ /dev/null @@ -1,60 +0,0 @@ -using Windows.ApplicationModel.Activation; - -namespace Prism -{ - public class StartArgs : IStartArgs - { - public StartArgs(IActivatedEventArgs args, StartKinds startKind) - { - Arguments = args; - StartKind = startKind; - } - - public StartArgs(BackgroundActivatedEventArgs args, StartKinds startKind) - { - Arguments = args; - StartKind = startKind; - } - - public override string ToString() - { - return $"Args:{Arguments?.GetType()} Kind:{StartKind} Cause:{StartCause}"; - } - - public object Arguments { get; internal set; } - - public StartKinds StartKind { get; internal set; } - - public StartCauses StartCause - { - get - { - switch (Arguments) - { - case IToastNotificationActivatedEventArgs t: return StartCauses.Toast; - case ILaunchActivatedEventArgs p when (p?.TileId == "App" && string.IsNullOrEmpty(p?.Arguments)): return StartCauses.PrimaryTile; - case ILaunchActivatedEventArgs j when (j?.TileId == "App" && !string.IsNullOrEmpty(j?.Arguments)): return StartCauses.JumpListItem; - case ILaunchActivatedEventArgs s when (!string.IsNullOrEmpty(s?.TileId) && s?.TileId != "App"): return StartCauses.SecondaryTile; - case IBackgroundActivatedEventArgs b: return StartCauses.BackgroundTrigger; - case IFileActivatedEventArgs f: return StartCauses.File; - case IPrelaunchActivatedEventArgs p: return StartCauses.Prelaunch; - case IProtocolActivatedEventArgs p: return StartCauses.Protocol; - case ILockScreenActivatedEventArgs l: return StartCauses.LockScreen; - case IShareTargetActivatedEventArgs s: return StartCauses.ShareTarget; - case IVoiceCommandActivatedEventArgs v: return StartCauses.VoiceCommand; - case ISearchActivatedEventArgs s: return StartCauses.Search; - case IDeviceActivatedEventArgs d: return StartCauses.Device; - case IDevicePairingActivatedEventArgs d: return StartCauses.DevicePairing; - case IContactPanelActivatedEventArgs c: return StartCauses.ContactPanel; - // https://blogs.windows.com/buildingapps/2017/07/28/restart-app-programmatically/#1sGJmiirzC2MtROE.97 -#if !UAP10_0_15063 - case ICommandLineActivatedEventArgs c: return StartCauses.CommandLine; -#endif - case IActivatedEventArgs r when (r != null && r.Kind == ActivationKind.Launch && r.PreviousExecutionState == ApplicationExecutionState.Terminated): return StartCauses.Restart; - case null: return StartCauses.Undetermined; - default: return StartCauses.Undetermined; - } - } - } - } -} diff --git a/Source/Windows10/Prism.Windows/StartCauses.cs b/Source/Windows10/Prism.Windows/StartCauses.cs deleted file mode 100644 index db3da4f79..000000000 --- a/Source/Windows10/Prism.Windows/StartCauses.cs +++ /dev/null @@ -1,24 +0,0 @@ -namespace Prism -{ - public enum StartCauses - { - PrimaryTile, - Toast, - SecondaryTile, - Undetermined, - JumpListItem, - BackgroundTrigger, - CommandLine, - Restart, - ContactPanel, - File, - Prelaunch, - Protocol, - LockScreen, - ShareTarget, - VoiceCommand, - Search, - Device, - DevicePairing - } -} diff --git a/Source/Windows10/Prism.Windows/StartKinds.cs b/Source/Windows10/Prism.Windows/StartKinds.cs deleted file mode 100644 index 6c3cbb963..000000000 --- a/Source/Windows10/Prism.Windows/StartKinds.cs +++ /dev/null @@ -1,11 +0,0 @@ -namespace Prism -{ - public enum StartKinds - { - Prelaunch, - Launch, - Activate, - Background, - Resume - } -} diff --git a/Source/Windows10/Prism.Windows/Utilities/BindingUtilities.cs b/Source/Windows10/Prism.Windows/Utilities/BindingUtilities.cs deleted file mode 100644 index 85b76ee96..000000000 --- a/Source/Windows10/Prism.Windows/Utilities/BindingUtilities.cs +++ /dev/null @@ -1,45 +0,0 @@ -using System; -using System.Reflection; -using Windows.UI.Xaml.Controls; - -namespace Prism.Utilities -{ - public static class BindingUtilities - { - public static void UpdateBindings(Page page) - { - if (page == null) - { - return; - } - var field = page.GetType().GetTypeInfo().GetDeclaredField("Bindings"); - var bindings = field?.GetValue(page); - var update = bindings?.GetType().GetRuntimeMethod("Update", new Type[] { }); - update?.Invoke(bindings, null); - } - - public static void InitializeBindings(Page page) - { - if (page == null) - { - return; - } - var field = page.GetType().GetTypeInfo().GetDeclaredField("Bindings"); - var bindings = field?.GetValue(page); - var update = bindings?.GetType().GetRuntimeMethod("Initialize", new Type[] { }); - update?.Invoke(bindings, null); - } - - public static void StopTrackingBindings(Page page) - { - if (page == null) - { - return; - } - var field = page.GetType().GetTypeInfo().GetDeclaredField("Bindings"); - var bindings = field?.GetValue(page); - var update = bindings?.GetType().GetRuntimeMethod("StopTracking", new Type[] { }); - update?.Invoke(bindings, null); - } - } -} diff --git a/Source/Windows10/Prism.Windows/Utilities/XamlUtilities.cs b/Source/Windows10/Prism.Windows/Utilities/XamlUtilities.cs deleted file mode 100644 index 5a29e6329..000000000 --- a/Source/Windows10/Prism.Windows/Utilities/XamlUtilities.cs +++ /dev/null @@ -1,26 +0,0 @@ -using System.Collections.Generic; -using Windows.UI.Xaml; -using Windows.UI.Xaml.Media; - -namespace Prism.Utilities -{ - public static class XamlUtilities - { - public static List RecurseChildren(DependencyObject parent) - { - var list = new List(); - var count = VisualTreeHelper.GetChildrenCount(parent); - for (var i = 0; i < count; i++) - { - var child = VisualTreeHelper.GetChild(parent, i); - if (child is FrameworkElement element) - { - list.Add(element); - } - list.AddRange(RecurseChildren(child)); - } - return list; - } - - } -} diff --git a/Source/Windows10/readme.md b/Source/Windows10/readme.md deleted file mode 100644 index 0eb1da317..000000000 --- a/Source/Windows10/readme.md +++ /dev/null @@ -1,126 +0,0 @@ -## Prism for Windows - -This library is a startup orchestration library for UWP applications. The out-of-the box activation of UWP applications requires considerable custom development to support simple, common features standard in this library. For example, the Blank UWP template creates lengthy boilerplate code in app.xaml.cs. What's worse, it is very incomplete. Intended to guide developers, its volume and complexity make most developers want to leave it alone. - -#### Here's the old boilerplate app.xaml.cs created by Visual Studio's Blank app template. - -````csharp -sealed partial class App : Application -{ - /// - /// Initializes the singleton application object. This is the first line of authored code - /// executed, and as such is the logical equivalent of main() or WinMain(). - /// - public App() - { - this.InitializeComponent(); - this.Suspending += OnSuspending; - } - - /// - /// Invoked when the application is launched normally by the end user. Other entry points - /// will be used such as when the application is launched to open a specific file. - /// - /// Details about the launch request and process. - protected override void OnLaunched(LaunchActivatedEventArgs e) - { - Frame rootFrame = Window.Current.Content as Frame; - - // Do not repeat app initialization when the Window already has content, - // just ensure that the window is active - if (rootFrame == null) - { - // Create a Frame to act as the navigation context and navigate to the first page - rootFrame = new Frame(); - - rootFrame.NavigationFailed += OnNavigationFailed; - - if (e.PreviousExecutionState == ApplicationExecutionState.Terminated) - { - //TODO: Load state from previously suspended application - } - - // Place the frame in the current Window - Window.Current.Content = rootFrame; - } - - if (e.PrelaunchActivated == false) - { - if (rootFrame.Content == null) - { - // When the navigation stack isn't restored navigate to the first page, - // configuring the new page by passing required information as a navigation - // parameter - rootFrame.Navigate(typeof(MainPage), e.Arguments); - } - // Ensure the current window is active - Window.Current.Activate(); - } - } - - /// - /// Invoked when Navigation to a certain page fails - /// - /// The Frame which failed navigation - /// Details about the navigation failure - void OnNavigationFailed(object sender, NavigationFailedEventArgs e) - { - throw new Exception("Failed to load Page " + e.SourcePageType.FullName); - } - - /// - /// Invoked when application execution is being suspended. Application state is saved - /// without knowing whether the application will be terminated or resumed with the contents - /// of memory still intact. - /// - /// The source of the suspend request. - /// Details about the suspend request. - private void OnSuspending(object sender, SuspendingEventArgs e) - { - var deferral = e.SuspendingOperation.GetDeferral(); - //TODO: Save application state and stop any background activity - deferral.Complete(); - } -} -```` - -This library is a complete rewrite of that logic with several goals in mind: dependecy injection, navigation management, and the introduction of several standard features like event aggregation and view-model support. It makes getting started with UWP considerably more simple, and provides the capabilities most serious developers expect from a platform. - -#### Here's the boilerplate app.xaml.cs for Prism.Windows. - -````csharp -sealed partial class App : PrismApplication -{ - public static IPlatformNavigationService NavigationService { get; private set; } - - public App() - { - InitializeComponent(); - } - - public override void RegisterTypes(IContainerRegistry container) - { - container.RegisterForNavigation(nameof(Views.MainPage)); - } - - public override void OnInitialized() - { - NavigationService = Prism.Navigation.NavigationService - .Create(new Frame(), Gestures.Back, Gestures.Forward, Gestures.Refresh); - NavigationService.SetAsWindowContent(Window.Current, true); - } - - public override void OnStart(StartArgs args) - { - NavigationService.NavigateAsync(nameof(Views.MainPage)); - } -} -```` - -### Relationship to Xamarin - -This library provides a consistent experience for developers using Prism in their Xamarin applications. It shares interfaces, development approaches, and most Prism libraries. That said, it does not require or depend on Xamarin. It simply provides a consistent experience for developers using Prism across platforms. - -### Relationship to Template 10 - -This library used to be [Template 10](http://aka.ms/template10). Template 10 was a startup orchestration library refactored to align with Prism. This includes namespaces and a new startup pipeline accounting for UWP updates. However, Template 10's controls and libraries are not part of this library; they are merged into the Windows Toolkit or remain in Template 10's helper libraries. diff --git a/Source/build/azure-pipelines.uwp.yml b/Source/build/azure-pipelines.uwp.yml deleted file mode 100644 index 5f929ea00..000000000 --- a/Source/build/azure-pipelines.uwp.yml +++ /dev/null @@ -1,34 +0,0 @@ -trigger: - branches: - include: - - master - paths: - exclude: - - ReadMe.md - - Source/Wpf/** - - Source/Xamarin/** - -pr: - branches: - include: - - master - paths: - exclude: - - ReadMe.md - - Source/Wpf/** - - Source/Xamarin/** - -name: $(Build.BuildId) - -pool: - vmImage: vs2017-win2016 - -variables: - BuildPlatform: 'Any CPU' - BuildConfiguration: 'Release' - -steps: -- template: steps/build.yml - parameters: - solution: Source/PrismLibrary_Win10.sln - solutionName: Build Prism UWP