diff --git a/Android/PlatformBindings-Android.csproj b/Android/PlatformBindings-Android.csproj deleted file mode 100644 index f43f815..0000000 --- a/Android/PlatformBindings-Android.csproj +++ /dev/null @@ -1,22 +0,0 @@ - - - - monoandroid80 - PlatformBindings - PlatformBindings-Android - PlatformBindings-Android - Android Head for the .NET Platform Bindings Framework - .NET CrossPlatform Android MonoAndroid Xamarin.Android Xamarin PlatformBindings .NETPlatformBindingsFramework .NETPlatformBindings - - - - - - - - - - - - - \ No newline at end of file diff --git a/Android/Resources/Resource.Designer.cs b/Android/Resources/Resource.Designer.cs deleted file mode 100644 index 9be4db2..0000000 --- a/Android/Resources/Resource.Designer.cs +++ /dev/null @@ -1,12 +0,0 @@ -// ****************************************************************** -// Copyright (c) William Bradley -// This code is licensed under the MIT License (MIT). -// THE CODE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, -// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH -// THE CODE OR THE USE OR OTHER DEALINGS IN THE CODE. -// ****************************************************************** - diff --git a/Console/PlatformBindings-Console.csproj b/Console/PlatformBindings-Console.csproj deleted file mode 100644 index 89ab5a6..0000000 --- a/Console/PlatformBindings-Console.csproj +++ /dev/null @@ -1,24 +0,0 @@ - - - - netstandard1.4 - PlatformBindings - William Bradley - WilliamABradley - PlatformBindings-Console - .NET Console Head and Helpers for the .NET Platform Bindings Framework - Copyright © William Bradley 2017 - https://github.com/WilliamABradley/PlatformBindingsFramework/blob/master/LICENSE - https://github.com/WilliamABradley/PlatformBindingsFramework - .NET CrossPlatform Console .NETStandard PlatformBindings - - - - - - - - - - - \ No newline at end of file diff --git a/Core/AppServices.cs b/Core/AppServices.cs index c2537e7..2bd7e00 100644 --- a/Core/AppServices.cs +++ b/Core/AppServices.cs @@ -22,7 +22,7 @@ namespace PlatformBindings /// public abstract class AppServices { - public AppServices(bool HasUI, Platform Platform) + protected AppServices(bool HasUI, Platform Platform) { Current = this; this.HasUI = HasUI; diff --git a/Console/Common/ConsoleHelpers.cs b/Core/Console/Common/ConsoleHelpers.cs similarity index 100% rename from Console/Common/ConsoleHelpers.cs rename to Core/Console/Common/ConsoleHelpers.cs diff --git a/Console/Models/ConsoleTitleManager.cs b/Core/Console/Models/ConsoleTitleManager.cs similarity index 100% rename from Console/Models/ConsoleTitleManager.cs rename to Core/Console/Models/ConsoleTitleManager.cs diff --git a/Console/Models/ConsoleUIBindingInfo.cs b/Core/Console/Models/ConsoleUIBindingInfo.cs similarity index 100% rename from Console/Models/ConsoleUIBindingInfo.cs rename to Core/Console/Models/ConsoleUIBindingInfo.cs diff --git a/Console/Services/ConsoleUIBindings.cs b/Core/Console/Services/ConsoleUIBindings.cs similarity index 100% rename from Console/Services/ConsoleUIBindings.cs rename to Core/Console/Services/ConsoleUIBindings.cs diff --git a/Directory.Build.props b/Directory.Build.props index 5c62af8..61e3476 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -8,13 +8,6 @@ https://github.com/WilliamABradley/PlatformBindingsFramework https://github.com/WilliamABradley/PlatformBindingsFramework/blob/master/LICENSE Copyright © William Bradley 2017 - - $(MSBuildProjectName.Contains('UWP')) - $(MSBuildProjectName.Contains('Android')) - - 6.0.5 - 16299 - 14393 diff --git a/Directory.Build.targets b/Directory.Build.targets deleted file mode 100644 index faf1b36..0000000 --- a/Directory.Build.targets +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - 10.0.$(DefaultTargetPlatformVersion).0 - 10.0.$(DefaultTargetPlatformMinVersion).0 - Full - - - - - - - Windows Desktop Extensions for the UWP - - - Windows Mobile Extensions for the UWP - - - - - - - \ No newline at end of file diff --git a/NETCore/PlatformBindings-NETCore.csproj b/NETCore/PlatformBindings-NETCore.csproj deleted file mode 100644 index fdda11f..0000000 --- a/NETCore/PlatformBindings-NETCore.csproj +++ /dev/null @@ -1,20 +0,0 @@ - - - - netstandard2.0 - PlatformBindings - PlatformBindings-NETCore - .NET Core Head for the .NET Platform Bindings Framework - .NET CrossPlatform .NETCore .NETStandard PlatformBindings - - - - - - - - - - - - diff --git a/Platform/PlatformBindings-Platform.csproj b/Platform/PlatformBindings-Platform.csproj new file mode 100644 index 0000000..4aeb181 --- /dev/null +++ b/Platform/PlatformBindings-Platform.csproj @@ -0,0 +1,77 @@ + + + + netstandard1.4;netstandard2.0;net461;uap10.0;monoandroid80 + PlatformBindings + PlatformBindings + PlatformBindings + Operating System Library for the .NET Platform Bindings Framework + .NET CrossPlatform PlatformBindings .NETPlatformBindingsFramework .NETPlatformBindings + false + + + + + + WIN32 + + + + NETCore + + + + UWP + UAP + 10.0.14393.0 + 10.0.10240.0 + + + + ANDROID + Off + True + True + Platforms\Android\Resources\Resource.Designer.cs + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/iOS/IOSAppServices.cs b/Platform/PlatformBindingsBootstrapper.cs similarity index 57% rename from iOS/IOSAppServices.cs rename to Platform/PlatformBindingsBootstrapper.cs index 106c22b..6a3d2ea 100644 --- a/iOS/IOSAppServices.cs +++ b/Platform/PlatformBindingsBootstrapper.cs @@ -11,19 +11,31 @@ // ****************************************************************** using System; -using PlatformBindings.Enums; namespace PlatformBindings { - public class IOSAppServices : AppServices + public static class PlatformBindingsBootstrapper { - public IOSAppServices(bool HasUI) : base(HasUI, Platform.iOS) + public static void Initialise(bool HasUI) { +#if UWP + new UWPAppServices(HasUI); +#elif ANDROID + new AndroidAppServices(HasUI); +#elif WIN32 + new Win32AppServices(HasUI); +#elif NETCore + new NETCoreServices(HasUI); +#else + throw new NotImplementedException("This platform isn't supported yet."); +#endif } - public override Version GetAppVersion() +#if UWP + public static void AttachDispatcher(Windows.UI.Core.CoreDispatcher Dispatcher) { - throw new NotImplementedException(); + ((UWPAppServices)AppServices.Current).AttachDispatcher(Dispatcher); } +#endif } } \ No newline at end of file diff --git a/Android/Activities/ActivityHandler.cs b/Platform/Platforms/Android/Activities/ActivityHandler.cs similarity index 100% rename from Android/Activities/ActivityHandler.cs rename to Platform/Platforms/Android/Activities/ActivityHandler.cs diff --git a/Android/Activities/PlatformBindingActivity.cs b/Platform/Platforms/Android/Activities/PlatformBindingActivity.cs similarity index 100% rename from Android/Activities/PlatformBindingActivity.cs rename to Platform/Platforms/Android/Activities/PlatformBindingActivity.cs diff --git a/Android/Activities/PlatformBindingCompatActivity.cs b/Platform/Platforms/Android/Activities/PlatformBindingCompatActivity.cs similarity index 100% rename from Android/Activities/PlatformBindingCompatActivity.cs rename to Platform/Platforms/Android/Activities/PlatformBindingCompatActivity.cs diff --git a/Android/AndroidAppServices.cs b/Platform/Platforms/Android/AndroidAppServices.cs similarity index 95% rename from Android/AndroidAppServices.cs rename to Platform/Platforms/Android/AndroidAppServices.cs index e03b29d..8f7a872 100644 --- a/Android/AndroidAppServices.cs +++ b/Platform/Platforms/Android/AndroidAppServices.cs @@ -20,7 +20,7 @@ namespace PlatformBindings { public class AndroidAppServices : AppServices { - public AndroidAppServices(bool HasUI, bool UseAppCompatUI) : this(HasUI) + internal AndroidAppServices(bool HasUI, bool UseAppCompatUI) : this(HasUI) { AndroidAppServices.UseAppCompatUI = UseAppCompatUI; } diff --git a/Android/Common/ActivityExtensions.cs b/Platform/Platforms/Android/Common/ActivityExtensions.cs similarity index 100% rename from Android/Common/ActivityExtensions.cs rename to Platform/Platforms/Android/Common/ActivityExtensions.cs diff --git a/Android/Common/AndroidHelpers.cs b/Platform/Platforms/Android/Common/AndroidHelpers.cs similarity index 100% rename from Android/Common/AndroidHelpers.cs rename to Platform/Platforms/Android/Common/AndroidHelpers.cs diff --git a/Android/Models/ActivityResult.cs b/Platform/Platforms/Android/Models/ActivityResult.cs similarity index 100% rename from Android/Models/ActivityResult.cs rename to Platform/Platforms/Android/Models/ActivityResult.cs diff --git a/Android/Models/AndroidContextMenuBinding.cs b/Platform/Platforms/Android/Models/AndroidContextMenuBinding.cs similarity index 100% rename from Android/Models/AndroidContextMenuBinding.cs rename to Platform/Platforms/Android/Models/AndroidContextMenuBinding.cs diff --git a/Android/Models/AndroidCredentialContainer.cs b/Platform/Platforms/Android/Models/AndroidCredentialContainer.cs similarity index 100% rename from Android/Models/AndroidCredentialContainer.cs rename to Platform/Platforms/Android/Models/AndroidCredentialContainer.cs diff --git a/Android/Models/AndroidMenuRenderer.cs b/Platform/Platforms/Android/Models/AndroidMenuRenderer.cs similarity index 100% rename from Android/Models/AndroidMenuRenderer.cs rename to Platform/Platforms/Android/Models/AndroidMenuRenderer.cs diff --git a/Android/Models/AndroidPopupMenuRenderer.cs b/Platform/Platforms/Android/Models/AndroidPopupMenuRenderer.cs similarity index 100% rename from Android/Models/AndroidPopupMenuRenderer.cs rename to Platform/Platforms/Android/Models/AndroidPopupMenuRenderer.cs diff --git a/Android/Models/AndroidUIBindingInfo.cs b/Platform/Platforms/Android/Models/AndroidUIBindingInfo.cs similarity index 100% rename from Android/Models/AndroidUIBindingInfo.cs rename to Platform/Platforms/Android/Models/AndroidUIBindingInfo.cs diff --git a/Android/Models/DialogHandling/AlertDialogHandler.cs b/Platform/Platforms/Android/Models/DialogHandling/AlertDialogHandler.cs similarity index 100% rename from Android/Models/DialogHandling/AlertDialogHandler.cs rename to Platform/Platforms/Android/Models/DialogHandling/AlertDialogHandler.cs diff --git a/Android/Models/DialogHandling/AlertDialogHandlerBase.cs b/Platform/Platforms/Android/Models/DialogHandling/AlertDialogHandlerBase.cs similarity index 100% rename from Android/Models/DialogHandling/AlertDialogHandlerBase.cs rename to Platform/Platforms/Android/Models/DialogHandling/AlertDialogHandlerBase.cs diff --git a/Android/Models/DialogHandling/CompatAlertDialogHandler.cs b/Platform/Platforms/Android/Models/DialogHandling/CompatAlertDialogHandler.cs similarity index 100% rename from Android/Models/DialogHandling/CompatAlertDialogHandler.cs rename to Platform/Platforms/Android/Models/DialogHandling/CompatAlertDialogHandler.cs diff --git a/Android/Models/DialogHandling/DialogButtonEventArgs.cs b/Platform/Platforms/Android/Models/DialogHandling/DialogButtonEventArgs.cs similarity index 100% rename from Android/Models/DialogHandling/DialogButtonEventArgs.cs rename to Platform/Platforms/Android/Models/DialogHandling/DialogButtonEventArgs.cs diff --git a/Android/Models/Encryption/DefaultKeyGenerator.cs b/Platform/Platforms/Android/Models/Encryption/DefaultKeyGenerator.cs similarity index 100% rename from Android/Models/Encryption/DefaultKeyGenerator.cs rename to Platform/Platforms/Android/Models/Encryption/DefaultKeyGenerator.cs diff --git a/Android/Models/Encryption/IKeyGenerator.cs b/Platform/Platforms/Android/Models/Encryption/IKeyGenerator.cs similarity index 100% rename from Android/Models/Encryption/IKeyGenerator.cs rename to Platform/Platforms/Android/Models/Encryption/IKeyGenerator.cs diff --git a/Android/Models/FileSystem/AndroidSAFFileContainer.cs b/Platform/Platforms/Android/Models/FileSystem/AndroidSAFFileContainer.cs similarity index 100% rename from Android/Models/FileSystem/AndroidSAFFileContainer.cs rename to Platform/Platforms/Android/Models/FileSystem/AndroidSAFFileContainer.cs diff --git a/Android/Models/FileSystem/AndroidSAFFolderContainer.cs b/Platform/Platforms/Android/Models/FileSystem/AndroidSAFFolderContainer.cs similarity index 100% rename from Android/Models/FileSystem/AndroidSAFFolderContainer.cs rename to Platform/Platforms/Android/Models/FileSystem/AndroidSAFFolderContainer.cs diff --git a/Android/Models/FileSystem/IAndroidSAFContainer.cs b/Platform/Platforms/Android/Models/FileSystem/IAndroidSAFContainer.cs similarity index 100% rename from Android/Models/FileSystem/IAndroidSAFContainer.cs rename to Platform/Platforms/Android/Models/FileSystem/IAndroidSAFContainer.cs diff --git a/Android/Models/OAuth/AuthenticationActivity.cs b/Platform/Platforms/Android/Models/OAuth/AuthenticationActivity.cs similarity index 100% rename from Android/Models/OAuth/AuthenticationActivity.cs rename to Platform/Platforms/Android/Models/OAuth/AuthenticationActivity.cs diff --git a/Android/Models/Settings/AndroidSettingsContainer.cs b/Platform/Platforms/Android/Models/Settings/AndroidSettingsContainer.cs similarity index 100% rename from Android/Models/Settings/AndroidSettingsContainer.cs rename to Platform/Platforms/Android/Models/Settings/AndroidSettingsContainer.cs diff --git a/Android/Models/Spans/LineHeightSpan.cs b/Platform/Platforms/Android/Models/Spans/LineHeightSpan.cs similarity index 100% rename from Android/Models/Spans/LineHeightSpan.cs rename to Platform/Platforms/Android/Models/Spans/LineHeightSpan.cs diff --git a/Android/Resources/AboutResources.txt b/Platform/Platforms/Android/Resources/AboutResources.txt similarity index 100% rename from Android/Resources/AboutResources.txt rename to Platform/Platforms/Android/Resources/AboutResources.txt diff --git a/Platform/Platforms/Android/Resources/Resource.Designer.cs b/Platform/Platforms/Android/Resources/Resource.Designer.cs new file mode 100644 index 0000000..e69de29 diff --git a/Android/Services/AndroidActivityNavigationManager.cs b/Platform/Platforms/Android/Services/AndroidActivityNavigationManager.cs similarity index 100% rename from Android/Services/AndroidActivityNavigationManager.cs rename to Platform/Platforms/Android/Services/AndroidActivityNavigationManager.cs diff --git a/Android/Services/AndroidActivityNavigator.cs b/Platform/Platforms/Android/Services/AndroidActivityNavigator.cs similarity index 100% rename from Android/Services/AndroidActivityNavigator.cs rename to Platform/Platforms/Android/Services/AndroidActivityNavigator.cs diff --git a/Android/Services/AndroidCredentialManager.cs b/Platform/Platforms/Android/Services/AndroidCredentialManager.cs similarity index 100% rename from Android/Services/AndroidCredentialManager.cs rename to Platform/Platforms/Android/Services/AndroidCredentialManager.cs diff --git a/Android/Services/AndroidFileSystemPickers.cs b/Platform/Platforms/Android/Services/AndroidFileSystemPickers.cs similarity index 100% rename from Android/Services/AndroidFileSystemPickers.cs rename to Platform/Platforms/Android/Services/AndroidFileSystemPickers.cs diff --git a/Android/Services/AndroidFragmentNavigationManager.cs b/Platform/Platforms/Android/Services/AndroidFragmentNavigationManager.cs similarity index 100% rename from Android/Services/AndroidFragmentNavigationManager.cs rename to Platform/Platforms/Android/Services/AndroidFragmentNavigationManager.cs diff --git a/Android/Services/AndroidFragmentNavigator.cs b/Platform/Platforms/Android/Services/AndroidFragmentNavigator.cs similarity index 100% rename from Android/Services/AndroidFragmentNavigator.cs rename to Platform/Platforms/Android/Services/AndroidFragmentNavigator.cs diff --git a/Android/Services/AndroidFutureAccessManager.cs b/Platform/Platforms/Android/Services/AndroidFutureAccessManager.cs similarity index 100% rename from Android/Services/AndroidFutureAccessManager.cs rename to Platform/Platforms/Android/Services/AndroidFutureAccessManager.cs diff --git a/Android/Services/AndroidIOBindings.cs b/Platform/Platforms/Android/Services/AndroidIOBindings.cs similarity index 100% rename from Android/Services/AndroidIOBindings.cs rename to Platform/Platforms/Android/Services/AndroidIOBindings.cs diff --git a/Android/Services/AndroidOAuthBroker.cs b/Platform/Platforms/Android/Services/AndroidOAuthBroker.cs similarity index 100% rename from Android/Services/AndroidOAuthBroker.cs rename to Platform/Platforms/Android/Services/AndroidOAuthBroker.cs diff --git a/Android/Services/AndroidTitleManager.cs b/Platform/Platforms/Android/Services/AndroidTitleManager.cs similarity index 100% rename from Android/Services/AndroidTitleManager.cs rename to Platform/Platforms/Android/Services/AndroidTitleManager.cs diff --git a/Android/Services/AndroidUIBindings.cs b/Platform/Platforms/Android/Services/AndroidUIBindings.cs similarity index 100% rename from Android/Services/AndroidUIBindings.cs rename to Platform/Platforms/Android/Services/AndroidUIBindings.cs diff --git a/Android/Services/Compat/AndroidCompatFragmentNavigationManager.cs b/Platform/Platforms/Android/Services/Compat/AndroidCompatFragmentNavigationManager.cs similarity index 100% rename from Android/Services/Compat/AndroidCompatFragmentNavigationManager.cs rename to Platform/Platforms/Android/Services/Compat/AndroidCompatFragmentNavigationManager.cs diff --git a/Android/Services/Compat/AndroidCompatFragmentNavigator.cs b/Platform/Platforms/Android/Services/Compat/AndroidCompatFragmentNavigator.cs similarity index 100% rename from Android/Services/Compat/AndroidCompatFragmentNavigator.cs rename to Platform/Platforms/Android/Services/Compat/AndroidCompatFragmentNavigator.cs diff --git a/Android/Services/FileReshareProvider.cs b/Platform/Platforms/Android/Services/FileReshareProvider.cs similarity index 100% rename from Android/Services/FileReshareProvider.cs rename to Platform/Platforms/Android/Services/FileReshareProvider.cs diff --git a/Android/Services/PathResolver.cs b/Platform/Platforms/Android/Services/PathResolver.cs similarity index 100% rename from Android/Services/PathResolver.cs rename to Platform/Platforms/Android/Services/PathResolver.cs diff --git a/NETCore/Models/Settings/CoreSettingsContainer.cs b/Platform/Platforms/NETCore/Models/Settings/CoreSettingsContainer.cs similarity index 100% rename from NETCore/Models/Settings/CoreSettingsContainer.cs rename to Platform/Platforms/NETCore/Models/Settings/CoreSettingsContainer.cs diff --git a/NETCore/NETCoreServices.cs b/Platform/Platforms/NETCore/NETCoreServices.cs similarity index 93% rename from NETCore/NETCoreServices.cs rename to Platform/Platforms/NETCore/NETCoreServices.cs index c5f5751..3b78922 100644 --- a/NETCore/NETCoreServices.cs +++ b/Platform/Platforms/NETCore/NETCoreServices.cs @@ -17,7 +17,7 @@ namespace PlatformBindings { public class NETCoreServices : AppServices { - public NETCoreServices() : base(true, Enums.Platform.NETCore) + internal NETCoreServices(bool HasUI) : base(HasUI, Enums.Platform.NETCore) { IO = new CoreIOBindings(); UI = new CoreUIBindings(); diff --git a/NETCore/Services/CoreIOBindings.cs b/Platform/Platforms/NETCore/Services/CoreIOBindings.cs similarity index 100% rename from NETCore/Services/CoreIOBindings.cs rename to Platform/Platforms/NETCore/Services/CoreIOBindings.cs diff --git a/NETCore/Services/CoreUIBindings.cs b/Platform/Platforms/NETCore/Services/CoreUIBindings.cs similarity index 100% rename from NETCore/Services/CoreUIBindings.cs rename to Platform/Platforms/NETCore/Services/CoreUIBindings.cs diff --git a/UWP/Common/ContentDialogHelper.cs b/Platform/Platforms/UWP/Common/ContentDialogHelper.cs similarity index 100% rename from UWP/Common/ContentDialogHelper.cs rename to Platform/Platforms/UWP/Common/ContentDialogHelper.cs diff --git a/UWP/Models/CommandBarMenuBinding.cs b/Platform/Platforms/UWP/Models/CommandBarMenuBinding.cs similarity index 100% rename from UWP/Models/CommandBarMenuBinding.cs rename to Platform/Platforms/UWP/Models/CommandBarMenuBinding.cs diff --git a/UWP/Models/ContextMenuBinding.cs b/Platform/Platforms/UWP/Models/ContextMenuBinding.cs similarity index 100% rename from UWP/Models/ContextMenuBinding.cs rename to Platform/Platforms/UWP/Models/ContextMenuBinding.cs diff --git a/UWP/Models/FileSystem/IUWPFileSystemContainer.cs b/Platform/Platforms/UWP/Models/FileSystem/IUWPFileSystemContainer.cs similarity index 100% rename from UWP/Models/FileSystem/IUWPFileSystemContainer.cs rename to Platform/Platforms/UWP/Models/FileSystem/IUWPFileSystemContainer.cs diff --git a/UWP/Models/FileSystem/UWPFileContainer.cs b/Platform/Platforms/UWP/Models/FileSystem/UWPFileContainer.cs similarity index 100% rename from UWP/Models/FileSystem/UWPFileContainer.cs rename to Platform/Platforms/UWP/Models/FileSystem/UWPFileContainer.cs diff --git a/UWP/Models/FileSystem/UWPFolderContainer.cs b/Platform/Platforms/UWP/Models/FileSystem/UWPFolderContainer.cs similarity index 100% rename from UWP/Models/FileSystem/UWPFolderContainer.cs rename to Platform/Platforms/UWP/Models/FileSystem/UWPFolderContainer.cs diff --git a/UWP/Models/FileSystem/UWPPathResolver.cs b/Platform/Platforms/UWP/Models/FileSystem/UWPPathResolver.cs similarity index 100% rename from UWP/Models/FileSystem/UWPPathResolver.cs rename to Platform/Platforms/UWP/Models/FileSystem/UWPPathResolver.cs diff --git a/UWP/Models/IncrementalLoading/IncrementalLoadingConverter.cs b/Platform/Platforms/UWP/Models/IncrementalLoading/IncrementalLoadingConverter.cs similarity index 100% rename from UWP/Models/IncrementalLoading/IncrementalLoadingConverter.cs rename to Platform/Platforms/UWP/Models/IncrementalLoading/IncrementalLoadingConverter.cs diff --git a/UWP/Models/IncrementalLoading/UWPListSupportsIncrementalLoading.cs b/Platform/Platforms/UWP/Models/IncrementalLoading/UWPListSupportsIncrementalLoading.cs similarity index 100% rename from UWP/Models/IncrementalLoading/UWPListSupportsIncrementalLoading.cs rename to Platform/Platforms/UWP/Models/IncrementalLoading/UWPListSupportsIncrementalLoading.cs diff --git a/UWP/Models/IncrementalLoading/UWPSupportsIncrementalLoading.cs b/Platform/Platforms/UWP/Models/IncrementalLoading/UWPSupportsIncrementalLoading.cs similarity index 100% rename from UWP/Models/IncrementalLoading/UWPSupportsIncrementalLoading.cs rename to Platform/Platforms/UWP/Models/IncrementalLoading/UWPSupportsIncrementalLoading.cs diff --git a/UWP/Models/MenuRenderer.cs b/Platform/Platforms/UWP/Models/MenuRenderer.cs similarity index 100% rename from UWP/Models/MenuRenderer.cs rename to Platform/Platforms/UWP/Models/MenuRenderer.cs diff --git a/UWP/Models/Settings/UWPSettingsContainer.cs b/Platform/Platforms/UWP/Models/Settings/UWPSettingsContainer.cs similarity index 100% rename from UWP/Models/Settings/UWPSettingsContainer.cs rename to Platform/Platforms/UWP/Models/Settings/UWPSettingsContainer.cs diff --git a/UWP/Models/UWPCredentialContainer.cs b/Platform/Platforms/UWP/Models/UWPCredentialContainer.cs similarity index 100% rename from UWP/Models/UWPCredentialContainer.cs rename to Platform/Platforms/UWP/Models/UWPCredentialContainer.cs diff --git a/UWP/Models/UWPUIBindingInfo.cs b/Platform/Platforms/UWP/Models/UWPUIBindingInfo.cs similarity index 100% rename from UWP/Models/UWPUIBindingInfo.cs rename to Platform/Platforms/UWP/Models/UWPUIBindingInfo.cs diff --git a/UWP/Services/UWPCredentialManager.cs b/Platform/Platforms/UWP/Services/UWPCredentialManager.cs similarity index 98% rename from UWP/Services/UWPCredentialManager.cs rename to Platform/Platforms/UWP/Services/UWPCredentialManager.cs index e26f9c2..d8148aa 100644 --- a/UWP/Services/UWPCredentialManager.cs +++ b/Platform/Platforms/UWP/Services/UWPCredentialManager.cs @@ -15,7 +15,7 @@ using PlatformBindings.Models; using Windows.Security.Credentials; -namespace PlatformBindings.Services.Bindings +namespace PlatformBindings.Services { public class UWPCredentialManager : ICredentialManager { diff --git a/UWP/Services/UWPFileSystemPickers.cs b/Platform/Platforms/UWP/Services/UWPFileSystemPickers.cs similarity index 100% rename from UWP/Services/UWPFileSystemPickers.cs rename to Platform/Platforms/UWP/Services/UWPFileSystemPickers.cs diff --git a/UWP/Services/UWPFutureAccessManager.cs b/Platform/Platforms/UWP/Services/UWPFutureAccessManager.cs similarity index 100% rename from UWP/Services/UWPFutureAccessManager.cs rename to Platform/Platforms/UWP/Services/UWPFutureAccessManager.cs diff --git a/UWP/Services/UWPIOBindings.cs b/Platform/Platforms/UWP/Services/UWPIOBindings.cs similarity index 100% rename from UWP/Services/UWPIOBindings.cs rename to Platform/Platforms/UWP/Services/UWPIOBindings.cs diff --git a/UWP/Services/UWPInteractionManager.cs b/Platform/Platforms/UWP/Services/UWPInteractionManager.cs similarity index 100% rename from UWP/Services/UWPInteractionManager.cs rename to Platform/Platforms/UWP/Services/UWPInteractionManager.cs diff --git a/UWP/Services/UWPNavigationManager.cs b/Platform/Platforms/UWP/Services/UWPNavigationManager.cs similarity index 100% rename from UWP/Services/UWPNavigationManager.cs rename to Platform/Platforms/UWP/Services/UWPNavigationManager.cs diff --git a/UWP/Services/UWPNavigator.cs b/Platform/Platforms/UWP/Services/UWPNavigator.cs similarity index 100% rename from UWP/Services/UWPNavigator.cs rename to Platform/Platforms/UWP/Services/UWPNavigator.cs diff --git a/UWP/Services/UWPNetworkUtilities.cs b/Platform/Platforms/UWP/Services/UWPNetworkUtilities.cs similarity index 100% rename from UWP/Services/UWPNetworkUtilities.cs rename to Platform/Platforms/UWP/Services/UWPNetworkUtilities.cs diff --git a/UWP/Services/UWPOAuthBroker.cs b/Platform/Platforms/UWP/Services/UWPOAuthBroker.cs similarity index 98% rename from UWP/Services/UWPOAuthBroker.cs rename to Platform/Platforms/UWP/Services/UWPOAuthBroker.cs index 6ac294c..365001f 100644 --- a/UWP/Services/UWPOAuthBroker.cs +++ b/Platform/Platforms/UWP/Services/UWPOAuthBroker.cs @@ -17,7 +17,7 @@ using Windows.Security.Authentication.Web; using PlatformBindings.Common; -namespace PlatformBindings.Services.Bindings +namespace PlatformBindings.Services { public class UWPOAuthBroker : IOAuthBroker { diff --git a/UWP/Services/UWPTitleManager.cs b/Platform/Platforms/UWP/Services/UWPTitleManager.cs similarity index 100% rename from UWP/Services/UWPTitleManager.cs rename to Platform/Platforms/UWP/Services/UWPTitleManager.cs diff --git a/UWP/Services/UWPUIBindings.cs b/Platform/Platforms/UWP/Services/UWPUIBindings.cs similarity index 100% rename from UWP/Services/UWPUIBindings.cs rename to Platform/Platforms/UWP/Services/UWPUIBindings.cs diff --git a/UWP/UWPAppServices.cs b/Platform/Platforms/UWP/UWPAppServices.cs similarity index 94% rename from UWP/UWPAppServices.cs rename to Platform/Platforms/UWP/UWPAppServices.cs index f74da54..9b3f289 100644 --- a/UWP/UWPAppServices.cs +++ b/Platform/Platforms/UWP/UWPAppServices.cs @@ -14,7 +14,6 @@ using PlatformBindings.Services; using Windows.UI.Core; using Windows.ApplicationModel; -using PlatformBindings.Services.Bindings; using PlatformBindings.Enums; namespace PlatformBindings @@ -24,7 +23,7 @@ namespace PlatformBindings /// public class UWPAppServices : AppServices { - public UWPAppServices(bool HasUI) : base(HasUI, Platform.UWP) + internal UWPAppServices(bool HasUI) : base(HasUI, Platform.UWP) { IO = new UWPIOBindings(); Credentials = new UWPCredentialManager(); diff --git a/Win32/Services/Win32FileSystemPickers.cs b/Platform/Platforms/Win32/Services/Win32FileSystemPickers.cs similarity index 98% rename from Win32/Services/Win32FileSystemPickers.cs rename to Platform/Platforms/Win32/Services/Win32FileSystemPickers.cs index 229c05a..908ebb1 100644 --- a/Win32/Services/Win32FileSystemPickers.cs +++ b/Platform/Platforms/Win32/Services/Win32FileSystemPickers.cs @@ -10,10 +10,8 @@ // THE CODE OR THE USE OR OTHER DEALINGS IN THE CODE. // ****************************************************************** -using System; using System.Collections.Generic; using System.Linq; -using System.Text; using System.Threading.Tasks; using System.Windows.Forms; using Ookii.Dialogs.Wpf; @@ -113,6 +111,8 @@ public override Task SaveFile(FileSavePickerProperties Properties using (var dialog = new SaveFileDialog()) { ConfigureDialog(dialog, Properties); + dialog.OverwritePrompt = true; + dialog.CheckPathExists = true; if (Properties != null) { if (!string.IsNullOrWhiteSpace(Properties.SuggestedName)) diff --git a/Win32/Services/Win32IOBindings.cs b/Platform/Platforms/Win32/Services/Win32IOBindings.cs similarity index 100% rename from Win32/Services/Win32IOBindings.cs rename to Platform/Platforms/Win32/Services/Win32IOBindings.cs diff --git a/Win32/Win32AppServices.cs b/Platform/Platforms/Win32/Win32AppServices.cs similarity index 93% rename from Win32/Win32AppServices.cs rename to Platform/Platforms/Win32/Win32AppServices.cs index 1f1597f..e92d09e 100644 --- a/Win32/Win32AppServices.cs +++ b/Platform/Platforms/Win32/Win32AppServices.cs @@ -18,7 +18,7 @@ namespace PlatformBindings { public class Win32AppServices : AppServices { - public Win32AppServices(bool HasUI) : base(HasUI, Platform.Win32) + internal Win32AppServices(bool HasUI) : base(HasUI, Platform.Win32) { IO = new Win32IOBindings(); } diff --git a/PlatformBindingsFramework.sln b/PlatformBindingsFramework.sln index 08f03b0..5db52e5 100644 --- a/PlatformBindingsFramework.sln +++ b/PlatformBindingsFramework.sln @@ -5,28 +5,18 @@ VisualStudioVersion = 15.0.27130.2010 MinimumVisualStudioVersion = 10.0.40219.1 Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "PlatformBindings-Core", "Core\PlatformBindings-Core.csproj", "{49819B4E-2D4E-4FAB-BA80-4DD2FB2081CF}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "PlatformBindings-UWP", "UWP\PlatformBindings-UWP.csproj", "{6FE4FEDB-8C95-4CFB-BCA7-06104AFDCEED}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "PlatformBindings-Android", "Android\PlatformBindings-Android.csproj", "{35CDE811-8CA7-4041-AF2B-0DC0606A27DD}" -EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tests", "Tests", "{5004EF8D-9B09-4468-BDE1-2F1455C2FAAE}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "UWP", "UWP", "{A51388C3-40E5-4DA4-AA2D-349D75E592DB}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Android", "Android", "{1250BD7A-49BF-463E-A53F-B5B5A8AE787E}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "PlatformBindings-Console", "Console\PlatformBindings-Console.csproj", "{C8A22F1A-673F-4C2D-85F2-44025B518D2B}" -EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Tests-Universal", "TestApps\Tests-Universal\Tests-Universal.csproj", "{D75853E5-F084-4D29-BB6F-26C14CA16F64}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Test-Android", "TestApps\Android\Test-Android\Test-Android.csproj", "{BEE63EBC-97B3-4215-A1A8-C6054C834238}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Test-UWP", "TestApps\UWP\Test-UWP\Test-UWP.csproj", "{B7A60FD7-AEB0-4FBB-90BF-3393996942BD}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "PlatformBindings-XamarinForms", "XamarinForms\PlatformBindings-XamarinForms.csproj", "{3F4BEC39-D6F7-42F4-85C7-6E2935A3D819}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "PlatformBindings-NETCore", "NETCore\PlatformBindings-NETCore.csproj", "{0CA1BCF8-F846-4A13-A4C1-4624018B1852}" -EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "PlatformBindings-SMB", "SMB\PlatformBindings-SMB.csproj", "{6F2B13E8-FC4F-49CB-AD27-3CCA3AFC0E1B}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "NETCore", "NETCore", "{7B5B14B7-0E13-425C-9951-CF4B8D62E283}" @@ -37,13 +27,11 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "iOS", "iOS", "{E9D07B9B-7F3 EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Test-iOS", "TestApps\iOS\Test-iOS\Test-iOS.csproj", "{ED196E92-54F1-40C2-B056-F77FB87F9D45}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "PlatformBindings-Win32", "Win32\PlatformBindings-Win32.csproj", "{CE25568C-58C2-466E-BCFC-92C372D70516}" -EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "WPF", "WPF", "{B8FFCE56-0350-4D41-A4EB-88EC41923B17}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Test-WPF", "TestApps\WPF\Test-WPF\Test-WPF.csproj", "{EE351C47-F5B0-4BC0-A361-6A4F7F112557}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "PlatformBindings-iOS", "iOS\PlatformBindings-iOS.csproj", "{D0D6DEC8-B5F7-46F2-B279-6598D5834DD5}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PlatformBindings-Platform", "Platform\PlatformBindings-Platform.csproj", "{968BAFA2-8CBC-42BC-BEB4-6F537E9D272E}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -85,78 +73,6 @@ Global {49819B4E-2D4E-4FAB-BA80-4DD2FB2081CF}.Release|x64.Build.0 = Release|Any CPU {49819B4E-2D4E-4FAB-BA80-4DD2FB2081CF}.Release|x86.ActiveCfg = Release|Any CPU {49819B4E-2D4E-4FAB-BA80-4DD2FB2081CF}.Release|x86.Build.0 = Release|Any CPU - {6FE4FEDB-8C95-4CFB-BCA7-06104AFDCEED}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {6FE4FEDB-8C95-4CFB-BCA7-06104AFDCEED}.Debug|Any CPU.Build.0 = Debug|Any CPU - {6FE4FEDB-8C95-4CFB-BCA7-06104AFDCEED}.Debug|ARM.ActiveCfg = Debug|Any CPU - {6FE4FEDB-8C95-4CFB-BCA7-06104AFDCEED}.Debug|ARM.Build.0 = Debug|Any CPU - {6FE4FEDB-8C95-4CFB-BCA7-06104AFDCEED}.Debug|iPhone.ActiveCfg = Debug|Any CPU - {6FE4FEDB-8C95-4CFB-BCA7-06104AFDCEED}.Debug|iPhone.Build.0 = Debug|Any CPU - {6FE4FEDB-8C95-4CFB-BCA7-06104AFDCEED}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU - {6FE4FEDB-8C95-4CFB-BCA7-06104AFDCEED}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU - {6FE4FEDB-8C95-4CFB-BCA7-06104AFDCEED}.Debug|x64.ActiveCfg = Debug|Any CPU - {6FE4FEDB-8C95-4CFB-BCA7-06104AFDCEED}.Debug|x64.Build.0 = Debug|Any CPU - {6FE4FEDB-8C95-4CFB-BCA7-06104AFDCEED}.Debug|x86.ActiveCfg = Debug|Any CPU - {6FE4FEDB-8C95-4CFB-BCA7-06104AFDCEED}.Debug|x86.Build.0 = Debug|Any CPU - {6FE4FEDB-8C95-4CFB-BCA7-06104AFDCEED}.Release|Any CPU.ActiveCfg = Release|Any CPU - {6FE4FEDB-8C95-4CFB-BCA7-06104AFDCEED}.Release|Any CPU.Build.0 = Release|Any CPU - {6FE4FEDB-8C95-4CFB-BCA7-06104AFDCEED}.Release|ARM.ActiveCfg = Release|Any CPU - {6FE4FEDB-8C95-4CFB-BCA7-06104AFDCEED}.Release|ARM.Build.0 = Release|Any CPU - {6FE4FEDB-8C95-4CFB-BCA7-06104AFDCEED}.Release|iPhone.ActiveCfg = Release|Any CPU - {6FE4FEDB-8C95-4CFB-BCA7-06104AFDCEED}.Release|iPhone.Build.0 = Release|Any CPU - {6FE4FEDB-8C95-4CFB-BCA7-06104AFDCEED}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU - {6FE4FEDB-8C95-4CFB-BCA7-06104AFDCEED}.Release|iPhoneSimulator.Build.0 = Release|Any CPU - {6FE4FEDB-8C95-4CFB-BCA7-06104AFDCEED}.Release|x64.ActiveCfg = Release|Any CPU - {6FE4FEDB-8C95-4CFB-BCA7-06104AFDCEED}.Release|x64.Build.0 = Release|Any CPU - {6FE4FEDB-8C95-4CFB-BCA7-06104AFDCEED}.Release|x86.ActiveCfg = Release|Any CPU - {6FE4FEDB-8C95-4CFB-BCA7-06104AFDCEED}.Release|x86.Build.0 = Release|Any CPU - {35CDE811-8CA7-4041-AF2B-0DC0606A27DD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {35CDE811-8CA7-4041-AF2B-0DC0606A27DD}.Debug|Any CPU.Build.0 = Debug|Any CPU - {35CDE811-8CA7-4041-AF2B-0DC0606A27DD}.Debug|ARM.ActiveCfg = Debug|Any CPU - {35CDE811-8CA7-4041-AF2B-0DC0606A27DD}.Debug|ARM.Build.0 = Debug|Any CPU - {35CDE811-8CA7-4041-AF2B-0DC0606A27DD}.Debug|iPhone.ActiveCfg = Debug|Any CPU - {35CDE811-8CA7-4041-AF2B-0DC0606A27DD}.Debug|iPhone.Build.0 = Debug|Any CPU - {35CDE811-8CA7-4041-AF2B-0DC0606A27DD}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU - {35CDE811-8CA7-4041-AF2B-0DC0606A27DD}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU - {35CDE811-8CA7-4041-AF2B-0DC0606A27DD}.Debug|x64.ActiveCfg = Debug|Any CPU - {35CDE811-8CA7-4041-AF2B-0DC0606A27DD}.Debug|x64.Build.0 = Debug|Any CPU - {35CDE811-8CA7-4041-AF2B-0DC0606A27DD}.Debug|x86.ActiveCfg = Debug|Any CPU - {35CDE811-8CA7-4041-AF2B-0DC0606A27DD}.Debug|x86.Build.0 = Debug|Any CPU - {35CDE811-8CA7-4041-AF2B-0DC0606A27DD}.Release|Any CPU.ActiveCfg = Release|Any CPU - {35CDE811-8CA7-4041-AF2B-0DC0606A27DD}.Release|Any CPU.Build.0 = Release|Any CPU - {35CDE811-8CA7-4041-AF2B-0DC0606A27DD}.Release|ARM.ActiveCfg = Release|Any CPU - {35CDE811-8CA7-4041-AF2B-0DC0606A27DD}.Release|ARM.Build.0 = Release|Any CPU - {35CDE811-8CA7-4041-AF2B-0DC0606A27DD}.Release|iPhone.ActiveCfg = Release|Any CPU - {35CDE811-8CA7-4041-AF2B-0DC0606A27DD}.Release|iPhone.Build.0 = Release|Any CPU - {35CDE811-8CA7-4041-AF2B-0DC0606A27DD}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU - {35CDE811-8CA7-4041-AF2B-0DC0606A27DD}.Release|iPhoneSimulator.Build.0 = Release|Any CPU - {35CDE811-8CA7-4041-AF2B-0DC0606A27DD}.Release|x64.ActiveCfg = Release|Any CPU - {35CDE811-8CA7-4041-AF2B-0DC0606A27DD}.Release|x64.Build.0 = Release|Any CPU - {35CDE811-8CA7-4041-AF2B-0DC0606A27DD}.Release|x86.ActiveCfg = Release|Any CPU - {35CDE811-8CA7-4041-AF2B-0DC0606A27DD}.Release|x86.Build.0 = Release|Any CPU - {C8A22F1A-673F-4C2D-85F2-44025B518D2B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {C8A22F1A-673F-4C2D-85F2-44025B518D2B}.Debug|Any CPU.Build.0 = Debug|Any CPU - {C8A22F1A-673F-4C2D-85F2-44025B518D2B}.Debug|ARM.ActiveCfg = Debug|Any CPU - {C8A22F1A-673F-4C2D-85F2-44025B518D2B}.Debug|ARM.Build.0 = Debug|Any CPU - {C8A22F1A-673F-4C2D-85F2-44025B518D2B}.Debug|iPhone.ActiveCfg = Debug|Any CPU - {C8A22F1A-673F-4C2D-85F2-44025B518D2B}.Debug|iPhone.Build.0 = Debug|Any CPU - {C8A22F1A-673F-4C2D-85F2-44025B518D2B}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU - {C8A22F1A-673F-4C2D-85F2-44025B518D2B}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU - {C8A22F1A-673F-4C2D-85F2-44025B518D2B}.Debug|x64.ActiveCfg = Debug|Any CPU - {C8A22F1A-673F-4C2D-85F2-44025B518D2B}.Debug|x64.Build.0 = Debug|Any CPU - {C8A22F1A-673F-4C2D-85F2-44025B518D2B}.Debug|x86.ActiveCfg = Debug|Any CPU - {C8A22F1A-673F-4C2D-85F2-44025B518D2B}.Debug|x86.Build.0 = Debug|Any CPU - {C8A22F1A-673F-4C2D-85F2-44025B518D2B}.Release|Any CPU.ActiveCfg = Release|Any CPU - {C8A22F1A-673F-4C2D-85F2-44025B518D2B}.Release|Any CPU.Build.0 = Release|Any CPU - {C8A22F1A-673F-4C2D-85F2-44025B518D2B}.Release|ARM.ActiveCfg = Release|Any CPU - {C8A22F1A-673F-4C2D-85F2-44025B518D2B}.Release|ARM.Build.0 = Release|Any CPU - {C8A22F1A-673F-4C2D-85F2-44025B518D2B}.Release|iPhone.ActiveCfg = Release|Any CPU - {C8A22F1A-673F-4C2D-85F2-44025B518D2B}.Release|iPhone.Build.0 = Release|Any CPU - {C8A22F1A-673F-4C2D-85F2-44025B518D2B}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU - {C8A22F1A-673F-4C2D-85F2-44025B518D2B}.Release|iPhoneSimulator.Build.0 = Release|Any CPU - {C8A22F1A-673F-4C2D-85F2-44025B518D2B}.Release|x64.ActiveCfg = Release|Any CPU - {C8A22F1A-673F-4C2D-85F2-44025B518D2B}.Release|x64.Build.0 = Release|Any CPU - {C8A22F1A-673F-4C2D-85F2-44025B518D2B}.Release|x86.ActiveCfg = Release|Any CPU - {C8A22F1A-673F-4C2D-85F2-44025B518D2B}.Release|x86.Build.0 = Release|Any CPU {D75853E5-F084-4D29-BB6F-26C14CA16F64}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {D75853E5-F084-4D29-BB6F-26C14CA16F64}.Debug|Any CPU.Build.0 = Debug|Any CPU {D75853E5-F084-4D29-BB6F-26C14CA16F64}.Debug|ARM.ActiveCfg = Debug|Any CPU @@ -241,54 +157,6 @@ Global {B7A60FD7-AEB0-4FBB-90BF-3393996942BD}.Release|x86.ActiveCfg = Release|x86 {B7A60FD7-AEB0-4FBB-90BF-3393996942BD}.Release|x86.Build.0 = Release|x86 {B7A60FD7-AEB0-4FBB-90BF-3393996942BD}.Release|x86.Deploy.0 = Release|x86 - {3F4BEC39-D6F7-42F4-85C7-6E2935A3D819}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {3F4BEC39-D6F7-42F4-85C7-6E2935A3D819}.Debug|Any CPU.Build.0 = Debug|Any CPU - {3F4BEC39-D6F7-42F4-85C7-6E2935A3D819}.Debug|ARM.ActiveCfg = Debug|Any CPU - {3F4BEC39-D6F7-42F4-85C7-6E2935A3D819}.Debug|ARM.Build.0 = Debug|Any CPU - {3F4BEC39-D6F7-42F4-85C7-6E2935A3D819}.Debug|iPhone.ActiveCfg = Debug|Any CPU - {3F4BEC39-D6F7-42F4-85C7-6E2935A3D819}.Debug|iPhone.Build.0 = Debug|Any CPU - {3F4BEC39-D6F7-42F4-85C7-6E2935A3D819}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU - {3F4BEC39-D6F7-42F4-85C7-6E2935A3D819}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU - {3F4BEC39-D6F7-42F4-85C7-6E2935A3D819}.Debug|x64.ActiveCfg = Debug|Any CPU - {3F4BEC39-D6F7-42F4-85C7-6E2935A3D819}.Debug|x64.Build.0 = Debug|Any CPU - {3F4BEC39-D6F7-42F4-85C7-6E2935A3D819}.Debug|x86.ActiveCfg = Debug|Any CPU - {3F4BEC39-D6F7-42F4-85C7-6E2935A3D819}.Debug|x86.Build.0 = Debug|Any CPU - {3F4BEC39-D6F7-42F4-85C7-6E2935A3D819}.Release|Any CPU.ActiveCfg = Release|Any CPU - {3F4BEC39-D6F7-42F4-85C7-6E2935A3D819}.Release|Any CPU.Build.0 = Release|Any CPU - {3F4BEC39-D6F7-42F4-85C7-6E2935A3D819}.Release|ARM.ActiveCfg = Release|Any CPU - {3F4BEC39-D6F7-42F4-85C7-6E2935A3D819}.Release|ARM.Build.0 = Release|Any CPU - {3F4BEC39-D6F7-42F4-85C7-6E2935A3D819}.Release|iPhone.ActiveCfg = Release|Any CPU - {3F4BEC39-D6F7-42F4-85C7-6E2935A3D819}.Release|iPhone.Build.0 = Release|Any CPU - {3F4BEC39-D6F7-42F4-85C7-6E2935A3D819}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU - {3F4BEC39-D6F7-42F4-85C7-6E2935A3D819}.Release|iPhoneSimulator.Build.0 = Release|Any CPU - {3F4BEC39-D6F7-42F4-85C7-6E2935A3D819}.Release|x64.ActiveCfg = Release|Any CPU - {3F4BEC39-D6F7-42F4-85C7-6E2935A3D819}.Release|x64.Build.0 = Release|Any CPU - {3F4BEC39-D6F7-42F4-85C7-6E2935A3D819}.Release|x86.ActiveCfg = Release|Any CPU - {3F4BEC39-D6F7-42F4-85C7-6E2935A3D819}.Release|x86.Build.0 = Release|Any CPU - {0CA1BCF8-F846-4A13-A4C1-4624018B1852}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {0CA1BCF8-F846-4A13-A4C1-4624018B1852}.Debug|Any CPU.Build.0 = Debug|Any CPU - {0CA1BCF8-F846-4A13-A4C1-4624018B1852}.Debug|ARM.ActiveCfg = Debug|Any CPU - {0CA1BCF8-F846-4A13-A4C1-4624018B1852}.Debug|ARM.Build.0 = Debug|Any CPU - {0CA1BCF8-F846-4A13-A4C1-4624018B1852}.Debug|iPhone.ActiveCfg = Debug|Any CPU - {0CA1BCF8-F846-4A13-A4C1-4624018B1852}.Debug|iPhone.Build.0 = Debug|Any CPU - {0CA1BCF8-F846-4A13-A4C1-4624018B1852}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU - {0CA1BCF8-F846-4A13-A4C1-4624018B1852}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU - {0CA1BCF8-F846-4A13-A4C1-4624018B1852}.Debug|x64.ActiveCfg = Debug|Any CPU - {0CA1BCF8-F846-4A13-A4C1-4624018B1852}.Debug|x64.Build.0 = Debug|Any CPU - {0CA1BCF8-F846-4A13-A4C1-4624018B1852}.Debug|x86.ActiveCfg = Debug|Any CPU - {0CA1BCF8-F846-4A13-A4C1-4624018B1852}.Debug|x86.Build.0 = Debug|Any CPU - {0CA1BCF8-F846-4A13-A4C1-4624018B1852}.Release|Any CPU.ActiveCfg = Release|Any CPU - {0CA1BCF8-F846-4A13-A4C1-4624018B1852}.Release|Any CPU.Build.0 = Release|Any CPU - {0CA1BCF8-F846-4A13-A4C1-4624018B1852}.Release|ARM.ActiveCfg = Release|Any CPU - {0CA1BCF8-F846-4A13-A4C1-4624018B1852}.Release|ARM.Build.0 = Release|Any CPU - {0CA1BCF8-F846-4A13-A4C1-4624018B1852}.Release|iPhone.ActiveCfg = Release|Any CPU - {0CA1BCF8-F846-4A13-A4C1-4624018B1852}.Release|iPhone.Build.0 = Release|Any CPU - {0CA1BCF8-F846-4A13-A4C1-4624018B1852}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU - {0CA1BCF8-F846-4A13-A4C1-4624018B1852}.Release|iPhoneSimulator.Build.0 = Release|Any CPU - {0CA1BCF8-F846-4A13-A4C1-4624018B1852}.Release|x64.ActiveCfg = Release|Any CPU - {0CA1BCF8-F846-4A13-A4C1-4624018B1852}.Release|x64.Build.0 = Release|Any CPU - {0CA1BCF8-F846-4A13-A4C1-4624018B1852}.Release|x86.ActiveCfg = Release|Any CPU - {0CA1BCF8-F846-4A13-A4C1-4624018B1852}.Release|x86.Build.0 = Release|Any CPU {6F2B13E8-FC4F-49CB-AD27-3CCA3AFC0E1B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {6F2B13E8-FC4F-49CB-AD27-3CCA3AFC0E1B}.Debug|Any CPU.Build.0 = Debug|Any CPU {6F2B13E8-FC4F-49CB-AD27-3CCA3AFC0E1B}.Debug|ARM.ActiveCfg = Debug|Any CPU @@ -353,30 +221,6 @@ Global {ED196E92-54F1-40C2-B056-F77FB87F9D45}.Release|iPhoneSimulator.Build.0 = Release|iPhoneSimulator {ED196E92-54F1-40C2-B056-F77FB87F9D45}.Release|x64.ActiveCfg = Release|iPhone {ED196E92-54F1-40C2-B056-F77FB87F9D45}.Release|x86.ActiveCfg = Release|iPhone - {CE25568C-58C2-466E-BCFC-92C372D70516}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {CE25568C-58C2-466E-BCFC-92C372D70516}.Debug|Any CPU.Build.0 = Debug|Any CPU - {CE25568C-58C2-466E-BCFC-92C372D70516}.Debug|ARM.ActiveCfg = Debug|Any CPU - {CE25568C-58C2-466E-BCFC-92C372D70516}.Debug|ARM.Build.0 = Debug|Any CPU - {CE25568C-58C2-466E-BCFC-92C372D70516}.Debug|iPhone.ActiveCfg = Debug|Any CPU - {CE25568C-58C2-466E-BCFC-92C372D70516}.Debug|iPhone.Build.0 = Debug|Any CPU - {CE25568C-58C2-466E-BCFC-92C372D70516}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU - {CE25568C-58C2-466E-BCFC-92C372D70516}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU - {CE25568C-58C2-466E-BCFC-92C372D70516}.Debug|x64.ActiveCfg = Debug|Any CPU - {CE25568C-58C2-466E-BCFC-92C372D70516}.Debug|x64.Build.0 = Debug|Any CPU - {CE25568C-58C2-466E-BCFC-92C372D70516}.Debug|x86.ActiveCfg = Debug|Any CPU - {CE25568C-58C2-466E-BCFC-92C372D70516}.Debug|x86.Build.0 = Debug|Any CPU - {CE25568C-58C2-466E-BCFC-92C372D70516}.Release|Any CPU.ActiveCfg = Release|Any CPU - {CE25568C-58C2-466E-BCFC-92C372D70516}.Release|Any CPU.Build.0 = Release|Any CPU - {CE25568C-58C2-466E-BCFC-92C372D70516}.Release|ARM.ActiveCfg = Release|Any CPU - {CE25568C-58C2-466E-BCFC-92C372D70516}.Release|ARM.Build.0 = Release|Any CPU - {CE25568C-58C2-466E-BCFC-92C372D70516}.Release|iPhone.ActiveCfg = Release|Any CPU - {CE25568C-58C2-466E-BCFC-92C372D70516}.Release|iPhone.Build.0 = Release|Any CPU - {CE25568C-58C2-466E-BCFC-92C372D70516}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU - {CE25568C-58C2-466E-BCFC-92C372D70516}.Release|iPhoneSimulator.Build.0 = Release|Any CPU - {CE25568C-58C2-466E-BCFC-92C372D70516}.Release|x64.ActiveCfg = Release|Any CPU - {CE25568C-58C2-466E-BCFC-92C372D70516}.Release|x64.Build.0 = Release|Any CPU - {CE25568C-58C2-466E-BCFC-92C372D70516}.Release|x86.ActiveCfg = Release|Any CPU - {CE25568C-58C2-466E-BCFC-92C372D70516}.Release|x86.Build.0 = Release|Any CPU {EE351C47-F5B0-4BC0-A361-6A4F7F112557}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {EE351C47-F5B0-4BC0-A361-6A4F7F112557}.Debug|Any CPU.Build.0 = Debug|Any CPU {EE351C47-F5B0-4BC0-A361-6A4F7F112557}.Debug|ARM.ActiveCfg = Debug|Any CPU @@ -401,30 +245,30 @@ Global {EE351C47-F5B0-4BC0-A361-6A4F7F112557}.Release|x64.Build.0 = Release|Any CPU {EE351C47-F5B0-4BC0-A361-6A4F7F112557}.Release|x86.ActiveCfg = Release|Any CPU {EE351C47-F5B0-4BC0-A361-6A4F7F112557}.Release|x86.Build.0 = Release|Any CPU - {D0D6DEC8-B5F7-46F2-B279-6598D5834DD5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {D0D6DEC8-B5F7-46F2-B279-6598D5834DD5}.Debug|Any CPU.Build.0 = Debug|Any CPU - {D0D6DEC8-B5F7-46F2-B279-6598D5834DD5}.Debug|ARM.ActiveCfg = Debug|Any CPU - {D0D6DEC8-B5F7-46F2-B279-6598D5834DD5}.Debug|ARM.Build.0 = Debug|Any CPU - {D0D6DEC8-B5F7-46F2-B279-6598D5834DD5}.Debug|iPhone.ActiveCfg = Debug|Any CPU - {D0D6DEC8-B5F7-46F2-B279-6598D5834DD5}.Debug|iPhone.Build.0 = Debug|Any CPU - {D0D6DEC8-B5F7-46F2-B279-6598D5834DD5}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU - {D0D6DEC8-B5F7-46F2-B279-6598D5834DD5}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU - {D0D6DEC8-B5F7-46F2-B279-6598D5834DD5}.Debug|x64.ActiveCfg = Debug|Any CPU - {D0D6DEC8-B5F7-46F2-B279-6598D5834DD5}.Debug|x64.Build.0 = Debug|Any CPU - {D0D6DEC8-B5F7-46F2-B279-6598D5834DD5}.Debug|x86.ActiveCfg = Debug|Any CPU - {D0D6DEC8-B5F7-46F2-B279-6598D5834DD5}.Debug|x86.Build.0 = Debug|Any CPU - {D0D6DEC8-B5F7-46F2-B279-6598D5834DD5}.Release|Any CPU.ActiveCfg = Release|Any CPU - {D0D6DEC8-B5F7-46F2-B279-6598D5834DD5}.Release|Any CPU.Build.0 = Release|Any CPU - {D0D6DEC8-B5F7-46F2-B279-6598D5834DD5}.Release|ARM.ActiveCfg = Release|Any CPU - {D0D6DEC8-B5F7-46F2-B279-6598D5834DD5}.Release|ARM.Build.0 = Release|Any CPU - {D0D6DEC8-B5F7-46F2-B279-6598D5834DD5}.Release|iPhone.ActiveCfg = Release|Any CPU - {D0D6DEC8-B5F7-46F2-B279-6598D5834DD5}.Release|iPhone.Build.0 = Release|Any CPU - {D0D6DEC8-B5F7-46F2-B279-6598D5834DD5}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU - {D0D6DEC8-B5F7-46F2-B279-6598D5834DD5}.Release|iPhoneSimulator.Build.0 = Release|Any CPU - {D0D6DEC8-B5F7-46F2-B279-6598D5834DD5}.Release|x64.ActiveCfg = Release|Any CPU - {D0D6DEC8-B5F7-46F2-B279-6598D5834DD5}.Release|x64.Build.0 = Release|Any CPU - {D0D6DEC8-B5F7-46F2-B279-6598D5834DD5}.Release|x86.ActiveCfg = Release|Any CPU - {D0D6DEC8-B5F7-46F2-B279-6598D5834DD5}.Release|x86.Build.0 = Release|Any CPU + {968BAFA2-8CBC-42BC-BEB4-6F537E9D272E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {968BAFA2-8CBC-42BC-BEB4-6F537E9D272E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {968BAFA2-8CBC-42BC-BEB4-6F537E9D272E}.Debug|ARM.ActiveCfg = Debug|Any CPU + {968BAFA2-8CBC-42BC-BEB4-6F537E9D272E}.Debug|ARM.Build.0 = Debug|Any CPU + {968BAFA2-8CBC-42BC-BEB4-6F537E9D272E}.Debug|iPhone.ActiveCfg = Debug|Any CPU + {968BAFA2-8CBC-42BC-BEB4-6F537E9D272E}.Debug|iPhone.Build.0 = Debug|Any CPU + {968BAFA2-8CBC-42BC-BEB4-6F537E9D272E}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU + {968BAFA2-8CBC-42BC-BEB4-6F537E9D272E}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU + {968BAFA2-8CBC-42BC-BEB4-6F537E9D272E}.Debug|x64.ActiveCfg = Debug|Any CPU + {968BAFA2-8CBC-42BC-BEB4-6F537E9D272E}.Debug|x64.Build.0 = Debug|Any CPU + {968BAFA2-8CBC-42BC-BEB4-6F537E9D272E}.Debug|x86.ActiveCfg = Debug|Any CPU + {968BAFA2-8CBC-42BC-BEB4-6F537E9D272E}.Debug|x86.Build.0 = Debug|Any CPU + {968BAFA2-8CBC-42BC-BEB4-6F537E9D272E}.Release|Any CPU.ActiveCfg = Release|Any CPU + {968BAFA2-8CBC-42BC-BEB4-6F537E9D272E}.Release|Any CPU.Build.0 = Release|Any CPU + {968BAFA2-8CBC-42BC-BEB4-6F537E9D272E}.Release|ARM.ActiveCfg = Release|Any CPU + {968BAFA2-8CBC-42BC-BEB4-6F537E9D272E}.Release|ARM.Build.0 = Release|Any CPU + {968BAFA2-8CBC-42BC-BEB4-6F537E9D272E}.Release|iPhone.ActiveCfg = Release|Any CPU + {968BAFA2-8CBC-42BC-BEB4-6F537E9D272E}.Release|iPhone.Build.0 = Release|Any CPU + {968BAFA2-8CBC-42BC-BEB4-6F537E9D272E}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU + {968BAFA2-8CBC-42BC-BEB4-6F537E9D272E}.Release|iPhoneSimulator.Build.0 = Release|Any CPU + {968BAFA2-8CBC-42BC-BEB4-6F537E9D272E}.Release|x64.ActiveCfg = Release|Any CPU + {968BAFA2-8CBC-42BC-BEB4-6F537E9D272E}.Release|x64.Build.0 = Release|Any CPU + {968BAFA2-8CBC-42BC-BEB4-6F537E9D272E}.Release|x86.ActiveCfg = Release|Any CPU + {968BAFA2-8CBC-42BC-BEB4-6F537E9D272E}.Release|x86.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/README.md b/README.md index 4578508..d5ea5ed 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ Android is somewhat implemented, while Xamarin.Forms is mostly unimplemented. ## Documentation -All documentation is accessible on [GitHub](https://github.com/WilliamABradley/PlatformBindingsFramework/tree/master/_docs). +All documentation is accessible on [GitHub](https://github.com/WilliamABradley/PlatformBindingsFramework/tree/master/docs). * [Getting Started](_docs/GettingStarted.md) * [AppServices](_docs/AppServices.md) @@ -64,21 +64,10 @@ All documentation is accessible on [GitHub](https://github.com/WilliamABradley/P ## NuGet Packages -### Platform Libraries - | NuGet Package | Description | | --- | --- | | [PlatformBindings-Core](https://www.nuget.org/packages/PlatformBindings-Core) | Platform Bindings Framework Core Library and API Surface | -| [PlatformBindings-UWP](https://www.nuget.org/packages/PlatformBindings-UWP) | Universal Windows Platform Library | -| [PlatformBindings-Android](https://www.nuget.org/packages/PlatformBindings-Android) | Android Platform Library | -| [PlatformBindings-Console](https://www.nuget.org/packages/PlatformBindings-Console) | .NET Console Helpers for [System.Console](https://msdn.microsoft.com/en-us/library/system.console(v=vs.110).aspx) | -| [PlatformBindings-NETCore](https://www.nuget.org/packages/PlatformBindings-NETCore) | .NET Core Application Library | -| [PlatformBindings-XamarinForms](https://www.nuget.org/packages/PlatformBindings-XamarinForms) | Xamarin Forms Platform Library | - -### Extensions - -| NuGet Package | Description | -| --- | --- | +| [PlatformBindings](https://www.nuget.org/packages/PlatformBindings) | OS Platform Library | | [PlatformBindings-SMB](https://www.nuget.org/packages/PlatformBindings-SMB) | SMB/CIFS FileContainer & FolderContainer Extension | ## Supported SDKs @@ -105,6 +94,10 @@ Although the Core and Console Libraries are .NET Standard 1.4 Compliant, there i Requires .NET Standard 1.4 support. +### Win32/.NET Framework + +Requires .NET Framework 4.6.1 and higher. + ## Feedback and Requests Please use [GitHub issues](https://github.com/WilliamABradley/PlatformBindingsFramework/issues) for bug reports and Platform/API Addition requests. diff --git a/TestApps/Android/Test-Android/MainActivity.cs b/TestApps/Android/Test-Android/MainActivity.cs index 8f09416..1c425b0 100644 --- a/TestApps/Android/Test-Android/MainActivity.cs +++ b/TestApps/Android/Test-Android/MainActivity.cs @@ -13,14 +13,14 @@ using Android.App; using Android.OS; using Test_Android.Views; -using PlatformBindings; -using PlatformBindings.Activities; using Tests; using Test_Android.Services; -using PlatformBindings.Services; using Tests.Tests; using Tests.TestGenerator; using System.Threading.Tasks; +using PlatformBindings; +using PlatformBindings.Activities; +using PlatformBindings.Services; using PlatformBindings.Common; namespace Test_Android @@ -28,7 +28,10 @@ namespace Test_Android [Activity(Label = "Platform Bindings Test App", MainLauncher = true, Icon = "@drawable/icon")] public class MainActivity : PlatformBindingActivity { - public static AndroidAppServices Services { get; private set; } = new AndroidAppServices(true); + public MainActivity() + { + PlatformBindingsBootstrapper.Initialise(true); + } protected override void OnCreate(Bundle bundle) { diff --git a/TestApps/Android/Test-Android/Test-Android.csproj b/TestApps/Android/Test-Android/Test-Android.csproj index 240ea1c..439f241 100644 --- a/TestApps/Android/Test-Android/Test-Android.csproj +++ b/TestApps/Android/Test-Android/Test-Android.csproj @@ -83,14 +83,14 @@ - - {35cde811-8ca7-4041-af2b-0dc0606a27dd} - PlatformBindings-Android - {49819b4e-2d4e-4fab-ba80-4dd2fb2081cf} PlatformBindings-Core + + {968bafa2-8cbc-42bc-beb4-6f537e9d272e} + PlatformBindings-Platform + {d75853e5-f084-4d29-bb6f-26c14ca16f64} Tests-Universal diff --git a/TestApps/Android/Test-Android/Views/TestViewer.cs b/TestApps/Android/Test-Android/Views/TestViewer.cs index 9b5b868..7f76c3f 100644 --- a/TestApps/Android/Test-Android/Views/TestViewer.cs +++ b/TestApps/Android/Test-Android/Views/TestViewer.cs @@ -13,11 +13,11 @@ using System; using Android.App; using Android.OS; -using PlatformBindings.Activities; using Tests.Tests; using Tests; using Test_Android.Services; using PlatformBindings; +using PlatformBindings.Activities; namespace Test_Android.Views { diff --git a/TestApps/NETCore/Program.cs b/TestApps/NETCore/Program.cs index 8e5a28c..9fd755a 100644 --- a/TestApps/NETCore/Program.cs +++ b/TestApps/NETCore/Program.cs @@ -17,11 +17,10 @@ namespace Test_NETCore { internal class Program { - public static NETCoreServices Services { get; private set; } - private static void Main(string[] args) { - Services = new NETCoreServices(); + PlatformBindingsBootstrapper.Initialise(true); + AppServices.Current.UI.TitleManager.WindowTitle = "Platform Bindings - Console"; Init(); ConsoleHelpers.PreventClose(); diff --git a/TestApps/NETCore/Test-NETCore.csproj b/TestApps/NETCore/Test-NETCore.csproj index 47ea008..42d8958 100644 --- a/TestApps/NETCore/Test-NETCore.csproj +++ b/TestApps/NETCore/Test-NETCore.csproj @@ -6,7 +6,7 @@ - + diff --git a/TestApps/Tests-Universal/Tests-Universal.csproj b/TestApps/Tests-Universal/Tests-Universal.csproj index 064792b..64fa5b7 100644 --- a/TestApps/Tests-Universal/Tests-Universal.csproj +++ b/TestApps/Tests-Universal/Tests-Universal.csproj @@ -13,6 +13,7 @@ + diff --git a/TestApps/UWP/Test-UWP/App.xaml.cs b/TestApps/UWP/Test-UWP/App.xaml.cs index dcc762c..3e304cd 100644 --- a/TestApps/UWP/Test-UWP/App.xaml.cs +++ b/TestApps/UWP/Test-UWP/App.xaml.cs @@ -10,13 +10,13 @@ // THE CODE OR THE USE OR OTHER DEALINGS IN THE CODE. // ****************************************************************** -using PlatformBindings; using System; using Windows.ApplicationModel; using Windows.ApplicationModel.Activation; using Windows.UI.Xaml; using Windows.UI.Xaml.Controls; using Windows.UI.Xaml.Navigation; +using PlatformBindings; namespace Test_UWP { @@ -25,14 +25,14 @@ namespace Test_UWP /// sealed partial class App : Application { - private static UWPAppServices Services = new UWPAppServices(true); - /// /// 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() { + PlatformBindingsBootstrapper.Initialise(true); + this.InitializeComponent(); this.Suspending += OnSuspending; } @@ -52,7 +52,7 @@ protected override void OnLaunched(LaunchActivatedEventArgs e) { // Create a Frame to act as the navigation context and navigate to the first page rootFrame = new Frame(); - Services.AttachDispatcher(rootFrame.Dispatcher); + PlatformBindingsBootstrapper.AttachDispatcher(rootFrame.Dispatcher); rootFrame.NavigationFailed += OnNavigationFailed; if (e.PreviousExecutionState == ApplicationExecutionState.Terminated) diff --git a/TestApps/UWP/Test-UWP/Services/TestUWPNavigator.cs b/TestApps/UWP/Test-UWP/Services/TestUWPNavigator.cs index cfe459c..9367317 100644 --- a/TestApps/UWP/Test-UWP/Services/TestUWPNavigator.cs +++ b/TestApps/UWP/Test-UWP/Services/TestUWPNavigator.cs @@ -14,8 +14,8 @@ using Test_UWP.Views; using Tests; using Windows.UI.Xaml.Controls; -using PlatformBindings.Services; using System.Linq; +using PlatformBindings.Services; namespace Test_UWP.Services { diff --git a/TestApps/UWP/Test-UWP/Test-UWP.csproj b/TestApps/UWP/Test-UWP/Test-UWP.csproj index 72bfd45..8d21d2f 100644 --- a/TestApps/UWP/Test-UWP/Test-UWP.csproj +++ b/TestApps/UWP/Test-UWP/Test-UWP.csproj @@ -136,9 +136,9 @@ {49819b4e-2d4e-4fab-ba80-4dd2fb2081cf} PlatformBindings-Core - - {6fe4fedb-8c95-4cfb-bca7-06104afdceed} - PlatformBindings-UWP + + {968bafa2-8cbc-42bc-beb4-6f537e9d272e} + PlatformBindings-Platform {d75853e5-f084-4d29-bb6f-26c14ca16f64} diff --git a/TestApps/WPF/Test-WPF/Form1.cs b/TestApps/WPF/Test-WPF/Form1.cs index 67fdf23..cd05d78 100644 --- a/TestApps/WPF/Test-WPF/Form1.cs +++ b/TestApps/WPF/Test-WPF/Form1.cs @@ -13,13 +13,6 @@ using PlatformBindings; using PlatformBindings.Models.FileSystem; using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Data; -using System.Drawing; -using System.Linq; -using System.Text; -using System.Threading.Tasks; using System.Windows.Forms; namespace Test_WPF diff --git a/TestApps/WPF/Test-WPF/Program.cs b/TestApps/WPF/Test-WPF/Program.cs index 9848278..5d362f2 100644 --- a/TestApps/WPF/Test-WPF/Program.cs +++ b/TestApps/WPF/Test-WPF/Program.cs @@ -10,12 +10,9 @@ // THE CODE OR THE USE OR OTHER DEALINGS IN THE CODE. // ****************************************************************** -using PlatformBindings; using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; using System.Windows.Forms; +using PlatformBindings; namespace Test_WPF { @@ -27,7 +24,7 @@ internal static class Program [STAThread] private static void Main() { - new Win32AppServices(true); + PlatformBindingsBootstrapper.Initialise(true); Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); diff --git a/TestApps/WPF/Test-WPF/Properties/AssemblyInfo.cs b/TestApps/WPF/Test-WPF/Properties/AssemblyInfo.cs index 8df78cc..776e9f7 100644 --- a/TestApps/WPF/Test-WPF/Properties/AssemblyInfo.cs +++ b/TestApps/WPF/Test-WPF/Properties/AssemblyInfo.cs @@ -11,7 +11,6 @@ // ****************************************************************** using System.Reflection; -using System.Runtime.CompilerServices; using System.Runtime.InteropServices; // General Information about an assembly is controlled through the following diff --git a/TestApps/WPF/Test-WPF/Test-WPF.csproj b/TestApps/WPF/Test-WPF/Test-WPF.csproj index f71706d..21d272b 100644 --- a/TestApps/WPF/Test-WPF/Test-WPF.csproj +++ b/TestApps/WPF/Test-WPF/Test-WPF.csproj @@ -83,9 +83,9 @@ {49819b4e-2d4e-4fab-ba80-4dd2fb2081cf} PlatformBindings-Core - - {ce25568c-58c2-466e-bcfc-92c372d70516} - PlatformBindings-Win32 + + {968bafa2-8cbc-42bc-beb4-6f537e9d272e} + PlatformBindings-Platform diff --git a/TestApps/iOS/Test-iOS/Test-iOS.csproj b/TestApps/iOS/Test-iOS/Test-iOS.csproj index 3ef5b01..3243f7d 100644 --- a/TestApps/iOS/Test-iOS/Test-iOS.csproj +++ b/TestApps/iOS/Test-iOS/Test-iOS.csproj @@ -78,6 +78,10 @@ {49819b4e-2d4e-4fab-ba80-4dd2fb2081cf} PlatformBindings-Core + + {968bafa2-8cbc-42bc-beb4-6f537e9d272e} + PlatformBindings-Platform + \ No newline at end of file diff --git a/UWP/PlatformBindings-UWP.csproj b/UWP/PlatformBindings-UWP.csproj deleted file mode 100644 index 57b9f8a..0000000 --- a/UWP/PlatformBindings-UWP.csproj +++ /dev/null @@ -1,26 +0,0 @@ - - - - uap10.0 - true - PlatformBindings - PlatformBindings-UWP - PlatformBindings-UWP - Universal Windows Platform Head for the .NET Platform Bindings Framework - .NET CrossPlatform UWP PlatformBindings .NETPlatformBindingsFramework .NETPlatformBindings - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/UWP/Properties/PlatformBindings_UWP.rd.xml b/UWP/Properties/PlatformBindings_UWP.rd.xml deleted file mode 100644 index 5664752..0000000 --- a/UWP/Properties/PlatformBindings_UWP.rd.xml +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - diff --git a/Win32/PlatformBindings-Win32.csproj b/Win32/PlatformBindings-Win32.csproj deleted file mode 100644 index 09fb8ee..0000000 --- a/Win32/PlatformBindings-Win32.csproj +++ /dev/null @@ -1,22 +0,0 @@ - - - - net461 - PlatformBindings - - - - - - - - - - - - - - - - - diff --git a/XamarinForms/Models/XamarinUIBindingInfo.cs b/XamarinForms/Models/XamarinUIBindingInfo.cs deleted file mode 100644 index b04cc87..0000000 --- a/XamarinForms/Models/XamarinUIBindingInfo.cs +++ /dev/null @@ -1,44 +0,0 @@ -// ****************************************************************** -// Copyright (c) William Bradley -// This code is licensed under the MIT License (MIT). -// THE CODE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, -// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH -// THE CODE OR THE USE OR OTHER DEALINGS IN THE CODE. -// ****************************************************************** - -using System; -using System.Threading.Tasks; -using Xamarin.Forms; - -namespace PlatformBindings.Models -{ - public class XamarinUIBindingInfo : IUIBindingInfo - { - public XamarinUIBindingInfo(Page Page = null) - { - this.Page = Page; - } - - public async void Execute(Action action) - { - await ExecuteAsync(action); - } - - public async Task ExecuteAsync(Action action) - { - TaskCompletionSource Waiter = new TaskCompletionSource(); - Device.BeginInvokeOnMainThread(() => - { - action(); - Waiter.TrySetResult(true); - }); - await Waiter.Task; - } - - public Page Page { get; set; } - } -} \ No newline at end of file diff --git a/XamarinForms/PlatformBindings-XamarinForms.csproj b/XamarinForms/PlatformBindings-XamarinForms.csproj deleted file mode 100644 index eecc7c9..0000000 --- a/XamarinForms/PlatformBindings-XamarinForms.csproj +++ /dev/null @@ -1,27 +0,0 @@ - - - - netstandard1.4 - $(PackageTargetFallback);portable-net45+win8+wp8+wpa81; - PlatformBindings - PlatformBindings-XamarinForms - William Bradley - Xamarin Forms Head for the .NET Platform Bindings Framework - https://github.com/WilliamABradley/PlatformBindingsFramework - https://github.com/WilliamABradley/PlatformBindingsFramework/blob/master/LICENSE - Copyright © William Bradley 2017 - .NET CrossPlatform UWP Android IOS .NETCore Console Xamarin - - - - - - - - - - - - - - \ No newline at end of file diff --git a/XamarinForms/Services/XamarinUIBindings.cs b/XamarinForms/Services/XamarinUIBindings.cs deleted file mode 100644 index ef614c6..0000000 --- a/XamarinForms/Services/XamarinUIBindings.cs +++ /dev/null @@ -1,75 +0,0 @@ -// ****************************************************************** -// Copyright (c) William Bradley -// This code is licensed under the MIT License (MIT). -// THE CODE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, -// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH -// THE CODE OR THE USE OR OTHER DEALINGS IN THE CODE. -// ****************************************************************** - -using System; -using System.Threading.Tasks; -using PlatformBindings.Enums; -using PlatformBindings.Models; -using Xamarin.Forms; - -namespace PlatformBindings.Services -{ - public class XamarinUIBindings : UIBindings - { - public XamarinUIBindings() : base(Platform.XamarinForms) - { - } - - public override InteractionManager InteractionManager => null; - public override NavigationManager NavigationManager { get; set; } - public override ITitleManager TitleManager { get; set; } - - public override IUIBindingInfo DefaultUIBinding { get; } - - public override void OpenLink(Uri Uri) - { - Device.OpenUri(Uri); - } - - public override async Task PromptUserAsync(string Title, string Message, string PrimaryButtonText, string SecondaryButtonText, IUIBindingInfo UIBinding) - { - var binding = (UIBinding ?? AppServices.Current.UI.DefaultUIBinding) as XamarinUIBindingInfo; - if (binding?.Page == null) throw new Exception("Xamarin UI Unbound"); - - if (!string.IsNullOrWhiteSpace(SecondaryButtonText)) - { - var answer = await binding.Page.DisplayAlert(Title, Message, PrimaryButtonText, SecondaryButtonText); - return answer ? DialogResult.Primary : DialogResult.Secondary; - } - else - { - await binding.Page.DisplayAlert(Title, Message, PrimaryButtonText); - return DialogResult.Primary; - } - } - - public override Task RequestTextFromUserAsync(string Title, string Message, string OKButtonText, string CancelButtonText, IUIBindingInfo UIBinding) - { - throw new NotImplementedException(); - } - - public override void ShowMenu(Controls.MenuLayout.Menu Menu, IMenuBinding Binding) - { - throw new NotImplementedException(); - } - - public override void ShowMenu(Controls.MenuLayout.Menu Menu, object UIElement) - { - throw new NotImplementedException(); - } - - public override void RegisterMenu(Controls.MenuLayout.Menu Menu, object UIElement) - { - throw new NotImplementedException(); - } - } -} \ No newline at end of file diff --git a/_docs/GettingStarted.md b/_docs/GettingStarted.md index ef4f8f5..9d09a1b 100644 --- a/_docs/GettingStarted.md +++ b/_docs/GettingStarted.md @@ -2,13 +2,14 @@ ## Initialisation -In order to be able to use this Framework, you must first Initalise the AppServices Class at your Application's Startup. This must be in your App's Project, as it requires the Project's Platform. +In order to be able to use this Framework, you must first call `PlatformBindingsBootstrapper.Initialise()` at your Application's Startup. This must be inside your App's Project, as it requires the Project's Platform. To see how to Initialise your Platform, see: * [UWP](Platform/UWP/UWPRemarks.md#Getting-Started) * [Android](Platform/Android/AndroidRemarks.md#Getting-Started) -* [Xamarin Forms](Platform/XamarinForms/XamarinFormsRemarks.md) +* [Win32/.NET Framework](Platform/Win32/Win32Remarks.md#Getting-Started) * [NETCore](Platform/NETCore/NETCoreRemarks.md#Getting-Started) +* [Xamarin Forms](Platform/XamarinForms/XamarinFormsRemarks.md) ### Things to be aware of diff --git a/_docs/Platform/Android/AndroidRemarks.md b/_docs/Platform/Android/AndroidRemarks.md index a77a632..f4d7569 100644 --- a/_docs/Platform/Android/AndroidRemarks.md +++ b/_docs/Platform/Android/AndroidRemarks.md @@ -2,28 +2,16 @@ ## Getting Started -To use the Android Platform Library, you must first have the `PlatformBindings-Android` Package installed. - -### Activity Inheritance - -In order to use all of PlatformBindings-Android's Functionality, you must have an Activity that is compatible with the ActivityHandler, this can be achieved multiple ways for different Reasons. - -You can Inherit your Activity from `PlatformBindingActivity`, this is a Super Class of `Activity`, where Overriden methods handoff to the ActivityHandler. - -You can Inherit your Activity from `PlatformBindingCompatActivity`, this is a Super Class of `Android.Support.V7.App.AppCompatActivity`, where Overriden methods handoff to the ActivityHandler. - -If you already have your own Activity Super Class, or you inherit from another library, such as MVVMCross, then you can Override the Required Methods yourself to create your own PlatformBinding Supported Activity. - -See [here](https://github.com/WilliamABradley/PlatformBindingsFramework/blob/master/Android/Activities/PlatformBindingActivity.cs) for an example Implementation of an ActivityHandler handoff, Activtiy Super Class. - -### Initialisation - -In your First Activity, Create the AppServices Class Object either in the Constructor. It **MUST** be Constructed before `base.OnCreate(Bundle)` is called, as that is when Activity Registration begins. +To use the Platform Bindings Framework, you must first have the `PlatformBindings` Package installed. +In your First Activity, Call the Bootstrapper in the Constructor. It **MUST** be Constructed before `base.OnCreate(Bundle)` is called, as that is when Activity Registration begins. ```C# public class MainActivity : PlatformBindingActivity { - public static AndroidAppServices Services { get; private set; } = new AndroidAppServices(true); + public MainActivity() + { + PlatformBindingsBootstrapper.Initialise(true); + } protected override void OnCreate(Bundle bundle) @@ -34,4 +22,16 @@ public class MainActivity : PlatformBindingActivity Finish(); } } -``` \ No newline at end of file +``` + +### Activity Inheritance + +In order to use all of PlatformBindings-Android's Functionality, you must have an Activity that is compatible with the ActivityHandler, this can be achieved multiple ways for different Reasons. + +You can Inherit your Activity from `PlatformBindingActivity`, this is a Super Class of `Activity`, where Overriden methods handoff to the ActivityHandler. + +You can Inherit your Activity from `PlatformBindingCompatActivity`, this is a Super Class of `Android.Support.V7.App.AppCompatActivity`, where Overriden methods handoff to the ActivityHandler. + +If you already have your own Activity Super Class, or you inherit from another library, such as MVVMCross, then you can Override the Required Methods yourself to create your own PlatformBinding Supported Activity. + +See [here](https://github.com/WilliamABradley/PlatformBindingsFramework/blob/master/Android/Activities/PlatformBindingActivity.cs) for an example Implementation of an ActivityHandler handoff, Activtiy Super Class. \ No newline at end of file diff --git a/_docs/Platform/NETCore/NETCoreRemarks.md b/_docs/Platform/NETCore/NETCoreRemarks.md index 058220c..0b0c5d8 100644 --- a/_docs/Platform/NETCore/NETCoreRemarks.md +++ b/_docs/Platform/NETCore/NETCoreRemarks.md @@ -2,17 +2,8 @@ ## Getting Started -To use the NETCore Platform Library, you must first have the `PlatformBindings-NETCore` Package installed. Then Create the AppServices Class Object in your Application's `static void Main(string[] args)` Method. -This can't be created Statically, as any Calls in the Main Method will come before Static Initialisation. +To use the Platform Bindings Framework, you must first have the `PlatformBindings` Package installed. Then call the Bootstrapper in your Application's `static void Main(string[] args)` Method. ```C# -internal class Program -{ - public static NETCoreServices Services { get; private set; } - - private static void Main(string[] args) - { - Services = new NETCoreServices(); - } -} +PlatformBindingsBootstrapper.Initialise(true); ``` \ No newline at end of file diff --git a/_docs/Platform/UWP/UWPRemarks.md b/_docs/Platform/UWP/UWPRemarks.md index 4f5ace8..c802336 100644 --- a/_docs/Platform/UWP/UWPRemarks.md +++ b/_docs/Platform/UWP/UWPRemarks.md @@ -2,10 +2,10 @@ ## Getting Started -To use the UWP Platform Library, you must first have the `PlatformBindings-UWP` Package installed. Then in your Application Class (App.xaml.cs), Create the AppServices Class Object either in the Constructor or Statically. +To use the Platform Bindings Framework, you must first have the `PlatformBindings` Package installed. Then in your Application Class (App.xaml.cs), call the Bootstrapper. ```C# -public static UWPAppServices Services = new UWPAppServices(true); +PlatformBindingsBootstrapper.Initialise(true); ``` Due to UWP's Design, the Dispatcher isn't available yet, so you will need to attach the Dispatcher when it becomes available, such as in the `OnLaunched` Method. @@ -30,7 +30,7 @@ protected override void OnLaunched(LaunchActivatedEventArgs e) { // Create a Frame to act as the navigation context and navigate to the first page rootFrame = new Frame(); - Services.AttachDispatcher(rootFrame.Dispatcher); + PlatformBindingsBootstrapper.AttachDispatcher(rootFrame.Dispatcher); Tests.Preparation.Prepare(); rootFrame.NavigationFailed += OnNavigationFailed; diff --git a/_docs/Platform/Win32/Win32Remarks.md b/_docs/Platform/Win32/Win32Remarks.md new file mode 100644 index 0000000..bc56b0e --- /dev/null +++ b/_docs/Platform/Win32/Win32Remarks.md @@ -0,0 +1,23 @@ +# PlatformBindings-UWP Remarks + +## Getting Started + +To use the Platform Bindings Framework, you must first have the `PlatformBindings` Package installed. Then in your Program Class (Program.cs or equivalent), call the Bootstrapper. + +```C# +internal static class Program +{ + /// + /// The main entry point for the application. + /// + [STAThread] + private static void Main() + { + PlatformBindingsBootstrapper.Initialise(true); + + Application.EnableVisualStyles(); + Application.SetCompatibleTextRenderingDefault(false); + Application.Run(new Form()); + } +} +``` \ No newline at end of file diff --git a/appveyor.yml b/appveyor.yml index 21e1248..5e74d4b 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -10,7 +10,7 @@ nuget: skip_commits: files: - - 'docs/**/*.*' + - '_docs/**/*.*' - 'README.md' init: diff --git a/iOS/PlatformBindings-iOS.csproj b/iOS/PlatformBindings-iOS.csproj deleted file mode 100644 index aaa38e5..0000000 --- a/iOS/PlatformBindings-iOS.csproj +++ /dev/null @@ -1,21 +0,0 @@ - - - - xamarin.ios10 - PlatformBindings - PlatformBindings-iOS - PlatformBindings-iOS - iOS Head for the .NET Platform Bindings Framework - .NET CrossPlatform iOS xamarinios Xamarin.iOS Xamarin PlatformBindings .NETPlatformBindingsFramework .NETPlatformBindings - - - - - - - - - - - - \ No newline at end of file diff --git a/version.json b/version.json index 632d51c..690c880 100644 --- a/version.json +++ b/version.json @@ -1,5 +1,5 @@ { - "version": "0.2.11-alpha", + "version": "0.2.12-alpha", "publicReleaseRefSpec": [ "^refs/heads/master$", // we release out of master "^refs/heads/v\\d+\\.\\d+" // we also release branches starting with vN.N