Пример #1
0
        private StoryAction DefImpl_Dispatch(StoryAction action)
        {
            // Apply action to stories
            ApplyActionToStories(action, entryStory);

            // Send update to everyone that have mapped their props
            if (mapStoriesToPropsHandlers != null)
            {
                mapStoriesToPropsHandlers(entryStory);
            }

            // Send action forward to listeners
            if (actionListeners != null)
            {
                actionListeners(action);
            }

            action.ReleaseActionForReuse();
            return(action);
        }
        private StoryAction DefImpl_Dispatch(StoryAction action)
        {
            // Apply action to stories
            ApplyActionToStories(action, entryStory);

            // Send update to everyone that have mapped their props
            for (var i = 0; i < mapStoriesToPropsHandlers.Count; ++i)
            {
                mapStoriesToPropsHandlers[i](entryStory);
            }

            // Send action forward to listeners
            for (var i = 0; i < actionListeners.Count; ++i)
            {
                actionListeners[i](action);
            }

            action.ReleaseActionForReuse();
            return(action);
        }