Prepare Pro 1.0.1 imports and license tooling
This commit is contained in:
1 parent
62f28c5621
commit
0b5017739c
13 files changed
+437
-48
No files matched your search
@@ -0,0 +1,22 @@
|
||||
using System.Collections.Concurrent;
|
||||
|
||||
namespace LMEMappeCatastaliApp.Services;
|
||||
|
||||
public sealed class IncomingFileService
|
||||
{
|
||||
private readonly ConcurrentQueue<IncomingFile> _files = new();
|
||||
|
||||
public static IncomingFileService Shared { get; } = new();
|
||||
|
||||
public event Action? FileAvailable;
|
||||
|
||||
public void Enqueue(IncomingFile file)
|
||||
{
|
||||
_files.Enqueue(file);
|
||||
MainThread.BeginInvokeOnMainThread(() => FileAvailable?.Invoke());
|
||||
}
|
||||
|
||||
public bool TryDequeue(out IncomingFile? file) => _files.TryDequeue(out file);
|
||||
}
|
||||
|
||||
public sealed record IncomingFile(string Path, string FileName, string? ContentType);
|
||||
Reference in new issue
Block a user