[General]Consolidate to language version C# 10 (#19209)

This commit is contained in:
Davide Giacometti
2022-07-15 10:06:00 +02:00
committed by GitHub
parent 3d8fbd0507
commit e6be44623a
10 changed files with 13 additions and 21 deletions

View File

@@ -4,6 +4,7 @@
using System;
using System.Diagnostics;
using System.Globalization;
using System.Linq;
using System.Text;
using System.Threading;
@@ -101,7 +102,7 @@ namespace PowerLauncher
{
var textToLog = new StringBuilder();
textToLog.AppendLine("Begin PowerToys Run startup ----------------------------------------------------");
textToLog.AppendLine($"Runtime info:{ErrorReporting.RuntimeInfo()}");
textToLog.AppendLine(CultureInfo.InvariantCulture, $"Runtime info:{ErrorReporting.RuntimeInfo()}");
RegisterAppDomainExceptions();
RegisterDispatcherUnhandledException();

View File

@@ -25,7 +25,6 @@
<PropertyGroup Condition="'$(Configuration)'=='Debug'">
<DefineConstants>DEBUG;TRACE</DefineConstants>
<DebugType>full</DebugType>
<LangVersion>7.3</LangVersion>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Optimize>false</Optimize>
@@ -36,7 +35,6 @@
<DefineConstants>TRACE;RELEASE</DefineConstants>
<Optimize>true</Optimize>
<DebugType>pdbonly</DebugType>
<LangVersion>7.3</LangVersion>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>

View File

@@ -47,7 +47,7 @@ namespace PowerLauncher
content.AppendLine(ErrorReporting.RuntimeInfo());
// Using CurrentCulture since this is displayed to user in the report window
content.AppendLine($"Date: {DateTime.Now.ToString(CultureInfo.CurrentCulture)}");
content.AppendLine(CultureInfo.CurrentCulture, $"Date: {DateTime.Now.ToString(CultureInfo.CurrentCulture)}");
content.AppendLine("Exception:");
content.AppendLine(exception.ToString());
var paragraph = new Paragraph();