Skip to content

Commit

Permalink
Marked util classes as static
Browse files Browse the repository at this point in the history
  • Loading branch information
irodai-majom committed Oct 21, 2024
1 parent 2fb1125 commit 0cf0f9f
Show file tree
Hide file tree
Showing 12 changed files with 12 additions and 13 deletions.
2 changes: 1 addition & 1 deletion src/N_m3u8DL-RE.Common/Util/GlobalUtil.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

namespace N_m3u8DL_RE.Common.Util;

public class GlobalUtil
public static class GlobalUtil
{
private static readonly JsonSerializerOptions Options = new JsonSerializerOptions
{
Expand Down
2 changes: 1 addition & 1 deletion src/N_m3u8DL-RE.Common/Util/HTTPUtil.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

namespace N_m3u8DL_RE.Common.Util;

public class HTTPUtil
public static class HTTPUtil
{
public static readonly HttpClientHandler HttpClientHandler = new()
{
Expand Down
2 changes: 1 addition & 1 deletion src/N_m3u8DL-RE.Common/Util/HexUtil.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
namespace N_m3u8DL_RE.Common.Util;

public class HexUtil
public static class HexUtil
{
public static string BytesToHex(byte[] data, string split = "")
{
Expand Down
2 changes: 1 addition & 1 deletion src/N_m3u8DL-RE.Common/Util/RetryUtil.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

namespace N_m3u8DL_RE.Common.Util;

public class RetryUtil
public static class RetryUtil
{
public static async Task<T?> WebRequestRetryAsync<T>(Func<Task<T>> funcAsync, int maxRetries = 10, int retryDelayMilliseconds = 1500, int retryDelayIncrementMilliseconds = 0)
{
Expand Down
2 changes: 1 addition & 1 deletion src/N_m3u8DL-RE/Util/DownloadUtil.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

namespace N_m3u8DL_RE.Util;

internal class DownloadUtil
internal static class DownloadUtil
{
private static readonly HttpClient AppHttpClient = HTTPUtil.AppHttpClient;

Expand Down
2 changes: 1 addition & 1 deletion src/N_m3u8DL-RE/Util/FilterUtil.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

namespace N_m3u8DL_RE.Util;

public class FilterUtil
public static class FilterUtil
{
public static List<StreamSpec> DoFilterKeep(IEnumerable<StreamSpec> lists, StreamFilter? filter)
{
Expand Down
2 changes: 1 addition & 1 deletion src/N_m3u8DL-RE/Util/ImageHeaderUtil.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
namespace N_m3u8DL_RE.Util;

internal class ImageHeaderUtil
internal static class ImageHeaderUtil
{
public static bool IsImageHeader(byte[] bArr)
{
Expand Down
3 changes: 1 addition & 2 deletions src/N_m3u8DL-RE/Util/LanguageCodeUtil.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,8 @@ public Language(string extendCode, string code, string desc, string descA)
}
}

internal class LanguageCodeUtil
internal static class LanguageCodeUtil
{
private LanguageCodeUtil() { }

private readonly static List<Language> ALL_LANGS = @"
af;afr;Afrikaans;Afrikaans
Expand Down
2 changes: 1 addition & 1 deletion src/N_m3u8DL-RE/Util/LargeSingleFileSplitUtil.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

namespace N_m3u8DL_RE.Util;

internal class LargeSingleFileSplitUtil
internal static class LargeSingleFileSplitUtil
{
class Clip
{
Expand Down
2 changes: 1 addition & 1 deletion src/N_m3u8DL-RE/Util/MergeUtil.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

namespace N_m3u8DL_RE.Util;

internal class MergeUtil
internal static class MergeUtil
{
/// <summary>
/// 输入一堆已存在的文件,合并到新文件
Expand Down
2 changes: 1 addition & 1 deletion src/N_m3u8DL-RE/Util/PipeUtil.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

namespace N_m3u8DL_RE.Util;

internal class PipeUtil
internal static class PipeUtil
{
public static Stream CreatePipe(string pipeName)
{
Expand Down
2 changes: 1 addition & 1 deletion src/N_m3u8DL-RE/Util/SubtitleUtil.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

namespace N_m3u8DL_RE.Util;

internal class SubtitleUtil
internal static class SubtitleUtil
{
/// <summary>
/// 写出图形字幕PNG文件
Expand Down

0 comments on commit 0cf0f9f

Please sign in to comment.