mirror of https://github.com/ErsatzTV/ErsatzTV.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
15 lines
546 B
15 lines
546 B
using System.Collections.Concurrent; |
|
using ErsatzTV.Core.Interfaces.Troubleshooting; |
|
|
|
namespace ErsatzTV.Core.Troubleshooting; |
|
|
|
public class TroubleshootingNotifier : ITroubleshootingNotifier |
|
{ |
|
private readonly ConcurrentDictionary<Guid, bool> _failedSessions = new(); |
|
|
|
public bool IsFailed(Guid sessionId) => _failedSessions.TryGetValue(sessionId, out _); |
|
|
|
public void NotifyFailed(Guid sessionId) => _failedSessions[sessionId] = true; |
|
|
|
public void RemoveSession(Guid sessionId) => _failedSessions.TryRemove(sessionId, out _); |
|
}
|
|
|