Nie możesz wybrać więcej, niż 25 tematów
Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.
|
- using HealthMonitor.Service.Resolver;
- using HealthMonitor.Service.Resolver.Interface;
- using Microsoft.Extensions.Logging;
- using System;
- using System.Collections.Concurrent;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
-
- namespace HealthMonitor.Service.Sub
- {
- public class MsgQueueManager: ConcurrentQueue<PackageMsgModel>
- {
- private readonly ILogger<MsgQueueManager> _logger;
- private readonly BloodpressResolver _resolver;
- public MsgQueueManager(ILogger<MsgQueueManager> logger, BloodpressResolver resolver)
- {
- _logger = logger;
- _resolver = resolver;
- }
-
- public IResolver? GetMsgResolver()
- {
- TryDequeue(out var msg);
- if (msg == null)
- {
- return null;
- }
- _resolver.SetResolveInfo(msg);
-
- return _resolver;
- }
- }
- }
|