Ejemplo n.º 1
0
 public void Handle(FunctionUpdatedEvent message)
 {
     if (message.IsPriviate)
     {
         return;
     }
     this.Handle(message.AcSession, message.Input, false);
 }
Ejemplo n.º 2
0
            public void Handle(FunctionUpdatedEvent message)
            {
                var           acDomain          = _set._acDomain;
                var           viewDicByFunction = _set._viewDicByFunction;
                FunctionState newKey;

                if (!acDomain.FunctionSet.TryGetFunction(message.Source.Id, out newKey))
                {
                    throw new AnycmdException("意外的功能标识" + message.Source.Id);
                }
                var oldKey = viewDicByFunction.Keys.FirstOrDefault(a => a.Id == newKey.Id);

                if (oldKey != null && !viewDicByFunction.ContainsKey(newKey))
                {
                    viewDicByFunction.Add(newKey, viewDicByFunction[oldKey]);
                    viewDicByFunction.Remove(oldKey);
                }
            }