net8, language features, bugfixes
This commit is contained in:
parent
1591618c2c
commit
ce99053a10
353 changed files with 3245 additions and 3944 deletions
|
|
@ -5,6 +5,7 @@ using Microsoft.Extensions.Logging;
|
|||
using System.Collections.Concurrent;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Runtime.Versioning;
|
||||
using System.Security.AccessControl;
|
||||
using System.Security.Principal;
|
||||
using System.Windows;
|
||||
|
|
@ -12,17 +13,13 @@ using MessageBoxOptions = System.Windows.MessageBoxOptions;
|
|||
|
||||
namespace Insight.Remote.Windows.Services;
|
||||
|
||||
internal class WinFileProvider : IFileProvider
|
||||
[SupportedOSPlatform("windows")]
|
||||
internal class WinFileProvider(ILogger<WinFileProvider> logger) : IFileProvider
|
||||
{
|
||||
private static MessageBoxResult? _result;
|
||||
private static readonly ConcurrentDictionary<string, FileStream> _partialTransfers = new();
|
||||
private static readonly SemaphoreSlim _writeLock = new(1, 1);
|
||||
private readonly ILogger<WinFileProvider> _logger;
|
||||
|
||||
public WinFileProvider(ILogger<WinFileProvider> logger)
|
||||
{
|
||||
_logger = logger;
|
||||
}
|
||||
private readonly ILogger<WinFileProvider> _logger = logger;
|
||||
|
||||
public string GetBaseDirectory()
|
||||
{
|
||||
|
|
@ -89,7 +86,7 @@ internal class WinFileProvider : IFileProvider
|
|||
}
|
||||
}
|
||||
|
||||
public async Task UploadFile(FileUpload fileUpload, Streamer viewer, Action<double> progressUpdateCallback, CancellationToken cancelToken)
|
||||
public Task UploadFile(FileUpload fileUpload, Streamer viewer, Action<double> progressUpdateCallback, CancellationToken cancelToken)
|
||||
{
|
||||
try
|
||||
{
|
||||
|
|
@ -99,9 +96,11 @@ internal class WinFileProvider : IFileProvider
|
|||
{
|
||||
_logger.LogError(ex, "Error while uploading file.");
|
||||
}
|
||||
|
||||
return Task.CompletedTask;
|
||||
}
|
||||
|
||||
private void SetFileOrFolderPermissions(string path)
|
||||
private static void SetFileOrFolderPermissions(string path)
|
||||
{
|
||||
FileSystemSecurity ds;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue