Skip to content

Commit

Permalink
Make entire AL_Common.Common global-using'd
Browse files Browse the repository at this point in the history
  • Loading branch information
FenPhoenix committed Dec 15, 2024
1 parent 497e331 commit 060c83b
Show file tree
Hide file tree
Showing 118 changed files with 22 additions and 175 deletions.
1 change: 0 additions & 1 deletion AL_Common/FastZipReader/ZipArchiveFast.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
using System.IO;
using System.Text;
using JetBrains.Annotations;
using static AL_Common.Common;
using static AL_Common.FastZipReader.ZipArchiveFast_Common;

namespace AL_Common.FastZipReader;
Expand Down
1 change: 0 additions & 1 deletion AL_Common/FastZipReader/ZipArchiveFast_Common.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
using System.Runtime.CompilerServices;
using AL_Common.FastZipReader.Deflate64Managed;
using JetBrains.Annotations;
using static AL_Common.Common;

namespace AL_Common.FastZipReader;

Expand Down
1 change: 0 additions & 1 deletion AL_Common/FastZipReader/ZipArchiveFast_Threaded.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
// Zip Spec here: http://www.pkware.com/documents/casestudies/APPNOTE.TXT

using System.IO;
using static AL_Common.Common;
using static AL_Common.FastZipReader.ZipArchiveFast_Common;

namespace AL_Common.FastZipReader;
Expand Down
1 change: 0 additions & 1 deletion AL_Common/FastZipReader/ZipBlocks.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
using System;
using System.IO;
using System.Runtime.InteropServices;
using static AL_Common.Common;
using static AL_Common.FastZipReader.ZipArchiveFast_Common;

namespace AL_Common.FastZipReader;
Expand Down
1 change: 0 additions & 1 deletion AL_Common/Fen7z.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
using System.IO;
using System.Threading;
using JetBrains.Annotations;
using static AL_Common.Common;

namespace AL_Common;

Expand Down
21 changes: 0 additions & 21 deletions AL_Common/FullyGlobal.cs

This file was deleted.

11 changes: 11 additions & 0 deletions AL_Common/General/Common.cs
Original file line number Diff line number Diff line change
Expand Up @@ -425,4 +425,15 @@ public static unsafe string Path_GetRandomFileName()
#endregion

#endregion

/// <summary>
/// Shorthand for <see cref="Environment.NewLine"/>
/// </summary>
public static readonly string NL = Environment.NewLine;

public const int StreamCopyBufferSize = 81920;
public const int FileStreamBufferSize = 4096;

// Immediately static init for thread safety
public static readonly Encoding UTF8NoBOM = new UTF8Encoding(false, true);
}
3 changes: 2 additions & 1 deletion AL_Common/GlobalUsings.cs
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
global using static AL_Common.FullyGlobal;
global using AL_Common;
global using static AL_Common.Common;
1 change: 0 additions & 1 deletion AL_Common/IO/FastIO_Native.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
using System.IO;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using static AL_Common.Common;

namespace AL_Common;

Expand Down
1 change: 0 additions & 1 deletion AL_Common/Logger.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using JetBrains.Annotations;
using static AL_Common.Common;

namespace AL_Common;

Expand Down
1 change: 0 additions & 1 deletion AL_Common/RTF/RTFParserCommon.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
using System.Diagnostics.CodeAnalysis;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using static AL_Common.Common;

namespace AL_Common;

Expand Down
1 change: 0 additions & 1 deletion AL_Common/RTF/RtfDisplayedReadmeParser.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
using System.Runtime.CompilerServices;
using System.Text;
using JetBrains.Annotations;
using static AL_Common.Common;
using static AL_Common.RTFParserCommon;

namespace AL_Common;
Expand Down
1 change: 0 additions & 1 deletion AL_Common/RTF/RtfToTextConverter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@ afforded by being able to move the stream index freely.
using System.Runtime.CompilerServices;
using System.Text;
using JetBrains.Annotations;
using static AL_Common.Common;
using static AL_Common.RTFParserCommon;

namespace AL_Common;
Expand Down
1 change: 0 additions & 1 deletion AL_Common/RTF/RtfToTextConverter_DupeSource.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

using System;
using System.Runtime.CompilerServices;
using static AL_Common.Common;
using static AL_Common.FenGenAttributes;
using static AL_Common.RTFParserCommon;

Expand Down
1 change: 0 additions & 1 deletion AL_Common/TDMCommon.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
using System.Collections.Generic;
using System.Globalization;
using System.Text;
using static AL_Common.Common;

namespace AL_Common;

Expand Down
1 change: 0 additions & 1 deletion AngelLoader/Common/Comparers.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
using System.Collections.Generic;
using System.IO;
using System.Runtime.InteropServices;
using AL_Common;
using AngelLoader.DataClasses;
using static AngelLoader.GameSupport;
using static AngelLoader.Global;
Expand Down
1 change: 0 additions & 1 deletion AngelLoader/Common/DataClasses/CatAndTags.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
using System.Collections;
using System.Collections.Generic;
using System.Runtime.InteropServices;
using static AL_Common.Common;

namespace AngelLoader.DataClasses;

Expand Down
1 change: 0 additions & 1 deletion AngelLoader/Common/DataClasses/ConfigData.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
using System;
using System.Collections.Generic;
using System.Drawing;
using static AL_Common.Common;
using static AngelLoader.GameSupport;
using static AngelLoader.Misc;

Expand Down
2 changes: 0 additions & 2 deletions AngelLoader/Common/DataClasses/ConfigDataSupporting.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@
using System.Linq;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using AL_Common;
using static AL_Common.Common;
using static AL_Common.FenGenAttributes;
using static AngelLoader.GameSupport;
using static AngelLoader.Misc;
Expand Down
1 change: 0 additions & 1 deletion AngelLoader/Common/DataClasses/FMData.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
using System.Collections.Generic;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using AL_Common;
using JetBrains.Annotations;
using static AL_Common.FenGenAttributes;
using static AL_Common.LanguageSupport;
Expand Down
2 changes: 0 additions & 2 deletions AngelLoader/Common/DataClasses/FMDataSupporting.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,7 @@
using System.Diagnostics.CodeAnalysis;
using System.Globalization;
using System.Runtime.CompilerServices;
using AL_Common;
using JetBrains.Annotations;
using static AL_Common.Common;
using static AL_Common.FenGenAttributes;
using static AngelLoader.Utils;

Expand Down
1 change: 0 additions & 1 deletion AngelLoader/Common/DataClasses/NonLocalizableText.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
using System.Globalization;
using System.Reflection;
using System.Runtime.Versioning;
using AL_Common;

namespace AngelLoader.DataClasses;

Expand Down
1 change: 0 additions & 1 deletion AngelLoader/Common/Misc.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Threading.Tasks;
using AL_Common;
using AngelLoader.DataClasses;
using JetBrains.Annotations;
using static AngelLoader.GameSupport;
Expand Down
2 changes: 0 additions & 2 deletions AngelLoader/Common/Native/FastIO.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,7 @@
using System.IO;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using AL_Common;
using AngelLoader.DataClasses;
using static AL_Common.Common;
using static AL_Common.FastIO_Native;

namespace AngelLoader;
Expand Down
1 change: 0 additions & 1 deletion AngelLoader/Common/Native/NativeCommon.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
using System.Buffers;
using System.Runtime.InteropServices;
using Microsoft.Win32.SafeHandles;
using static AL_Common.Common;

namespace AngelLoader;

Expand Down
1 change: 0 additions & 1 deletion AngelLoader/Common/Paths.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
using System.Text;
using AngelLoader.DataClasses;
using Microsoft.Win32;
using static AL_Common.Common;
using static AL_Common.Logger;
using static AngelLoader.GameSupport;
using static AngelLoader.Global;
Expand Down
1 change: 0 additions & 1 deletion AngelLoader/Common/Utility/ColorUtils.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
using System;
using System.Drawing;
using System.Runtime.InteropServices;
using AL_Common;
using static AngelLoader.Utils;

namespace AngelLoader;
Expand Down
1 change: 0 additions & 1 deletion AngelLoader/Common/Utility/MathUtils.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using System;
using AL_Common;

namespace AngelLoader;

Expand Down
2 changes: 0 additions & 2 deletions AngelLoader/Common/Utility/MiscUtils.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,8 @@
using System.Drawing;
using System.Globalization;
using System.IO;
using AL_Common;
using AngelLoader.DataClasses;
using JetBrains.Annotations;
using static AL_Common.Common;
using static AL_Common.Logger;
using static AngelLoader.GameSupport;
using static AngelLoader.Global;
Expand Down
1 change: 0 additions & 1 deletion AngelLoader/Common/Utility/PathUtils.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
using System.IO;
using System.Text;
using AngelLoader.DataClasses;
using static AL_Common.Common;
using static AL_Common.Logger;

namespace AngelLoader;
Expand Down
1 change: 0 additions & 1 deletion AngelLoader/Common/Utility/StringUtils.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using System;
using AL_Common;
using static System.StringComparison;

