Skip to content

Commit

Permalink
🎨 Format C#
Browse files Browse the repository at this point in the history
(built and tested using Visual Studio Batch Build)
Unfortunately some organised import statements were lost, see comment for more info.
  • Loading branch information
Lamparter committed Sep 4, 2024
1 parent 2309318 commit d8b4c22
Show file tree
Hide file tree
Showing 244 changed files with 200 additions and 930 deletions.
10 changes: 2 additions & 8 deletions src/FluentHub.App/App.xaml.cs
Original file line number Diff line number Diff line change
@@ -1,20 +1,14 @@
// Copyright (c) 2022-2024 0x5BFA
// Licensed under the MIT License. See the LICENSE.

using FluentHub.App.Utils;
using FluentHub.App.Services;
using CommunityToolkit.WinUI;
using FluentHub.App.ViewModels;
using Microsoft.Extensions.Hosting;
using Microsoft.UI;
using Microsoft.UI.Xaml;
using Microsoft.UI.Xaml.Navigation;
using Microsoft.UI.Windowing;
using Microsoft.Windows.AppLifecycle;
using Serilog;
using Windows.ApplicationModel;
using Windows.Storage;
using CommunityToolkit.WinUI;
using FluentHub.App.ViewModels.Repositories.Codes;
using Serilog;

namespace FluentHub.App
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
// Copyright (c) 2022-2024 0x5BFA
// Licensed under the MIT License. See the LICENSE.

using Windows.UI;
using Microsoft.UI.Xaml.Data;
using Microsoft.UI.Xaml.Media;
using Windows.UI;

