Skip to content

Code Quality: Move platform-depends classes from Shared to Core #12874

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions Files.sln
Original file line number Diff line number Diff line change
Expand Up @@ -409,16 +409,16 @@ Global
GlobalSection(NestedProjects) = preSolution
{A188C26B-E731-4E0B-9D17-D21CEBD9B43F} = {A74DCE98-A744-4D71-A2B1-7EE4FED0936B}
{9F36C2AD-005D-4EA5-A1F1-6BC42773FC85} = {A74DCE98-A744-4D71-A2B1-7EE4FED0936B}
{94F77692-D47C-48D8-A1A7-645192EF38A4} = {A188C26B-E731-4E0B-9D17-D21CEBD9B43F}
{94F77692-D47C-48D8-A1A7-645192EF38A4} = {9F36C2AD-005D-4EA5-A1F1-6BC42773FC85}
{B8051E11-5BF2-49F7-A7C8-E3820DBB8209} = {A188C26B-E731-4E0B-9D17-D21CEBD9B43F}
{74704E22-9A09-4675-AE35-7896DE81EC4A} = {9F36C2AD-005D-4EA5-A1F1-6BC42773FC85}
{53371D77-7AC1-4975-9A2A-5E0EB0B37CE3} = {9F36C2AD-005D-4EA5-A1F1-6BC42773FC85}
{BB1DA0B0-4E5B-4336-961E-DF389482C094} = {9F36C2AD-005D-4EA5-A1F1-6BC42773FC85}
{BB1DA0B0-4E5B-4336-961E-DF389482C094} = {A188C26B-E731-4E0B-9D17-D21CEBD9B43F}
{4ED01D20-8529-4DEF-8C1B-4E31031AE7E0} = {481DE2EA-E6CE-4A9C-A220-3B543B95AAA1}
{A2FF3F3B-8EBC-4108-B99D-1476B7876656} = {A188C26B-E731-4E0B-9D17-D21CEBD9B43F}
{25FD5045-6D4C-4DD0-B3AC-613AB59CBB07} = {A188C26B-E731-4E0B-9D17-D21CEBD9B43F}
{6F431D82-A5FF-4833-B5E4-702E1E523126} = {A188C26B-E731-4E0B-9D17-D21CEBD9B43F}
{8F60FD8E-1921-47D6-97B0-D26D7B3A4999} = {9F36C2AD-005D-4EA5-A1F1-6BC42773FC85}
{8F60FD8E-1921-47D6-97B0-D26D7B3A4999} = {A188C26B-E731-4E0B-9D17-D21CEBD9B43F}
{6FA07816-DE0A-4D49-84E8-38E953A33C87} = {9F36C2AD-005D-4EA5-A1F1-6BC42773FC85}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
Expand Down
4 changes: 1 addition & 3 deletions src/Files.App/App.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,8 @@
using Files.App.ViewModels.Settings;
using Files.Core.Services.SizeProvider;
using Files.Core.Storage;
using Files.Core.Utils.Cloud;
using Files.Shared;
using Files.Shared.Cloud;
using Files.Shared.Services;
using Files.Shared.Services.DateTimeFormatter;
using Microsoft.AppCenter;
using Microsoft.AppCenter.Analytics;
using Microsoft.AppCenter.Crashes;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// Copyright (c) 2023 Files Community
// Licensed under the MIT License. See the LICENSE.

using Files.Shared.Services.DateTimeFormatter;
using Microsoft.UI.Xaml.Data;

namespace Files.App.Converters
Expand Down
1 change: 0 additions & 1 deletion src/Files.App/Data/Items/ListedItem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
using Files.App.ViewModels.Properties;
using Files.Core.Helpers;
using Files.Core.ViewModels.FileTags;
using Files.Shared.Services.DateTimeFormatter;
using FluentFTP;
using Microsoft.UI;
using Microsoft.UI.Xaml;
Expand Down
1 change: 0 additions & 1 deletion src/Files.App/Data/Models/IStatusCenterActions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
// Licensed under the MIT License. See the LICENSE.

using Files.App.ViewModels;
using Files.Shared.Enums;
using System;
using System.Threading;

