* Start working on nullable checks

help me

* Update GlobalConfig.cs

* Finish initial fixup round

* nullability code review
This commit is contained in:
Łukasz Domeradzki
2020-08-22 21:41:01 +02:00
committed by GitHub
parent e5f64ec9dd
commit 9fc1ea65a5
91 changed files with 1996 additions and 2808 deletions

View File

@@ -25,7 +25,6 @@ using System.IO;
using System.Security.AccessControl;
using System.Threading;
using System.Threading.Tasks;
using JetBrains.Annotations;
namespace ArchiSteamFarm.Helpers {
internal sealed class CrossProcessFileBasedSemaphore : ICrossProcessSemaphore {
@@ -34,9 +33,9 @@ namespace ArchiSteamFarm.Helpers {
private readonly string FilePath;
private readonly SemaphoreSlim LocalSemaphore = new SemaphoreSlim(1, 1);
private FileStream FileLock;
private FileStream? FileLock;
internal CrossProcessFileBasedSemaphore([NotNull] string name) {
internal CrossProcessFileBasedSemaphore(string name) {
if (string.IsNullOrEmpty(name)) {
throw new ArgumentNullException(nameof(name));
}
@@ -151,7 +150,7 @@ namespace ArchiSteamFarm.Helpers {
return;
}
string directoryPath = Path.GetDirectoryName(FilePath);
string? directoryPath = Path.GetDirectoryName(FilePath);
if (string.IsNullOrEmpty(directoryPath)) {
ASF.ArchiLogger.LogNullError(nameof(directoryPath));