namespace FluentHub.App.Converters
{
Expand Down
1 change: 0 additions & 1 deletion src/FluentHub.App/Converters/ObjectToStringConverter.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// Copyright (c) 2022-2024 0x5BFA
// Licensed under the MIT License. See the LICENSE.

using Microsoft.UI.Xaml;
using Microsoft.UI.Xaml.Data;

namespace FluentHub.App.Converters
Expand Down
2 changes: 1 addition & 1 deletion src/FluentHub.App/Data/Items/NavigationBarItem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ namespace FluentHub.App.Data.Items
{
public class NavigationBarItem
{
public string? Text{ get; set; }
public string? Text { get; set; }

public string? Glyph { get; set; }

Expand Down
6 changes: 0 additions & 6 deletions src/FluentHub.App/Data/Models/CheckRunGroupModel.cs
Original file line number Diff line number Diff line change
@@ -1,12 +1,6 @@
// Copyright (c) 2022-2024 0x5BFA
// Licensed under the MIT License. See the LICENSE.

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace FluentHub.App.Models
{
public class CheckRunGroupModel
Expand Down
6 changes: 0 additions & 6 deletions src/FluentHub.App/Data/Models/CheckRunItemModel.cs
Original file line number Diff line number Diff line change
@@ -1,12 +1,6 @@
// Copyright (c) 2022-2024 0x5BFA
// Licensed under the MIT License. See the LICENSE.

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace FluentHub.App.Models
{
public class CheckRunItemModel
Expand Down
2 changes: 0 additions & 2 deletions src/FluentHub.App/Dialogs/AccountSwitching.xaml.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
// Copyright (c) 2022-2024 0x5BFA
// Licensed under the MIT License. See the LICENSE.

using FluentHub.App.Services;
using FluentHub.App.ViewModels.Dialogs;
using Microsoft.UI.Xaml;
using Microsoft.UI.Xaml.Controls;

Expand Down
13 changes: 0 additions & 13 deletions src/FluentHub.App/Dialogs/CreateNewRepositoryDialog.xaml.cs
Original file line number Diff line number Diff line change
@@ -1,20 +1,7 @@
// Copyright (c) 2022-2024 0x5BFA
// Licensed under the MIT License. See the LICENSE.

using Microsoft.UI.Xaml;
using Microsoft.UI.Xaml.Controls;
using Microsoft.UI.Xaml.Controls.Primitives;
using Microsoft.UI.Xaml.Data;
using Microsoft.UI.Xaml.Input;
using Microsoft.UI.Xaml.Media;
using Microsoft.UI.Xaml.Navigation;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Runtime.InteropServices.WindowsRuntime;
using Windows.Foundation;
using Windows.Foundation.Collections;

namespace FluentHub.App.Dialogs
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
// Copyright (c) 2022-2024 0x5BFA
// Licensed under the MIT License. See the LICENSE.

using FluentHub.App.Services;
using FluentHub.App.ViewModels.Dialogs;
using Microsoft.UI.Xaml;
using Microsoft.UI.Xaml.Controls;

namespace FluentHub.App.Dialogs
Expand Down
2 changes: 0 additions & 2 deletions src/FluentHub.App/Dialogs/EditUserProfileDialog.xaml.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
// Copyright (c) 2022-2024 0x5BFA
// Licensed under the MIT License. See the LICENSE.

using FluentHub.App.Services;
using FluentHub.App.ViewModels.Dialogs;
using Microsoft.UI.Xaml;
using Microsoft.UI.Xaml.Controls;

namespace FluentHub.App.Dialogs
Expand Down
3 changes: 0 additions & 3 deletions src/FluentHub.App/Dialogs/ExceptionStackTraceDialog.xaml.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
// Copyright (c) 2022-2024 0x5BFA
// Licensed under the MIT License. See the LICENSE.

using FluentHub.App.Services;
using FluentHub.App.ViewModels.Dialogs;
using Microsoft.UI.Xaml;
using Microsoft.UI.Xaml.Controls;

namespace FluentHub.App.Dialogs
Expand Down
1 change: 0 additions & 1 deletion src/FluentHub.App/Extensions/EnumExtensions.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
using System;
using System.Reflection;

namespace FluentHub.App.Extensions
Expand Down
8 changes: 1 addition & 7 deletions src/FluentHub.App/Extensions/LinqExtensions.cs
Original file line number Diff line number Diff line change
@@ -1,10 +1,4 @@
using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;

namespace FluentHub.App.Extensions
namespace FluentHub.App.Extensions
{
public static class LinqExtensions
{
Expand Down
3 changes: 0 additions & 3 deletions src/FluentHub.App/Extensions/StringExtensions.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
using Microsoft.Windows.ApplicationModel.Resources;
using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.IO;

namespace FluentHub.App.Extensions
{
Expand Down
24 changes: 10 additions & 14 deletions src/FluentHub.App/GlobalUsings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,11 @@
// Licensed under the MIT License. See the LICENSE.

// Default
global using global::System;
global using global::System.Collections.Generic;
global using global::System.Collections.ObjectModel;
global using global::System.Linq;
global using global::System.Text;
global using global::System.Threading;
global using global::System.Threading.Tasks;

// Generic
global using global::Microsoft.Extensions.DependencyInjection;

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

// FluentHub
global using global::FluentHub.App.Data.EventArgs;
global using global::FluentHub.App.Data.Factories;
Expand All @@ -30,8 +18,16 @@
global using global::FluentHub.Core.Data.Enums;
global using global::FluentHub.Octokit.Models.v3;
global using global::FluentHub.Octokit.Models.v4;

global using global::Humanizer;
// Generic
global using global::Microsoft.Extensions.DependencyInjection;
// Third-party
global using global::Octokit.GraphQL;
global using global::System;
global using global::System.Collections.Generic;
global using global::System.Collections.ObjectModel;
global using global::System.Linq;
global using global::System.Text;
global using global::System.Threading;
global using global::System.Threading.Tasks;
global using OctokitOriginal = global::Octokit;
global using global::Humanizer;
7 changes: 1 addition & 6 deletions src/FluentHub.App/Helpers/AppLifecycleHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,11 @@
// Licensed under the MIT License. See the LICENSE.

using FluentHub.App.Utils;
using FluentHub.App.Services;
using FluentHub.App.ViewModels;
using Microsoft.Extensions.Hosting;
using Microsoft.UI;
using Microsoft.UI.Xaml;
using Microsoft.UI.Xaml.Navigation;
using Microsoft.UI.Windowing;
using Microsoft.Windows.AppLifecycle;
using Windows.ApplicationModel;
using Windows.Storage;
using Microsoft.UI.Xaml;
using Serilog;

namespace FluentHub.App.Helpers
Expand Down
8 changes: 1 addition & 7 deletions src/FluentHub.App/Helpers/DateTimeDurationHelpers.cs
Original file line number Diff line number Diff line change
@@ -1,10 +1,4 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace FluentHub.App.Helpers
namespace FluentHub.App.Helpers
{
public static class DateTimeDurationHelpers
{
Expand Down
6 changes: 0 additions & 6 deletions src/FluentHub.App/Helpers/ExternalResourcesHelpers.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
using FluentHub.App.Models;
using System.Diagnostics;
using Windows.Storage;
using Microsoft.UI.Xaml;
using Microsoft.UI.Xaml.Markup;

namespace FluentHub.App.Helpers
{
// TODO: Not supported helpers
Expand Down
9 changes: 0 additions & 9 deletions src/FluentHub.App/Helpers/MentionHelpers.cs
Original file line number Diff line number Diff line change
@@ -1,12 +1,3 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Windows.UI.Text;
using Microsoft.UI.Xaml.Controls;
using Microsoft.UI.Xaml.Documents;

namespace FluentHub.App.Helpers
{
// TODO: Not supported helpers
Expand Down
6 changes: 1 addition & 5 deletions src/FluentHub.App/Helpers/NativeWinApiHelper.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
using System;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading.Tasks;
using Windows.Foundation.Collections;
using System.Runtime.InteropServices;

namespace FluentHub.App.Helpers
{
Expand Down
2 changes: 1 addition & 1 deletion src/FluentHub.App/Helpers/ResourceHelpers.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
using Windows.ApplicationModel.Resources;
using Microsoft.UI.Xaml.Markup;
using Windows.ApplicationModel.Resources;

namespace FluentHub.App.Helpers
{
Expand Down
6 changes: 2 additions & 4 deletions src/FluentHub.App/Helpers/ThemeHelpers.cs
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
using CommunityToolkit.WinUI;
using FluentHub.App.Extensions;
using System;
using Windows.UI;
using Microsoft.UI.Dispatching;
using Microsoft.UI;
using Microsoft.UI.Windowing;
using Microsoft.UI.Xaml;
using Windows.Storage;
using Windows.UI;
using Windows.UI.ViewManagement;
using Microsoft.UI;

namespace FluentHub.App.Helpers
{
Expand Down
1 change: 0 additions & 1 deletion src/FluentHub.App/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// Copyright (c) 2022-2024 0x5BFA
// Licensed under the MIT License. See the LICENSE.

using FluentHub.App.Models;
using FluentHub.App.ViewModels.SignIn;
using Microsoft.UI;
using Microsoft.UI.Windowing;
Expand Down
1 change: 0 additions & 1 deletion src/FluentHub.App/Program.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 FluentHub.App.Extensions;
using FluentHub.App.Helpers;
using Microsoft.UI.Dispatching;
using Microsoft.UI.Xaml;
using Microsoft.Windows.AppLifecycle;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
using FluentHub.App.Models;
using FluentHub.App.Services;
using FluentHub.App.ViewModels.UserControls.BlockButtons;
using Microsoft.UI.Xaml;
using Microsoft.UI.Xaml.Controls;

namespace FluentHub.App.UserControls.BlockButtons
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
using FluentHub.App.Models;
using FluentHub.App.Services;
using FluentHub.App.ViewModels.UserControls.BlockButtons;
using Microsoft.UI.Xaml;
using Microsoft.UI.Xaml.Controls;
using Microsoft.UI.Xaml.Controls.Primitives;

namespace FluentHub.App.UserControls.BlockButtons
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
using FluentHub.App.Models;
using FluentHub.App.Services;
using FluentHub.App.ViewModels.UserControls.BlockButtons;
using Microsoft.UI.Xaml;
using Microsoft.UI.Xaml.Controls;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
using FluentHub.App.Models;
using FluentHub.App.Services;
using FluentHub.App.ViewModels.UserControls.BlockButtons;
using Microsoft.UI.Xaml;
using Microsoft.UI.Xaml.Controls;
Expand All @@ -24,7 +22,7 @@ public IssueBlockButtonViewModel ViewModel
ViewModel?.LoadContents();
}
}

public IssueBlockButton()
{
InitializeComponent();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
using FluentHub.App.Models;
using FluentHub.App.Services;
using FluentHub.App.ViewModels.UserControls.BlockButtons;
using Microsoft.UI.Xaml;
using Microsoft.UI.Xaml.Controls;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
using FluentHub.App.Models;
using FluentHub.App.Services;
using FluentHub.App.ViewModels.UserControls.BlockButtons;
using Microsoft.UI.Xaml;
using Microsoft.UI.Xaml.Controls;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
using FluentHub.App.Models;
using FluentHub.App.Services;
using FluentHub.App.ViewModels.UserControls.BlockButtons;
using Microsoft.UI.Xaml;
using Microsoft.UI.Xaml.Controls;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
using FluentHub.App.Models;
using FluentHub.App.Services;
using FluentHub.App.ViewModels.UserControls.BlockButtons;
using Microsoft.UI.Xaml;
using Microsoft.UI.Xaml.Controls;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
using FluentHub.App.Models;
using FluentHub.App.Services;
using FluentHub.App.ViewModels.UserControls.BlockButtons;
using Microsoft.UI.Xaml;
using Microsoft.UI.Xaml.Controls;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
using FluentHub.App.Models;
using FluentHub.App.Services;
using FluentHub.App.ViewModels.UserControls.BlockButtons;
using Microsoft.UI.Xaml;
using Microsoft.UI.Xaml.Controls;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
using FluentHub.App.Models;
using FluentHub.App.Services;
using FluentHub.App.ViewModels.UserControls.BlockButtons;
using Microsoft.UI.Xaml;
using Microsoft.UI.Xaml.Controls;
Expand Down
3 changes: 0 additions & 3 deletions src/FluentHub.App/UserControls/BranchName.xaml.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
using FluentHub.App.Models;
using FluentHub.App.Services;
using FluentHub.App.ViewModels.UserControls;
using Microsoft.UI.Xaml;
using Microsoft.UI.Xaml.Controls;

Expand Down
Loading

0 comments on commit d8b4c22

Please sign in to comment.