Expand Down
4 changes: 1 addition & 3 deletions src/Files.App/Data/Models/ItemViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,7 @@
using Files.App.Helpers.StorageCache;
using Files.App.ViewModels.Previews;
using Files.Core.Services.SizeProvider;
using Files.Shared.Cloud;
using Files.Shared.EventArguments;
using Files.Shared.Services;
using FluentFTP;
using LibGit2Sharp;
using Microsoft.Extensions.Logging;
using Microsoft.UI.Xaml.Data;
Expand Down
1 change: 0 additions & 1 deletion src/Files.App/Dialogs/AddItemDialog.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
using Files.Core.Services;
using Files.Core.ViewModels.Dialogs;
using Files.Core.ViewModels.Dialogs.AddItemDialog;
using Files.Shared.Enums;
using Microsoft.UI.Xaml;
using Microsoft.UI.Xaml.Controls;
using System;
Expand Down
1 change: 0 additions & 1 deletion src/Files.App/Dialogs/CreateShortcutDialog.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@

using Files.App.ViewModels.Dialogs;
using Files.Core.ViewModels.Dialogs;
using Files.Shared.Enums;
using Microsoft.UI.Xaml.Controls;
using Microsoft.UI.Xaml.Data;
using System;
Expand Down
1 change: 0 additions & 1 deletion src/Files.App/Dialogs/DynamicDialog.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@

using Files.App.Helpers;
using Files.App.ViewModels.Dialogs;
using Files.Shared.Enums;
using Microsoft.UI.Xaml.Controls;
using System;
using System.Threading.Tasks;
Expand Down
1 change: 0 additions & 1 deletion src/Files.App/Dialogs/ElevateConfirmDialog.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
// Licensed under the MIT License. See the LICENSE.

using Files.Core.ViewModels.Dialogs;
using Files.Shared.Enums;
using Microsoft.UI.Xaml.Controls;
using System;
using System.Threading.Tasks;
Expand Down
1 change: 0 additions & 1 deletion src/Files.App/Dialogs/FilesystemOperationDialog.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
using Files.App.Utils;
using Files.Core.ViewModels.Dialogs;
using Files.Core.ViewModels.Dialogs.FileSystemDialog;
using Files.Shared.Enums;
using Microsoft.UI.Xaml;
using Microsoft.UI.Xaml.Controls;
using Microsoft.UI.Xaml.Media;
Expand Down
1 change: 0 additions & 1 deletion src/Files.App/Dialogs/ReorderSidebarItemsDialog.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
using Files.App.Extensions;
using Files.App.ViewModels.Dialogs;
using Files.Core.ViewModels.Dialogs;
using Files.Shared.Enums;
using Microsoft.UI.Xaml;
using Microsoft.UI.Xaml.Controls;
using Microsoft.UI.Xaml.Input;
Expand Down
1 change: 0 additions & 1 deletion src/Files.App/Dialogs/SettingsDialog.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@

using Files.App.Views.Settings;
using Files.Core.ViewModels.Dialogs;
using Files.Shared.Enums;
using Microsoft.UI.Xaml;
using Microsoft.UI.Xaml.Controls;
using System;
Expand Down
18 changes: 8 additions & 10 deletions src/Files.App/GlobalUsings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@
global using global::System.Diagnostics;
global using SystemIO = global::System.IO;

// Windows Community Toolkit
// CommunityToolkit.Mvvm
global using global::CommunityToolkit.Mvvm.ComponentModel;
global using global::CommunityToolkit.Mvvm.DependencyInjection;
global using global::CommunityToolkit.Mvvm.Input;
global using global::CommunityToolkit.Mvvm.Messaging;

// Files Front-end
// Files.App
global using global::Files.App.Commands;
global using global::Files.App.Contexts;
global using global::Files.App.Helpers;
Expand Down Expand Up @@ -52,28 +52,26 @@
global using global::Files.App.Views.Shells;

// Files.Core
global using global::Files.Core.CommandLine;
global using global::Files.Core.Data.Enums;
global using global::Files.Core.Data.EventArguments;
global using global::Files.Core.Data.Items;
global using global::Files.Core.Data.Messages;
global using global::Files.Core.Data.Models;
global using global::Files.Core.Extensions;
global using global::Files.Core.Helpers;
global using global::Files.Core.Services;
global using global::Files.Core.Services.DateTimeFormatter;
global using global::Files.Core.Services.Settings;
//global using global::Files.Core.Services.SizeProvider;
global using global::Files.Core.ViewModels;
global using global::Files.Core.ViewModels.Dialogs;
global using global::Files.Core.ViewModels.Dialogs.AddItemDialog;
global using global::Files.Core.ViewModels.Dialogs.FileSystemDialog;
global using global::Files.Core.ViewModels.FileTags;
global using global::Files.Core.ViewModels.Widgets;
global using global::Files.Core.Utils;
global using global::Files.Core.Utils.Cloud;
global using global::Files.Core.Utils.CommandLine;

// Files.Shared
global using global::Files.Shared;
global using global::Files.Shared.Enums;
global using global::Files.Shared.Extensions;

