Пример #1
0
    public override void ProcessHandler(RChainHandler <T> handler, T dataToHandle)
    {
        RChainHandler <T> currentHandler = handler;

        while (currentHandler != null)
        {
            if (handler.Handle(dataToHandle))
            {
                return;
            }
            else
            {
                currentHandler = currentHandler.NextHandlerInChain;
            }
        }
    }
Пример #2
0
    public override void ProcessHandler(RChainHandler <T> handler, T dataToHandle)
    {
        RChainHandler <T> currentHandler = handler;

        while (currentHandler != null)
        {
            handler.Handle(dataToHandle);
            currentHandler = currentHandler.NextHandlerInChain;
            watchdogCounter++;
            if (watchdogCounter > WATCHDOG_PROCESS_WARNING)
            {
                NaaraLogger.LogError(WATCHDOG_PROCESS_WARNING_MESSAGE);
                return;
            }
        }
    }