Skip to content

Commit

Permalink
Consolidation - global usings
Browse files Browse the repository at this point in the history
  • Loading branch information
pizzaboxer committed Jul 15, 2023
1 parent 77725ea commit 282d4c6
Show file tree
Hide file tree
Showing 72 changed files with 116 additions and 384 deletions.
20 changes: 1 addition & 19 deletions Bloxstrap/App.xaml.cs
Original file line number Diff line number Diff line change
@@ -1,34 +1,16 @@
using System;
using System.Diagnostics;
using System.Globalization;
using System.IO;
using System.Linq;
using System.Net.Http;
using System.Net;
using System.Reflection;
using System.Threading;
using System.Threading.Tasks;
using System.Reflection;
using System.Windows;
using System.Windows.Threading;

using Microsoft.Win32;

using Bloxstrap.Enums;
using Bloxstrap.Extensions;
using Bloxstrap.Models;
using Bloxstrap.Models.Attributes;
using Bloxstrap.UI;
using Bloxstrap.Utility;

namespace Bloxstrap
{
/// <summary>
/// Interaction logic for App.xaml
/// </summary>
public partial class App : Application
{
public static readonly CultureInfo CultureFormat = CultureInfo.InvariantCulture;

public const string ProjectName = "Bloxstrap";
public const string ProjectRepository = "pizzaboxer/bloxstrap";
public const string RobloxAppName = "RobloxPlayerBeta";
Expand Down
17 changes: 1 addition & 16 deletions Bloxstrap/Bootstrapper.cs
Original file line number Diff line number Diff line change
@@ -1,24 +1,9 @@
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.IO.Compression;
using System.Linq;
using System.Net.Http;
using System.Text.Json;
using System.Threading;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Forms;
using System.Windows;

using Microsoft.Win32;

using Bloxstrap.Enums;
using Bloxstrap.Extensions;
using Bloxstrap.Integrations;
using Bloxstrap.Models;
using Bloxstrap.Tools;
using Bloxstrap.UI;

namespace Bloxstrap
{
Expand Down
5 changes: 1 addition & 4 deletions Bloxstrap/Directories.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
using System;
using System.IO;

namespace Bloxstrap
namespace Bloxstrap
{
static class Directories
{
Expand Down
5 changes: 1 addition & 4 deletions Bloxstrap/Extensions/BootstrapperIconEx.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
using System;
using System.Drawing;

using Bloxstrap.Enums;
using System.Drawing;

namespace Bloxstrap.Extensions
{
Expand Down
5 changes: 1 addition & 4 deletions Bloxstrap/Extensions/BootstrapperStyleEx.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
using Bloxstrap.Enums;
using Bloxstrap.UI;

namespace Bloxstrap.Extensions
namespace Bloxstrap.Extensions
{
static class BootstrapperStyleEx
{
Expand Down
6 changes: 1 addition & 5 deletions Bloxstrap/Extensions/CursorTypeEx.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
using System.Collections.Generic;

using Bloxstrap.Enums;

namespace Bloxstrap.Extensions
namespace Bloxstrap.Extensions
{
static class CursorTypeEx
{
Expand Down
6 changes: 2 additions & 4 deletions Bloxstrap/Extensions/DateTimeEx.cs
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
using System;

namespace Bloxstrap.Extensions
namespace Bloxstrap.Extensions
{
static class DateTimeEx
{
public static string ToFriendlyString(this DateTime dateTime)
{
return dateTime.ToString("dddd, d MMMM yyyy 'at' h:mm:ss tt", App.CultureFormat);
return dateTime.ToString("dddd, d MMMM yyyy 'at' h:mm:ss tt");
}
}
}
6 changes: 1 addition & 5 deletions Bloxstrap/Extensions/EmojiTypeEx.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
using System.Collections.Generic;

using Bloxstrap.Enums;

namespace Bloxstrap.Extensions
namespace Bloxstrap.Extensions
{
static class EmojiTypeEx
{
Expand Down
1 change: 0 additions & 1 deletion Bloxstrap/Extensions/IconEx.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using System.Drawing;
using System.IO;
using System.Windows.Media.Imaging;
using System.Windows.Media;

Expand Down
1 change: 0 additions & 1 deletion Bloxstrap/Extensions/ThemeEx.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using Microsoft.Win32;
using Bloxstrap.Enums;

namespace Bloxstrap.Extensions
{
Expand Down
6 changes: 1 addition & 5 deletions Bloxstrap/FastFlagManager.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
using System.Collections.Generic;
using System.IO;
using System.Text.Json;

namespace Bloxstrap
namespace Bloxstrap
{
public class FastFlagManager : JsonManager<Dictionary<string, object>>
{
Expand Down
22 changes: 22 additions & 0 deletions Bloxstrap/GlobalUsings.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
global using System;
global using System.Collections.Generic;
global using System.Diagnostics;
global using System.IO;
global using System.IO.Compression;
global using System.Text;
global using System.Text.Json;
global using System.Text.Json.Serialization;
global using System.Text.RegularExpressions;
global using System.Linq;
global using System.Net;
global using System.Net.Http;
global using System.Threading;
global using System.Threading.Tasks;

global using Bloxstrap.Enums;
global using Bloxstrap.Extensions;
global using Bloxstrap.Models;
global using Bloxstrap.Models.Attributes;
global using Bloxstrap.Models.RobloxApi;
global using Bloxstrap.UI;
global using Bloxstrap.Utility;
11 changes: 1 addition & 10 deletions Bloxstrap/HttpClientLoggingHandler.cs
Original file line number Diff line number Diff line change
@@ -1,13 +1,4 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Text;
using System.Threading;
using System.Threading.Tasks;

namespace Bloxstrap
namespace Bloxstrap
{
internal class HttpClientLoggingHandler : MessageProcessingHandler
{
Expand Down
10 changes: 1 addition & 9 deletions Bloxstrap/Integrations/DiscordRichPresence.cs
Original file line number Diff line number Diff line change
@@ -1,12 +1,4 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;

using DiscordRPC;

using Bloxstrap.Models.RobloxApi;
using Bloxstrap.Models;
using DiscordRPC;

namespace Bloxstrap.Integrations
{
Expand Down
4 changes: 1 addition & 3 deletions Bloxstrap/Integrations/ServerNotifier.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
using System;
using System.Threading.Tasks;
using System.Windows;
using System.Windows;

namespace Bloxstrap.Integrations
{
Expand Down
6 changes: 1 addition & 5 deletions Bloxstrap/JsonManager.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
using System;
using System.IO;
using System.Text.Json;

namespace Bloxstrap
namespace Bloxstrap
{
public class JsonManager<T> where T : new()
{
Expand Down
9 changes: 1 addition & 8 deletions Bloxstrap/Logger.cs
Original file line number Diff line number Diff line change
@@ -1,11 +1,4 @@
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Text;
using System.Threading;

namespace Bloxstrap
namespace Bloxstrap
{
// https://stackoverflow.com/a/53873141/11852173
// TODO - this kind of sucks
Expand Down
4 changes: 1 addition & 3 deletions Bloxstrap/Models/Attributes/BuildMetadataAttribute.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
using System;

namespace Bloxstrap.Models.Attributes
namespace Bloxstrap.Models.Attributes
{
[AttributeUsage(AttributeTargets.Assembly)]
public class BuildMetadataAttribute : Attribute
Expand Down
5 changes: 1 addition & 4 deletions Bloxstrap/Models/ClientVersion.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
using System;
using System.Text.Json.Serialization;

namespace Bloxstrap.Models
namespace Bloxstrap.Models
{
public class ClientVersion
{
Expand Down
8 changes: 1 addition & 7 deletions Bloxstrap/Models/DeployInfo.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 Bloxstrap.Models
namespace Bloxstrap.Models
{
public class DeployInfo
{
Expand Down
5 changes: 1 addition & 4 deletions Bloxstrap/Models/FontFace.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
using System.Collections.Generic;
using System.Text.Json.Serialization;

namespace Bloxstrap.Models
namespace Bloxstrap.Models
{
public class FontFace
{
Expand Down
5 changes: 1 addition & 4 deletions Bloxstrap/Models/FontFamily.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
using System.Collections.Generic;
using System.Text.Json.Serialization;

namespace Bloxstrap.Models
namespace Bloxstrap.Models
{
public class FontFamily
{
Expand Down
4 changes: 1 addition & 3 deletions Bloxstrap/Models/GameMessage.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
using System.Text.Json.Serialization;

namespace Bloxstrap.Models
namespace Bloxstrap.Models
{
public class GameMessage
{
Expand Down
5 changes: 1 addition & 4 deletions Bloxstrap/Models/GithubRelease.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
using System.Collections.Generic;
using System.Text.Json.Serialization;

namespace Bloxstrap.Models
namespace Bloxstrap.Models
{
public class GithubRelease
{
Expand Down
5 changes: 0 additions & 5 deletions Bloxstrap/Models/PackageManifest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,6 @@
* Copyright (c) 2015-present MaximumADHD
*/

using System;
using System.Collections.Generic;
using System.IO;
using System.Threading.Tasks;

namespace Bloxstrap.Models
{
public class PackageManifest : List<Package>
Expand Down
5 changes: 1 addition & 4 deletions Bloxstrap/Models/RobloxApi/ApiArrayResponse.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
using System.Collections.Generic;
using System.Text.Json.Serialization;

namespace Bloxstrap.Models.RobloxApi
namespace Bloxstrap.Models.RobloxApi
{
/// <summary>
/// Roblox.Web.WebAPI.Models.ApiArrayResponse
Expand Down
4 changes: 1 addition & 3 deletions Bloxstrap/Models/RobloxApi/GameCreator.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
using System.Text.Json.Serialization;

namespace Bloxstrap.Models.RobloxApi
namespace Bloxstrap.Models.RobloxApi
{
/// <summary>
/// Roblox.Games.Api.Models.Response.GameCreator
Expand Down
6 changes: 1 addition & 5 deletions Bloxstrap/Models/RobloxApi/GameDetailResponse.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
using System;
using System.Collections.Generic;
using System.Text.Json.Serialization;

namespace Bloxstrap.Models.RobloxApi
namespace Bloxstrap.Models.RobloxApi
{

/// <summary>
Expand Down
4 changes: 1 addition & 3 deletions Bloxstrap/Models/RobloxApi/ThumbnailResponse.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
using System.Text.Json.Serialization;

namespace Bloxstrap.Models.RobloxApi
namespace Bloxstrap.Models.RobloxApi
{
/// <summary>
/// Roblox.Web.Responses.Thumbnails.ThumbnailResponse
Expand Down
4 changes: 1 addition & 3 deletions Bloxstrap/Models/RobloxApi/UniverseIdResponse.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
using System.Text.Json.Serialization;

namespace Bloxstrap.Models.RobloxApi
namespace Bloxstrap.Models.RobloxApi
{
// lmao its just one property
public class UniverseIdResponse
Expand Down
2 changes: 0 additions & 2 deletions Bloxstrap/Models/Settings.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
using System.Collections.ObjectModel;

using Bloxstrap.Enums;

namespace Bloxstrap.Models
{
public class Settings
Expand Down
6 changes: 1 addition & 5 deletions Bloxstrap/Models/State.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
using System.Collections.Generic;

using Bloxstrap.Enums;

namespace Bloxstrap.Models
namespace Bloxstrap.Models
{
public class State
{
Expand Down
8 changes: 1 addition & 7 deletions Bloxstrap/ProtocolHandler.cs
Original file line number Diff line number Diff line change
@@ -1,14 +1,8 @@
using System;
using System.Collections.Generic;
using System.Text;
using System.Web;
using System.Web;
using System.Windows;

using Microsoft.Win32;

using Bloxstrap.Enums;
using Bloxstrap.UI;

namespace Bloxstrap
{
static class ProtocolHandler
Expand Down
5 changes: 1 addition & 4 deletions Bloxstrap/Resource.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
using System.IO;
using System.Linq;
using System.Reflection;
using System.Threading.Tasks;
using System.Reflection;

namespace Bloxstrap
{
Expand Down
Loading

0 comments on commit 282d4c6

Please sign in to comment.