Modern namespaces and typos fixed

This commit is contained in:
UMMANCODE 2024-07-18 17:52:32 +04:00
parent 70ea21fca2
commit 9b01195f29
35 changed files with 3518 additions and 3556 deletions

View file

@ -1,7 +1,7 @@
using ProtosLib.Statistics;
namespace ProtosLib
{
namespace ProtosLib;
public class Tests
{
private StatsService.StatsServiceClient client_;
@ -10,4 +10,3 @@ namespace ProtosLib
{
}
}
}

View file

@ -1,9 +1,7 @@
using System.Windows.Controls;
namespace v2rayN.Base
{
internal class MyDGTextColumn : DataGridTextColumn
{
namespace v2rayN.Base;
internal class MyDGTextColumn : DataGridTextColumn {
public string ExName { get; set; }
}
}

View file

@ -2,8 +2,8 @@
using System.IO;
using System.Net;
namespace v2rayN
{
namespace v2rayN;
internal class DownloaderHelper
{
private static readonly Lazy<DownloaderHelper> _instance = new(() => new());
@ -178,4 +178,3 @@ namespace v2rayN
downloadOpt = null;
}
}
}

View file

@ -2,8 +2,8 @@
using System.IO.Compression;
using System.Text;
namespace v2rayN
{
namespace v2rayN;
public static class FileManager
{
public static bool ByteArrayToFile(string fileName, byte[] content)
@ -87,4 +87,3 @@ namespace v2rayN
return true;
}
}
}

View file

@ -4,8 +4,8 @@ using System.Net.Http.Headers;
using System.Net.Mime;
using System.Text;
namespace v2rayN
{
namespace v2rayN;
/// <summary>
/// </summary>
public class HttpClientHelper
@ -185,4 +185,3 @@ namespace v2rayN
} while (isMoreToRead);
}
}
}

View file

