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.
|
- 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 MsgManager
- {
- private readonly BloodpressResolver _resolver;
- private readonly ILogger<MsgManager> _logger;
- private PackageMsgModel _msg = default!;
- public MsgManager(ILogger<MsgManager> logger, BloodpressResolver resolver)
- {
- _logger = logger;
- _resolver = resolver;
- }
-
- public void EnqueueMsg(PackageMsgModel msg)
- {
- _msg = msg;
- Console.WriteLine($"GetMsgResolver-{_msg.MessageId}");
- }
-
-
- public IResolver? GetMsgResolver()
- {
- if (_msg == null)
- {
- return null;
- }
- Console.WriteLine($"GetMsgResolver-{_msg.MessageId}");
- _resolver.SetResolveInfo(_msg);
- _msg = default!;
- return _resolver;
- }
- //public IResolver? GetMsgResolver(PackageMsgModel msg)
- //{
- // if (_msg == null)
- // {
- // return null;
- // }
- // Console.WriteLine($"GetMsgResolver-{_msg.MessageId}");
- // _resolver.SetResolveInfo(msg);
- // _msg = default!;
- // return _resolver;
- //}
- }
- }
|