mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-05 18:57:19 +02:00
.NET 8 Upgrade Silenced Errors Fix (#30469)
* [Dev][Build] .NET 8 Upgrade Silenced errors first fix. * [Dev][Build] .NET 8 Upgrade Silenced errors. CA1859 * [Dev][Build] .NET 8 Upgrade Silenced errors. CA1854. * [Dev][Build] .NET 8 Upgrade Silenced errors. CA1860 * [Dev][Build] .NET 8 Upgrade Silenced errors. CA1861 * [Dev][Build] .NET 8 Upgrade Silenced errors. CA1862 * [Dev][Build] .NET 8 Upgrade Silenced errors. CA1863 * [Dev][Build] .NET 8 Upgrade Silenced errors. CA1864 * [Dev][Build] .NET 8 Upgrade Silenced errors. CA1865 * [Dev][Build] .NET 8 Upgrade Silenced errors. CA2208 * [Dev][Build] .NET 8 Upgrade Silenced errors. CS9191 * [Dev][Build] .NET 8 Upgrade Silenced errors. Spell check * [Dev][Build] .NET 8 Upgrade Silenced errors. Spell check * [Dev][Build] .NET 8 Upgrade Silenced errors. - CompositeFormat variables used more than once in the same file were assigned to a single variable. - GetProcessesByName logic fix. - String comparion fix. - ArgumentOutOfRangeException message change. * [Dev][Build] .NET 8 Upgrade Silenced errors. - Null check added. - static readonly CompositeFormat added for all fields.
This commit is contained in:
@@ -887,14 +887,14 @@ namespace MouseWithoutBorders.Class
|
||||
|
||||
if (!string.IsNullOrEmpty(Setting.Values.Name2IP))
|
||||
{
|
||||
string[] name2ip = Setting.Values.Name2IP.Split(new string[] { "\r\n" }, StringSplitOptions.RemoveEmptyEntries);
|
||||
string[] name2ip = Setting.Values.Name2IP.Split(Separator, StringSplitOptions.RemoveEmptyEntries);
|
||||
string[] nameNip;
|
||||
|
||||
if (name2ip != null)
|
||||
{
|
||||
foreach (string st in name2ip)
|
||||
{
|
||||
nameNip = st.Split(new char[] { ' ' }, StringSplitOptions.RemoveEmptyEntries);
|
||||
nameNip = st.Split(BlankSeparator, StringSplitOptions.RemoveEmptyEntries);
|
||||
|
||||
if (nameNip != null && nameNip.Length >= 2 && nameNip[0].Trim().Equals(machineName, StringComparison.OrdinalIgnoreCase)
|
||||
&& IPAddress.TryParse(nameNip[1].Trim(), out IPAddress ip) && !validAddressesSt.Contains("[" + ip.ToString() + "]")
|
||||
@@ -1063,7 +1063,7 @@ namespace MouseWithoutBorders.Class
|
||||
|
||||
List<IPAddress> localIPv4Addresses = GetMyIPv4Addresses().ToList();
|
||||
|
||||
if (!localIPv4Addresses.Any())
|
||||
if (localIPv4Addresses.Count == 0)
|
||||
{
|
||||
Common.Log($"No IPv4 resolved from the local machine: {Common.MachineName}");
|
||||
return true;
|
||||
@@ -1234,6 +1234,8 @@ namespace MouseWithoutBorders.Class
|
||||
}
|
||||
|
||||
private long lastRemoteMachineID;
|
||||
internal static readonly string[] Separator = new string[] { "\r\n" };
|
||||
internal static readonly char[] BlankSeparator = new char[] { ' ' };
|
||||
|
||||
private void MainTCPRoutine(TcpSk tcp, string machineName, bool isClient)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user