Use file-scoped namespaces

This commit is contained in:
jvyden 2022-06-14 21:01:29 -04:00
commit bccb6749d1
No known key found for this signature in database
GPG key ID: 18BCF2BE0262B278
9 changed files with 393 additions and 393 deletions

View file

@ -2,7 +2,8 @@
using System.Diagnostics;
using System.IO;
namespace LBPUnion.UnionPatcher.Cli {
namespace LBPUnion.UnionPatcher.Cli;
public static class Program {
public const string Version = "1.0";
@ -51,4 +52,3 @@ namespace LBPUnion.UnionPatcher.Cli {
Console.WriteLine($" Usage: {FileName} <Input EBOOT.elf> <Server URL> <Output filename>");
}
}
}

View file

@ -1,7 +1,7 @@
namespace LBPUnion.UnionPatcher.Gui.Linux {
namespace LBPUnion.UnionPatcher.Gui.Linux;
public static class Program {
public static void Main() {
Gui.Show();
}
}
}

View file

@ -1,7 +1,7 @@
namespace LBPUnion.UnionPatcher.Gui.MacOS {
namespace LBPUnion.UnionPatcher.Gui.MacOS;
public static class Program {
public static void Main() {
Gui.Show();
}
}
}

View file

@ -1,10 +1,10 @@
using System;
namespace LBPUnion.UnionPatcher.Gui.Windows {
namespace LBPUnion.UnionPatcher.Gui.Windows;
public static class Program {
[STAThread]
public static void Main() {
Gui.Show();
}
}
}

View file

@ -1,6 +1,7 @@
using System;
namespace LBPUnion.UnionPatcher.Gui {
namespace LBPUnion.UnionPatcher.Gui;
public static class EasterEgg {
private static bool? restitch = null;
@ -13,4 +14,3 @@ namespace LBPUnion.UnionPatcher.Gui {
}
}
}
}

View file

@ -1,9 +1,9 @@
using Eto.Forms;
namespace LBPUnion.UnionPatcher.Gui {
namespace LBPUnion.UnionPatcher.Gui;
public static class Gui {
public static void Show() {
new Application().Run(new MainForm());
}
}
}

View file

@ -5,7 +5,8 @@ using Eto;
using Eto.Drawing;
using Eto.Forms;
namespace LBPUnion.UnionPatcher.Gui {
namespace LBPUnion.UnionPatcher.Gui;
public class MainForm : Form {
#region UI
private readonly FilePicker filePicker;
@ -162,4 +163,3 @@ namespace LBPUnion.UnionPatcher.Gui {
this.CreateOkDialog("Success!", "The Server URL has been patched to " + this.serverUrl.Text).ShowModal();
}
}
}

View file

@ -8,7 +8,8 @@ Linux ELF header refspec: https://refspecs.linuxfoundation.org/elf/gabi4+/ch4.eh
Wikipedia entry on ELF: https://en.wikipedia.org/wiki/Executable_and_Linkable_Format
*/
namespace LBPUnion.UnionPatcher {
namespace LBPUnion.UnionPatcher;
public class ElfFile {
internal const int MinimumSize = 52;
@ -82,4 +83,3 @@ namespace LBPUnion.UnionPatcher {
return null;
}
}
}

View file

@ -2,7 +2,8 @@ using System;
using System.IO;
using System.Text;
namespace LBPUnion.UnionPatcher {
namespace LBPUnion.UnionPatcher;
public static class Patcher {
private static readonly string[] toBePatched = {
// Normal LittleBigPlanet gameserver URLs
@ -102,4 +103,3 @@ namespace LBPUnion.UnionPatcher {
return data;
}
}
}