Complete refactor, reasync, rebuild listener
This commit is contained in:
@@ -1,25 +1,30 @@
|
||||
using System.IO;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace ntfysh_client
|
||||
{
|
||||
public class SubscribedTopic
|
||||
{
|
||||
public SubscribedTopic(string topicId, string serverUrl, string username, string password, StreamReader stream)
|
||||
public SubscribedTopic(string topicId, string serverUrl, string? username, string? password, Task runner, CancellationTokenSource runnerCanceller)
|
||||
{
|
||||
TopicId = topicId;
|
||||
ServerUrl = serverUrl;
|
||||
Username = username;
|
||||
Password = password;
|
||||
Stream = stream;
|
||||
Runner = runner;
|
||||
RunnerCanceller = runnerCanceller;
|
||||
}
|
||||
|
||||
public string TopicId { get; }
|
||||
public string ServerUrl { get; }
|
||||
public string Username { get; }
|
||||
public string Password { get; }
|
||||
public string? Username { get; }
|
||||
public string? Password { get; }
|
||||
|
||||
[JsonIgnore]
|
||||
public StreamReader Stream { get; }
|
||||
public Task Runner { get; }
|
||||
|
||||
[JsonIgnore]
|
||||
public CancellationTokenSource RunnerCanceller { get; }
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user