Ejemplo n.º 1
0
        internal void OnCommandRequest(CommandRequestOp op)
        {
            if (!componentSpecificDispatchers.TryGetValue(op.Request.ComponentId, out var specificDispatcher))
            {
                throw new UnknownComponentIdException(
                          string.Format(Errors.UnknownComponentIdError, op.GetType(), op.Request.ComponentId));
            }

            specificDispatcher.OnCommandRequest(op);
        }
Ejemplo n.º 2
0
        private void OnCommandRequest(CommandRequestOp op)
        {
            if (!componentSpecificDispatchers.TryGetValue(op.Request.ComponentId, out var specificDispatcher))
            {
                worker.LogDispatcher.HandleLog(LogType.Error,
                                               new LogEvent(UnknownComponentIdError).WithField("Op Type", op.GetType())
                                               .WithField("ComponentId", op.Request.ComponentId));
                return;
            }

            specificDispatcher.OnCommandRequest(op);
        }