@ -1,8 +1,7 @@
using System.Diagnostics;
using System.Runtime.InteropServices;
namespace v2rayN
{
namespace v2rayN;
/*
* See:
* http://stackoverflow.com/questions/6266820/working-example-of-createjobobject-setinformationjobobject-pinvoke-in-net
@ -173,4 +172,3 @@ namespace v2rayN
}
#endregion Helper classes
}

View file

@ -3,8 +3,8 @@ using System.Text.Json;
using System.Text.Json.Nodes;
using System.Text.Json.Serialization;
namespace v2rayN
{
namespace v2rayN;
internal class JsonUtils
{
/// <summary>
@ -131,4 +131,3 @@ namespace v2rayN
}
}
}
}

View file

@ -3,8 +3,8 @@ using NLog.Config;
using NLog.Targets;
using System.IO;
namespace v2rayN
{
namespace v2rayN;
public class Logging
{
public static void Setup()
@ -75,4 +75,3 @@ namespace v2rayN
}
}
}
}

View file

@ -1,8 +1,8 @@
using System.Runtime.InteropServices;
using static v2rayN.Common.ProxySetting.InternetConnectionOption;
namespace v2rayN.Common
{
namespace v2rayN.Common;
internal class ProxySetting
{
private const string _regPath = @"Software\Microsoft\Windows\CurrentVersion\Internet Settings";
@ -357,4 +357,3 @@ namespace v2rayN.Common
);
}
}
}

View file

@ -9,8 +9,8 @@ using ZXing.Common;
using ZXing.QrCode;
using ZXing.Windows.Compatibility;
namespace v2rayN
{
namespace v2rayN;
/// <summary>
/// 含有QR码的描述类和包装编码和渲染
/// </summary>
@ -101,4 +101,3 @@ namespace v2rayN
return new(96 / g.DpiX, 96 / g.DpiY);
}
}
}

View file

@ -1,8 +1,8 @@
using System.Linq.Expressions;
using System.Reflection;
namespace v2rayN
{
namespace v2rayN;
public static class QueryableExtension
{
public static IOrderedQueryable<T> OrderBy<T>(this IQueryable<T> query, string propertyName)
@ -47,4 +47,3 @@ namespace v2rayN
return lambda;
}
}
}

View file

@ -1,5 +1,5 @@
namespace v2rayN
{
namespace v2rayN;
public class SemanticVersion
{
private int major;
@ -177,4 +177,3 @@
#endregion Private
}
}

View file

@ -1,8 +1,8 @@
using SQLite;
using System.Collections;
namespace v2rayN
{
namespace v2rayN;
public sealed class SQLiteHelper
{
private static readonly Lazy<SQLiteHelper> _instance = new(() => new());
@ -120,4 +120,3 @@ namespace v2rayN
return _dbAsync.Table<T>();
}
}
}

View file

@ -1,8 +1,8 @@
using System.Diagnostics.CodeAnalysis;
using System.IO;
namespace v2rayN
{
namespace v2rayN;
internal static class StringEx
{
public static bool IsNullOrEmpty([NotNullWhen(false)] this string? value)
@ -91,4 +91,3 @@ namespace v2rayN
return $"\"{value}\"";
}
}
}

View file

@ -1,8 +1,8 @@
using Microsoft.Win32;
using System.Windows;
namespace v2rayN
{
namespace v2rayN;
internal class UI
{
private static readonly string caption = "v2rayN";
@ -36,4 +36,3 @@ namespace v2rayN
return true;
}
}
}

View file

@ -19,8 +19,8 @@ using System.Windows.Interop;
using System.Windows.Media;
using System.Windows.Media.Imaging;
namespace v2rayN
{
namespace v2rayN;
internal class Utils
{
#region Json操作
@ -1127,4 +1127,3 @@ namespace v2rayN
#endregion Windows API
}
}

View file

@ -1,8 +1,8 @@
using YamlDotNet.Serialization;
using YamlDotNet.Serialization.NamingConventions;
namespace v2rayN.Common
{
namespace v2rayN.Common;
internal class YamlUtils
{
#region YAML
@ -55,4 +55,3 @@ namespace v2rayN.Common
#endregion YAML
}
}

View file

@ -1,8 +1,8 @@
using System.Windows.Data;
using System.Windows.Media;
namespace v2rayN.Converters
{
namespace v2rayN.Converters;
public class DelayColorConverter : IValueConverter
{
public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
@ -22,4 +22,3 @@ namespace v2rayN.Converters
return null;
}
}
}

View file

@ -1,8 +1,8 @@
using System.Globalization;
using System.Windows.Data;
namespace v2rayN.Converters
{
namespace v2rayN.Converters;
[ValueConversion(typeof(bool), typeof(bool))]
public class InverseBooleanConverter : IValueConverter
{
@ -21,4 +21,3 @@ namespace v2rayN.Converters
throw new NotImplementedException();
}
}
}

View file

@ -1,8 +1,8 @@
using System.Windows.Media;
using v2rayN.Handler;
namespace v2rayN.Converters
{
namespace v2rayN.Converters;
public class MaterialDesignFonts
{
public static FontFamily MyFont { get; }
@ -24,4 +24,3 @@ namespace v2rayN.Converters
MyFont ??= new FontFamily("Microsoft YaHei");
}
}
}

View file

@ -1,5 +1,5 @@
namespace v2rayN.Enums
{
namespace v2rayN.Enums;
public enum EConfigType
{
VMess = 1,
@ -13,4 +13,3 @@
Wireguard = 9,
Http = 10
}
}

View file

@ -1,5 +1,5 @@
namespace v2rayN.Enums
{
namespace v2rayN.Enums;
public enum ECoreType
{
v2fly = 1,
@ -17,4 +17,3 @@
hysteria2 = 26,
v2rayN = 99
}
}

View file

@ -1,5 +1,5 @@
namespace v2rayN.Enums
{
namespace v2rayN.Enums;
public enum EGlobalHotkey
{
ShowForm = 0,
@ -8,4 +8,3 @@
SystemProxyUnchanged = 3,
SystemProxyPac = 4,
}
}

View file

@ -1,5 +1,5 @@
namespace v2rayN.Enums
{
namespace v2rayN.Enums;
public enum EInboundProtocol
{
socks = 0,
@ -11,4 +11,3 @@
api2,
speedtest = 21
}
}

View file

@ -1,5 +1,5 @@
namespace v2rayN.Enums
{
namespace v2rayN.Enums;
public enum EMove
{
Top = 1,
@ -8,4 +8,3 @@
Bottom = 4,
Position = 5
}
}

View file

@ -1,5 +1,5 @@
namespace v2rayN.Enums
{
namespace v2rayN.Enums;
public enum ERuleMode
{
Rule = 0,
@ -7,4 +7,3 @@
Direct = 2,
Unchanged = 3
}
}

View file

@ -1,5 +1,5 @@
namespace v2rayN.Enums
{
namespace v2rayN.Enums;
public enum EServerColName
{
def = 0,
@ -18,4 +18,3 @@
totalDown,
totalUp
}
}

View file

@ -1,5 +1,5 @@
namespace v2rayN.Enums
{
namespace v2rayN.Enums;
public enum ESpeedActionType
{
Tcping,
@ -7,4 +7,3 @@
Speedtest,
Mixedtest
}
}

View file

@ -1,5 +1,5 @@
namespace v2rayN.Enums
{
namespace v2rayN.Enums;
public enum ESysProxyType
{
ForcedClear = 0,
@ -7,4 +7,3 @@
Unchanged = 2,
Pac = 3
}
}

View file

@ -1,5 +1,5 @@
namespace v2rayN.Enums
{
namespace v2rayN.Enums;
public enum ETransport
{
tcp,
@ -12,4 +12,3 @@
quic,
grpc
}
}

View file

@ -1,8 +1,7 @@
namespace v2rayN.Enums
{
namespace v2rayN.Enums;
public enum EViewAction
{
AdjustMainLvColWidth,
ProfilesFocus
}
}

View file

@ -1,7 +1,7 @@
using v2rayN.Enums;
namespace v2rayN
{
namespace v2rayN;
internal class Global
{
#region const
@ -194,4 +194,3 @@ namespace v2rayN
#endregion const
}
}

View file

@ -8,8 +8,7 @@
// </auto-generated>
//------------------------------------------------------------------------------
namespace v2rayN.Properties {
using System;
namespace v2rayN.Properties;
/// <summary>
@ -220,4 +219,3 @@ namespace v2rayN.Properties {
}
}
}
}

View file

@ -5,8 +5,8 @@ using System.IO.Compression;
using System.Text;
using System.Windows.Forms;
namespace v2rayUpgrade
{
namespace v2rayUpgrade;
public partial class MainForm : Form
{
private readonly string defaultFilename = "v2ray-windows.zip";
@ -144,4 +144,3 @@ namespace v2rayUpgrade
return Path.Combine(startupPath, fileName);
}
}
}

View file

@ -1,8 +1,8 @@
using System;
using System.Windows.Forms;
namespace v2rayUpgrade
{
namespace v2rayUpgrade;
internal static class Program
{
/// <summary>
@ -18,4 +18,3 @@ namespace v2rayUpgrade
Application.Run(new MainForm(args));
}
}
}