namespace AngelLoader;
Expand Down
1 change: 0 additions & 1 deletion AngelLoader/Common/Utility/ThreadingUtils.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
using System.Collections.Generic;
using System.Linq;
using AngelLoader.DataClasses;
using static AL_Common.Common;
using static AngelLoader.GameSupport;
using static AngelLoader.Global;
using static AngelLoader.Misc;
Expand Down
2 changes: 0 additions & 2 deletions AngelLoader/Common/Utility/ZipUtils.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,9 @@
using System.IO.Compression;
using System.Text;
using System.Threading;
using AL_Common;
using AL_Common.FastZipReader;
using SharpCompress.Archives.Rar;
using SharpCompress.Readers.Rar;
using static AL_Common.Common;

namespace AngelLoader;

Expand Down
1 change: 0 additions & 1 deletion AngelLoader/Core.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ every time we write
using AngelLoader.DataClasses;
using JetBrains.Annotations;
using Microsoft.Win32;
using static AL_Common.Common;
using static AL_Common.LanguageSupport;
using static AL_Common.Logger;
using static AngelLoader.GameSupport;
Expand Down
2 changes: 0 additions & 2 deletions AngelLoader/DetectDriveTypes.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,10 @@
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Text;
using AL_Common;
using AL_Common.DeviceIoControlLib.Objects.Storage;
using AL_Common.DeviceIoControlLib.Wrapper;
using AngelLoader.DataClasses;
using Microsoft.Win32.SafeHandles;
using static AL_Common.Common;
using static AngelLoader.Misc;

namespace AngelLoader;
Expand Down
1 change: 0 additions & 1 deletion AngelLoader/FFmpeg.NET/FFmpeg.NET.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
using System;
using System.Diagnostics;
using System.IO;
using AL_Common;
using AngelLoader.DataClasses;
using static AL_Common.Logger;

Expand Down
1 change: 0 additions & 1 deletion AngelLoader/FMArchives.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
using System.Collections.Generic;
using System.IO;
using System.Threading.Tasks;
using AL_Common;
using AngelLoader.DataClasses;
using JetBrains.Annotations;
using Microsoft.VisualBasic.FileIO;
Expand Down
2 changes: 0 additions & 2 deletions AngelLoader/FMAudio.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,7 @@
using System.Runtime.CompilerServices;
using System.Threading;
using System.Threading.Tasks;
using AL_Common;
using AngelLoader.DataClasses;
using static AL_Common.Common;
using static AL_Common.Logger;
using static AngelLoader.GameSupport;
using static AngelLoader.Global;
Expand Down
2 changes: 0 additions & 2 deletions AngelLoader/FMBackupAndRestore.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,9 @@
using System.Text;
using System.Text.RegularExpressions;
using System.Threading;
using AL_Common;
using AngelLoader.DataClasses;
using SharpCompress.Archives.Rar;
using SharpCompress.Archives.SevenZip;
using static AL_Common.Common;
using static AngelLoader.GameSupport;
using static AngelLoader.Global;
using static AngelLoader.Utils;
Expand Down
2 changes: 0 additions & 2 deletions AngelLoader/FMCache.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,11 @@
using System.IO.Compression;
using System.Linq;
using System.Threading.Tasks;
using AL_Common;
using AngelLoader.DataClasses;
using SharpCompress;
using SharpCompress.Archives.Rar;
using SharpCompress.Archives.SevenZip;
using SharpCompress.Readers.Rar;
using static AL_Common.Common;
using static AL_Common.Logger;
using static AngelLoader.GameSupport;
using static AngelLoader.Global;
Expand Down
2 changes: 0 additions & 2 deletions AngelLoader/FMDelete.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,8 @@
using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;
using AL_Common;
using AngelLoader.DataClasses;
using Microsoft.VisualBasic.FileIO;
using static AL_Common.Common;
using static AL_Common.Logger;
using static AngelLoader.GameSupport;
using static AngelLoader.Global;
Expand Down
2 changes: 0 additions & 2 deletions AngelLoader/FMInstallAndPlay.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,12 @@
using System.Text.RegularExpressions;
using System.Threading;
using System.Threading.Tasks;
using AL_Common;
using AL_Common.FastZipReader;
using AngelLoader.DataClasses;
using JetBrains.Annotations;
using SharpCompress.Archives.Rar;
using SharpCompress.Archives.SevenZip;
using SharpCompress.Readers.Rar;
using static AL_Common.Common;
using static AL_Common.LanguageSupport;
using static AL_Common.Logger;
using static AngelLoader.GameSupport;
Expand Down
1 change: 0 additions & 1 deletion AngelLoader/FMLanguages.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
using AngelLoader.DataClasses;
using SharpCompress.Archives.Rar;
using SharpCompress.Archives.SevenZip;
using static AL_Common.Common;
using static AL_Common.LanguageSupport;
using static AL_Common.Logger;
using static AngelLoader.GameSupport;
Expand Down
Loading

0 comments on commit 060c83b

Please sign in to comment.