From a0dd9d161fea4c66883fa124585be802116bd4a3 Mon Sep 17 00:00:00 2001 From: Clint Rutkas Date: Thu, 29 Aug 2024 12:34:46 -0700 Subject: [PATCH] Dev/crutkas/name spacepart1 (#5) * updating namespace for common * Adjusting folder structure now so we can do larger move --- src/modules/cmdpal/WindowsCommandPalette.sln | 2 +- .../Contracts/IFileService.cs | 2 +- .../Contracts/ILocalSettingsService.cs | 2 +- .../Extensions/ApplicationExtensions.cs | 4 ++-- .../Extensions/IHostExtensions.cs | 2 +- .../{common => Microsoft.CmdPal.Common}/Helpers/Json.cs | 2 +- .../Helpers/RuntimeHelper.cs | 2 +- .../Microsoft.CmdPal.Common.csproj | 2 +- .../Models/LocalSettingsOptions.cs | 2 +- .../{common => Microsoft.CmdPal.Common}/NativeMethods.txt | 0 .../Services/FileService.cs | 4 ++-- .../{common => Microsoft.CmdPal.Common}/Services/IApp.cs | 2 +- .../Services/LocalSettingsService.cs | 8 ++++---- src/modules/cmdpal/src/WindowsCommandPalette/App.xaml.cs | 8 ++++---- .../cmdpal/src/WindowsCommandPalette/MainWindow.xaml.cs | 4 ++-- .../WindowsCommandPalette/Microsoft.CmdPal.UI.Poc.csproj | 2 +- .../src/WindowsCommandPalette/SettingsActionProvider.cs | 4 ++-- 17 files changed, 26 insertions(+), 26 deletions(-) rename src/modules/cmdpal/src/{common => Microsoft.CmdPal.Common}/Contracts/IFileService.cs (86%) rename src/modules/cmdpal/src/{common => Microsoft.CmdPal.Common}/Contracts/ILocalSettingsService.cs (86%) rename src/modules/cmdpal/src/{common => Microsoft.CmdPal.Common}/Extensions/ApplicationExtensions.cs (93%) rename src/modules/cmdpal/src/{common => Microsoft.CmdPal.Common}/Extensions/IHostExtensions.cs (96%) rename src/modules/cmdpal/src/{common => Microsoft.CmdPal.Common}/Helpers/Json.cs (95%) rename src/modules/cmdpal/src/{common => Microsoft.CmdPal.Common}/Helpers/RuntimeHelper.cs (97%) rename src/modules/cmdpal/src/{common => Microsoft.CmdPal.Common}/Microsoft.CmdPal.Common.csproj (91%) rename src/modules/cmdpal/src/{common => Microsoft.CmdPal.Common}/Models/LocalSettingsOptions.cs (85%) rename src/modules/cmdpal/src/{common => Microsoft.CmdPal.Common}/NativeMethods.txt (100%) rename src/modules/cmdpal/src/{common => Microsoft.CmdPal.Common}/Services/FileService.cs (93%) rename src/modules/cmdpal/src/{common => Microsoft.CmdPal.Common}/Services/IApp.cs (90%) rename src/modules/cmdpal/src/{common => Microsoft.CmdPal.Common}/Services/LocalSettingsService.cs (95%) diff --git a/src/modules/cmdpal/WindowsCommandPalette.sln b/src/modules/cmdpal/WindowsCommandPalette.sln index 45951d28d4..de9b6cf693 100644 --- a/src/modules/cmdpal/WindowsCommandPalette.sln +++ b/src/modules/cmdpal/WindowsCommandPalette.sln @@ -18,7 +18,7 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Microsoft.Windows.CommandPa EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.CmdPal.Extensions.Helpers", "extensionsdk\Microsoft.Windows.CommandPalette.Extensions.Helpers\Microsoft.CmdPal.Extensions.Helpers.csproj", "{79060D06-7174-4D66-8D0B-4FF021154049}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.CmdPal.Common", "src\common\Microsoft.CmdPal.Common.csproj", "{05CDE6EE-23AE-42AF-A9F5-E398C382675F}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.CmdPal.Common", "src\Microsoft.CmdPal.Common\Microsoft.CmdPal.Common.csproj", "{05CDE6EE-23AE-42AF-A9F5-E398C382675F}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution diff --git a/src/modules/cmdpal/src/common/Contracts/IFileService.cs b/src/modules/cmdpal/src/Microsoft.CmdPal.Common/Contracts/IFileService.cs similarity index 86% rename from src/modules/cmdpal/src/common/Contracts/IFileService.cs rename to src/modules/cmdpal/src/Microsoft.CmdPal.Common/Contracts/IFileService.cs index b5a1b75097..6b71ed8957 100644 --- a/src/modules/cmdpal/src/common/Contracts/IFileService.cs +++ b/src/modules/cmdpal/src/Microsoft.CmdPal.Common/Contracts/IFileService.cs @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -namespace CmdPal.Common.Contracts; +namespace Microsoft.CmdPal.Common.Contracts; public interface IFileService { diff --git a/src/modules/cmdpal/src/common/Contracts/ILocalSettingsService.cs b/src/modules/cmdpal/src/Microsoft.CmdPal.Common/Contracts/ILocalSettingsService.cs similarity index 86% rename from src/modules/cmdpal/src/common/Contracts/ILocalSettingsService.cs rename to src/modules/cmdpal/src/Microsoft.CmdPal.Common/Contracts/ILocalSettingsService.cs index 25cecde878..833d28cf7f 100644 --- a/src/modules/cmdpal/src/common/Contracts/ILocalSettingsService.cs +++ b/src/modules/cmdpal/src/Microsoft.CmdPal.Common/Contracts/ILocalSettingsService.cs @@ -3,7 +3,7 @@ using System.Threading.Tasks; -namespace CmdPal.Common.Contracts; +namespace Microsoft.CmdPal.Common.Contracts; public interface ILocalSettingsService { diff --git a/src/modules/cmdpal/src/common/Extensions/ApplicationExtensions.cs b/src/modules/cmdpal/src/Microsoft.CmdPal.Common/Extensions/ApplicationExtensions.cs similarity index 93% rename from src/modules/cmdpal/src/common/Extensions/ApplicationExtensions.cs rename to src/modules/cmdpal/src/Microsoft.CmdPal.Common/Extensions/ApplicationExtensions.cs index f678c2685f..2242a94b4e 100644 --- a/src/modules/cmdpal/src/common/Extensions/ApplicationExtensions.cs +++ b/src/modules/cmdpal/src/Microsoft.CmdPal.Common/Extensions/ApplicationExtensions.cs @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -using CmdPal.Common.Services; +using Microsoft.CmdPal.Common.Services; using Microsoft.UI.Xaml; -namespace CmdPal.Common.Extensions; +namespace Microsoft.CmdPal.Common.Extensions; /// /// Extension class implementing extension methods for . diff --git a/src/modules/cmdpal/src/common/Extensions/IHostExtensions.cs b/src/modules/cmdpal/src/Microsoft.CmdPal.Common/Extensions/IHostExtensions.cs similarity index 96% rename from src/modules/cmdpal/src/common/Extensions/IHostExtensions.cs rename to src/modules/cmdpal/src/Microsoft.CmdPal.Common/Extensions/IHostExtensions.cs index c0d51cf18b..1b4ee136c1 100644 --- a/src/modules/cmdpal/src/common/Extensions/IHostExtensions.cs +++ b/src/modules/cmdpal/src/Microsoft.CmdPal.Common/Extensions/IHostExtensions.cs @@ -5,7 +5,7 @@ using System; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Hosting; -namespace CmdPal.Common.Extensions; +namespace Microsoft.CmdPal.Common.Extensions; public static class IHostExtensions { diff --git a/src/modules/cmdpal/src/common/Helpers/Json.cs b/src/modules/cmdpal/src/Microsoft.CmdPal.Common/Helpers/Json.cs similarity index 95% rename from src/modules/cmdpal/src/common/Helpers/Json.cs rename to src/modules/cmdpal/src/Microsoft.CmdPal.Common/Helpers/Json.cs index b72b51e10d..86d241b19a 100644 --- a/src/modules/cmdpal/src/common/Helpers/Json.cs +++ b/src/modules/cmdpal/src/Microsoft.CmdPal.Common/Helpers/Json.cs @@ -6,7 +6,7 @@ using System.Text; using System.Text.Json; using System.Threading.Tasks; -namespace CmdPal.Common.Helpers; +namespace Microsoft.CmdPal.Common.Helpers; public static class Json { diff --git a/src/modules/cmdpal/src/common/Helpers/RuntimeHelper.cs b/src/modules/cmdpal/src/Microsoft.CmdPal.Common/Helpers/RuntimeHelper.cs similarity index 97% rename from src/modules/cmdpal/src/common/Helpers/RuntimeHelper.cs rename to src/modules/cmdpal/src/Microsoft.CmdPal.Common/Helpers/RuntimeHelper.cs index d9adc0cb12..32668439a5 100644 --- a/src/modules/cmdpal/src/common/Helpers/RuntimeHelper.cs +++ b/src/modules/cmdpal/src/Microsoft.CmdPal.Common/Helpers/RuntimeHelper.cs @@ -6,7 +6,7 @@ using System.Security.Principal; using Windows.Win32; using Windows.Win32.Foundation; -namespace CmdPal.Common.Helpers; +namespace Microsoft.CmdPal.Common.Helpers; public static class RuntimeHelper { diff --git a/src/modules/cmdpal/src/common/Microsoft.CmdPal.Common.csproj b/src/modules/cmdpal/src/Microsoft.CmdPal.Common/Microsoft.CmdPal.Common.csproj similarity index 91% rename from src/modules/cmdpal/src/common/Microsoft.CmdPal.Common.csproj rename to src/modules/cmdpal/src/Microsoft.CmdPal.Common/Microsoft.CmdPal.Common.csproj index b3cacd265d..75dd1b6396 100644 --- a/src/modules/cmdpal/src/common/Microsoft.CmdPal.Common.csproj +++ b/src/modules/cmdpal/src/Microsoft.CmdPal.Common/Microsoft.CmdPal.Common.csproj @@ -1,7 +1,7 @@ - CmdPal.Common + Microsoft.CmdPal.Common enable true diff --git a/src/modules/cmdpal/src/common/Models/LocalSettingsOptions.cs b/src/modules/cmdpal/src/Microsoft.CmdPal.Common/Models/LocalSettingsOptions.cs similarity index 85% rename from src/modules/cmdpal/src/common/Models/LocalSettingsOptions.cs rename to src/modules/cmdpal/src/Microsoft.CmdPal.Common/Models/LocalSettingsOptions.cs index 66f3b452b8..c561530151 100644 --- a/src/modules/cmdpal/src/common/Models/LocalSettingsOptions.cs +++ b/src/modules/cmdpal/src/Microsoft.CmdPal.Common/Models/LocalSettingsOptions.cs @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -namespace CmdPal.Common.Models; +namespace Microsoft.CmdPal.Common.Models; public class LocalSettingsOptions { diff --git a/src/modules/cmdpal/src/common/NativeMethods.txt b/src/modules/cmdpal/src/Microsoft.CmdPal.Common/NativeMethods.txt similarity index 100% rename from src/modules/cmdpal/src/common/NativeMethods.txt rename to src/modules/cmdpal/src/Microsoft.CmdPal.Common/NativeMethods.txt diff --git a/src/modules/cmdpal/src/common/Services/FileService.cs b/src/modules/cmdpal/src/Microsoft.CmdPal.Common/Services/FileService.cs similarity index 93% rename from src/modules/cmdpal/src/common/Services/FileService.cs rename to src/modules/cmdpal/src/Microsoft.CmdPal.Common/Services/FileService.cs index 91aa79c879..d839d04205 100644 --- a/src/modules/cmdpal/src/common/Services/FileService.cs +++ b/src/modules/cmdpal/src/Microsoft.CmdPal.Common/Services/FileService.cs @@ -4,9 +4,9 @@ using System.IO; using System.Text; using System.Text.Json; -using CmdPal.Common.Contracts; +using Microsoft.CmdPal.Common.Contracts; -namespace CmdPal.Common.Services; +namespace Microsoft.CmdPal.Common.Services; public class FileService : IFileService { diff --git a/src/modules/cmdpal/src/common/Services/IApp.cs b/src/modules/cmdpal/src/Microsoft.CmdPal.Common/Services/IApp.cs similarity index 90% rename from src/modules/cmdpal/src/common/Services/IApp.cs rename to src/modules/cmdpal/src/Microsoft.CmdPal.Common/Services/IApp.cs index 5c43d638ed..93d66bf86e 100644 --- a/src/modules/cmdpal/src/common/Services/IApp.cs +++ b/src/modules/cmdpal/src/Microsoft.CmdPal.Common/Services/IApp.cs @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -namespace CmdPal.Common.Services; +namespace Microsoft.CmdPal.Common.Services; /// /// Interface for the current application singleton object exposing the API diff --git a/src/modules/cmdpal/src/common/Services/LocalSettingsService.cs b/src/modules/cmdpal/src/Microsoft.CmdPal.Common/Services/LocalSettingsService.cs similarity index 95% rename from src/modules/cmdpal/src/common/Services/LocalSettingsService.cs rename to src/modules/cmdpal/src/Microsoft.CmdPal.Common/Services/LocalSettingsService.cs index 4b284f2bbc..f58ad92274 100644 --- a/src/modules/cmdpal/src/common/Services/LocalSettingsService.cs +++ b/src/modules/cmdpal/src/Microsoft.CmdPal.Common/Services/LocalSettingsService.cs @@ -5,13 +5,13 @@ using System; using System.Collections.Generic; using System.IO; using System.Threading.Tasks; -using CmdPal.Common.Contracts; -using CmdPal.Common.Helpers; -using CmdPal.Common.Models; +using Microsoft.CmdPal.Common.Contracts; +using Microsoft.CmdPal.Common.Helpers; +using Microsoft.CmdPal.Common.Models; using Microsoft.Extensions.Options; using Windows.Storage; -namespace CmdPal.Common.Services; +namespace Microsoft.CmdPal.Common.Services; public class LocalSettingsService : ILocalSettingsService { diff --git a/src/modules/cmdpal/src/WindowsCommandPalette/App.xaml.cs b/src/modules/cmdpal/src/WindowsCommandPalette/App.xaml.cs index af3b602550..d058e37f55 100644 --- a/src/modules/cmdpal/src/WindowsCommandPalette/App.xaml.cs +++ b/src/modules/cmdpal/src/WindowsCommandPalette/App.xaml.cs @@ -6,12 +6,12 @@ using System.Collections.Generic; using System.IO; using System.Linq; using System.Runtime.InteropServices.WindowsRuntime; -using CmdPal.Common.Contracts; -using CmdPal.Common.Models; -using CmdPal.Common.Services; +using Microsoft.CmdPal.Common.Contracts; +using Microsoft.CmdPal.Common.Models; +using Microsoft.CmdPal.Common.Services; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Hosting; -using CmdPal.Common.Extensions; +using Microsoft.CmdPal.Common.Extensions; using Microsoft.UI.Xaml; using Microsoft.UI.Xaml.Controls; diff --git a/src/modules/cmdpal/src/WindowsCommandPalette/MainWindow.xaml.cs b/src/modules/cmdpal/src/WindowsCommandPalette/MainWindow.xaml.cs index abcecff9a3..b17500af47 100644 --- a/src/modules/cmdpal/src/WindowsCommandPalette/MainWindow.xaml.cs +++ b/src/modules/cmdpal/src/WindowsCommandPalette/MainWindow.xaml.cs @@ -11,8 +11,8 @@ using System.Runtime.InteropServices; using Windows.Win32.Foundation; using Microsoft.Win32; using Windows.Graphics; -using CmdPal.Common.Contracts; -using CmdPal.Common.Extensions; +using Microsoft.CmdPal.Common.Contracts; +using Microsoft.CmdPal.Common.Extensions; using System.Text.RegularExpressions; using Windows.System; using Windows.Win32.UI.WindowsAndMessaging; diff --git a/src/modules/cmdpal/src/WindowsCommandPalette/Microsoft.CmdPal.UI.Poc.csproj b/src/modules/cmdpal/src/WindowsCommandPalette/Microsoft.CmdPal.UI.Poc.csproj index 5276569d0e..5427d67d1f 100644 --- a/src/modules/cmdpal/src/WindowsCommandPalette/Microsoft.CmdPal.UI.Poc.csproj +++ b/src/modules/cmdpal/src/WindowsCommandPalette/Microsoft.CmdPal.UI.Poc.csproj @@ -70,7 +70,7 @@ - + True True diff --git a/src/modules/cmdpal/src/WindowsCommandPalette/SettingsActionProvider.cs b/src/modules/cmdpal/src/WindowsCommandPalette/SettingsActionProvider.cs index 0190edc2ab..07c5b4bcbb 100644 --- a/src/modules/cmdpal/src/WindowsCommandPalette/SettingsActionProvider.cs +++ b/src/modules/cmdpal/src/WindowsCommandPalette/SettingsActionProvider.cs @@ -5,8 +5,8 @@ using Microsoft.Windows.CommandPalette.Extensions; using Microsoft.Windows.CommandPalette.Extensions.Helpers; using System.Text.Json.Nodes; using Microsoft.UI.Xaml; -using CmdPal.Common.Contracts; -using CmdPal.Common.Extensions; +using Microsoft.CmdPal.Common.Contracts; +using Microsoft.CmdPal.Common.Extensions; // To learn more about WinUI, the WinUI project structure, // and more about our project templates, see: http://aka.ms/winui-project-info.