Skip to content

Commit 139cf8e

Browse files
committed
bump to .net 10
1 parent d656c2d commit 139cf8e

6 files changed

Lines changed: 19 additions & 156 deletions

File tree

YAFNET.LanguageManager/YAFNET.LanguageManager/GoogleTranslate/ITranslateProvider.cs

Lines changed: 0 additions & 46 deletions
This file was deleted.

YAFNET.LanguageManager/YAFNET.LanguageManager/GoogleTranslate/TranslateProvider.cs

Lines changed: 0 additions & 80 deletions
This file was deleted.

YAFNET.LanguageManager/YAFNET.LanguageManager/Utils/CommandLineParameters.cs

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -119,18 +119,7 @@ public CommandLineParameters(IEnumerable<string> args, bool usCaseSensitive)
119119
/// <returns>
120120
/// The <see cref="string"/>.
121121
/// </returns>
122-
public string this[int index]
123-
{
124-
get
125-
{
126-
if (index < this.TextLines.Count)
127-
{
128-
return this.TextLines[index];
129-
}
130-
131-
throw new IndexOutOfRangeException();
132-
}
133-
}
122+
public string this[int index] => index < this.TextLines.Count ? this.TextLines[index] : throw new IndexOutOfRangeException();
134123

135124
/// <summary>
136125
/// Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

YAFNET.LanguageManager/YAFNET.LanguageManager/Utils/DebugHelper.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ public static void DebugExceptionMessage(Exception e)
6363
User Name: {Environment.UserName}\r\n{e.Message}\r\n{e.StackTrace}\r\n-----------------------------\r\n
6464
""";
6565

66-
Trace.WriteLine(message);
66+
Trace.TraceError(message);
6767
}
6868
}
6969

@@ -75,6 +75,6 @@ public static void DebugExceptionMessage(Exception e)
7575
/// </param>
7676
private static void LogMessage(string message)
7777
{
78-
Trace.WriteLine($"{DateTime.Now:G}: {message}");
78+
Trace.TraceError($"{DateTime.Now:G}: {message}");
7979
}
8080
}

YAFNET.LanguageManager/YAFNET.LanguageManager/Utils/SaveDebug.cs

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -36,17 +36,17 @@ public class SaveDebug : IDisposable
3636
/// <summary>
3737
/// The log file name.
3838
/// </summary>
39-
private readonly string _logFileName;
39+
private readonly string logFileName;
4040

4141
/// <summary>
4242
/// The log stream.
4343
/// </summary>
44-
private readonly StringWriter _logStream;
44+
private readonly StringWriter logStream;
4545

4646
/// <summary>
4747
/// The debug listener.
4848
/// </summary>
49-
private readonly TextWriterTraceListener _debugListener;
49+
private readonly TextWriterTraceListener debugListener;
5050

5151
/// <summary>
5252
/// Initializes a new instance of the <see cref="SaveDebug"/> class.
@@ -59,13 +59,13 @@ public class SaveDebug : IDisposable
5959
/// </param>
6060
public SaveDebug(string path, string logName)
6161
{
62-
this._logFileName = $"{path}\\{logName}";
62+
this.logFileName = $"{path}\\{logName}";
6363

6464
try
6565
{
66-
this._logStream = new StringWriter();
67-
this._debugListener = new TextWriterTraceListener(this._logStream);
68-
Trace.Listeners.Add(this._debugListener);
66+
this.logStream = new StringWriter();
67+
this.debugListener = new TextWriterTraceListener(this.logStream);
68+
Trace.Listeners.Add(this.debugListener);
6969
}
7070
catch
7171
{
@@ -91,18 +91,18 @@ protected virtual void Dispose(bool disposing)
9191
try
9292
{
9393
Trace.Flush();
94-
if (this._logStream.ToString().Length > 0)
94+
if (this.logStream.ToString().Length > 0)
9595
{
96-
var streamWriter = !File.Exists(this._logFileName)
97-
? File.CreateText(this._logFileName)
98-
: File.AppendText(this._logFileName);
99-
streamWriter.Write(this._logStream.ToString());
96+
var streamWriter = !File.Exists(this.logFileName)
97+
? File.CreateText(this.logFileName)
98+
: File.AppendText(this.logFileName);
99+
streamWriter.Write(this.logStream.ToString());
100100
streamWriter.Flush();
101101
streamWriter.Close();
102102
}
103103

104-
this._logStream.Close();
105-
Trace.Listeners.Remove(this._debugListener);
104+
this.logStream.Close();
105+
Trace.Listeners.Remove(this.debugListener);
106106
}
107107
catch (Exception)
108108
{

YAFNET.LanguageManager/YAFNET.LanguageManager/YAFNET.LanguageManager.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22

33
<PropertyGroup>
44
<OutputType>Exe</OutputType>
5-
<TargetFramework>net9.0</TargetFramework>
5+
<TargetFramework>net10.0</TargetFramework>
66
<Title>YAFNET.LanguageManager</Title>
7-
<Version>1.0.7</Version>
7+
<Version>1.0.8</Version>
88
<Description>Tool for synchronization, packing and automatic translation of YAF.NET language file</Description>
99
<Copyright>Copyright © YetAnotherForum.NET</Copyright>
1010
</PropertyGroup>

0 commit comments

Comments
 (0)