internal void OnComponentUpdate(ComponentUpdateOp op)
        {
            if (!componentSpecificDispatchers.TryGetValue(op.Update.ComponentId, out var specificDispatcher))
            {
                throw new UnknownComponentIdException(
                          string.Format(Errors.UnknownComponentIdError, op.GetType(), op.Update.ComponentId));
            }

            specificDispatcher.OnComponentUpdate(op);
        }
示例#2
0
        private void OnComponentUpdate(ComponentUpdateOp op)
        {
            if (!componentSpecificDispatchers.TryGetValue(op.Update.ComponentId, out var specificDispatcher))
            {
                worker.LogDispatcher.HandleLog(LogType.Error,
                                               new LogEvent(UnknownComponentIdError).WithField("Op Type", op.GetType())
                                               .WithField("ComponentId", op.Update.ComponentId));
                return;
            }

            specificDispatcher.OnComponentUpdate(op);
        }