Esempio n. 1
0
 public static void UpdateState(Guid ChannelId, LiveStateType state)
 {
     lock (lockObj)
     {
         if (dictState == null)
         {
             dictState = new List <LiveStateDto>();
         }
         else
         {
             var fist = dictState.FirstOrDefault(b => b.Id == ChannelId);
             if (fist == null)
             {
                 dictState.Add(new LiveStateDto()
                 {
                     Id = ChannelId, State = state
                 });
             }
             else
             {
                 fist.State = state;
             }
         }
     }
 }
Esempio n. 2
0
 public void PushAMsgIn(Guid channeId, Guid Id, string content, LiveStateType liveStateType)
 {
     LogDtos.Enqueue(
         new LogDto()
     {
         ChanneId    = channeId,
         FactoryCode = _localSettings.FactoryCode,
         Id          = Id,
         LogContent  = content,
         LogType     = liveStateType
     }
         );
 }