// Files Back-end

// Vanara
//global using global::Vanara.PInvoke;
1 change: 0 additions & 1 deletion src/Files.App/Helpers/Dialog/DialogDisplayHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@

using Files.App.Dialogs;
using Files.App.ViewModels.Dialogs;
using Files.Shared.Enums;
using Microsoft.UI.Xaml.Controls;
using System;
using System.Threading.Tasks;
Expand Down
2 changes: 1 addition & 1 deletion src/Files.App/Helpers/Dialog/DynamicDialogFactory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ public static DynamicDialog GetFor_RenameDialog()
return dialog;
}

public static DynamicDialog GetFor_FileInUseDialog(List<Shared.Win32Process> lockingProcess = null)
public static DynamicDialog GetFor_FileInUseDialog(List<Win32Process> lockingProcess = null)
{
DynamicDialog dialog = new DynamicDialog(new DynamicDialogViewModel()
{
Expand Down
1 change: 0 additions & 1 deletion src/Files.App/Helpers/EnumConversionHelpers.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// Copyright (c) 2023 Files Community
// Licensed under the MIT License. See the LICENSE.

using Files.Shared.Enums;
using Windows.Storage;

namespace Files.App.Helpers
Expand Down
1 change: 0 additions & 1 deletion src/Files.App/Helpers/Navigation/NavigationHelpers.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
using Files.Core.Helpers;
using Files.Core.Services.Settings;
using Files.Shared;
using Files.Shared.Enums;
using Microsoft.Extensions.Logging;
using System;
using System.Collections.Generic;
Expand Down
1 change: 0 additions & 1 deletion src/Files.App/Helpers/PostBannerHelpers.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
using Files.App.Extensions;
using Files.App.Utils;
using Files.App.ViewModels;
using Files.Shared.Enums;
using System.Collections.Generic;
using System.Linq;
using System.Threading;
Expand Down
2 changes: 0 additions & 2 deletions src/Files.App/Helpers/Storage/ErrorCodeConverter.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
// Copyright (c) 2023 Files Community
// Licensed under the MIT License. See the LICENSE.

using Files.Shared.Enums;

namespace Files.App.Helpers
{
public static class ErrorCodeConverter
Expand Down
1 change: 0 additions & 1 deletion src/Files.App/Helpers/Storage/StorageHelpers.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
using Files.App.Utils;
using Files.App.Utils.StorageItems;
using Files.Core.Helpers;
using Files.Shared.Enums;
using System;
using System.Diagnostics;
using System.Runtime.InteropServices;
Expand Down
1 change: 0 additions & 1 deletion src/Files.App/Helpers/Storage/StorageItemIconHelpers.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// Copyright (c) 2023 Files Community
// Licensed under the MIT License. See the LICENSE.

using Files.Shared.Enums;
using System;
using System.Threading.Tasks;
using Windows.Storage;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// Copyright (c) 2023 Files Community
// Licensed under the MIT License. See the LICENSE.

using Files.Shared.Services.DateTimeFormatter;
using Windows.Storage;

namespace Files.App.Helpers
Expand Down
2 changes: 0 additions & 2 deletions src/Files.App/Helpers/StorageItemCollection/SortingHelper.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
// Copyright (c) 2023 Files Community
// Licensed under the MIT License. See the LICENSE.

using Files.App.Utils;
using Files.Shared.Enums;
using System;
using System.Collections.Generic;
using System.Linq;
Expand Down
2 changes: 1 addition & 1 deletion src/Files.App/Helpers/UI/AppSystemBackdrop.cs
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ protected override void OnTargetDisconnected(ICompositionSupportsSystemBackdrop
userSettingsService.OnSettingChangedEvent -= OnSettingChanged;
}

private void OnSettingChanged(object? sender, Shared.EventArguments.SettingChangedEventArgs e)
private void OnSettingChanged(object? sender, SettingChangedEventArgs e)
{
if (target is null)
return;
Expand Down
1 change: 0 additions & 1 deletion src/Files.App/Helpers/UI/JumpListHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@

using CommunityToolkit.Mvvm.DependencyInjection;
using Files.App.UserControls.Widgets;
using Files.Shared.Services;
using Microsoft.Extensions.Logging;
using System;
using System.Threading.Tasks;
Expand Down
1 change: 0 additions & 1 deletion src/Files.App/Helpers/UI/UIHelpers.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
using Files.App.Utils.Shell;
using Files.Core.ViewModels.Dialogs;
using Files.Shared;
using Files.Shared.Enums;
using Microsoft.UI.Xaml.Controls;
using Microsoft.UI.Xaml.Media;
using Microsoft.UI.Xaml.Media.Imaging;
Expand Down
1 change: 1 addition & 0 deletions src/Files.App/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
// Licensed under the MIT License. See the LICENSE.

using Files.App.UserControls.MultitaskingControl;
using Files.Core.Utils.CommandLine;
using Microsoft.UI;
using Microsoft.UI.Windowing;
using Microsoft.UI.Xaml.Controls;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// Copyright (c) 2023 Files Community
// Licensed under the MIT License. See the LICENSE.

using Files.Shared.Services.DateTimeFormatter;
using System.Globalization;
using Windows.Globalization;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
// Copyright (c) 2023 Files Community
// Licensed under the MIT License. See the LICENSE.

using Files.Shared.Enums;
using Files.Shared.Services.DateTimeFormatter;
using System;

namespace Files.App.Services.DateTimeFormatter
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
// Copyright (c) 2023 Files Community
// Licensed under the MIT License. See the LICENSE.

using Files.Shared.EventArguments;
using Files.Shared.Services.DateTimeFormatter;

namespace Files.App.Services.DateTimeFormatter
{
internal class UserDateTimeFormatter : IDateTimeFormatter
Expand Down
1 change: 0 additions & 1 deletion src/Files.App/Services/DialogService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
using Files.Core.ViewModels.Dialogs;
using Files.Core.ViewModels.Dialogs.AddItemDialog;
using Files.Core.ViewModels.Dialogs.FileSystemDialog;
using Files.Shared.Enums;
using Microsoft.Extensions.Logging;
using Microsoft.UI.Xaml.Controls;
using Windows.Foundation.Metadata;
Expand Down
1 change: 0 additions & 1 deletion src/Files.App/Services/JumpListService.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// Copyright (c) 2023 Files Community
// Licensed under the MIT License. See the LICENSE.

using Files.Shared.Services;
using System.IO;
using Windows.Storage;
using Windows.UI.StartScreen;
Expand Down
1 change: 0 additions & 1 deletion src/Files.App/Services/Settings/AppSettingsService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@

using Files.App.Utils.Serialization;
using Files.Core.Services.Settings;
using Files.Shared.EventArguments;
using Microsoft.AppCenter.Analytics;

namespace Files.App.Services.Settings
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@

using Files.App.Utils.Serialization;
using Files.Core.Services.Settings;
using Files.Shared.EventArguments;
using Microsoft.AppCenter.Analytics;
using Microsoft.UI.Composition.SystemBackdrops;
using System;
Expand Down
2 changes: 0 additions & 2 deletions src/Files.App/Services/Settings/FoldersSettingsService.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
// Copyright (c) 2023 Files Community
// Licensed under the MIT License. See the LICENSE.

using Files.App.Utils.Serialization;
using Files.Shared.EventArguments;
using Microsoft.AppCenter.Analytics;

namespace Files.App.Services.Settings
Expand Down
2 changes: 0 additions & 2 deletions src/Files.App/Services/Settings/GeneralSettingsService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@

using Files.App.Utils.Serialization;
using Files.Core.Services.Settings;
using Files.Shared.Enums;
using Files.Shared.EventArguments;
using Microsoft.AppCenter.Analytics;
using System.Collections.Generic;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@

using Files.App.Utils.Serialization;
using Files.Core.Services.Settings;
using Files.Shared.EventArguments;
using Microsoft.AppCenter.Analytics;
using System;

Expand Down
1 change: 0 additions & 1 deletion src/Files.App/Services/Settings/UserSettingsService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
using Files.App.Utils.Serialization;
using Files.App.Utils.Serialization.Implementation;
using Files.Core.Services.Settings;
using Files.Shared.EventArguments;
using Files.Shared.Extensions;
using System.Collections.Generic;
using System.IO;
Expand Down
3 changes: 0 additions & 3 deletions src/Files.App/UserControls/DataGridHeader.xaml.cs
Original file line number Diff line number Diff line change
@@ -1,15 +1,12 @@
// Copyright (c) 2023 Files Community
// Licensed under the MIT License. See the LICENSE.

using Files.Shared.Enums;
using Microsoft.UI.Xaml;
using Microsoft.UI.Xaml.Controls;
using System.ComponentModel;
using System.Runtime.CompilerServices;
using System.Windows.Input;

// Il modello di elemento Controllo utente è documentato all'indirizzo https://go.microsoft.com/fwlink/?LinkId=234236

namespace Files.App.UserControls
{
public sealed partial class DataGridHeader : UserControl, INotifyPropertyChanged
Expand Down
Loading