Пример #1
0
        private static IEventProcessStrategy GetEventProcessStrategy(string action)
        {
            var eventProcessStrategy = default(IEventProcessStrategy);

            switch (action)
            {
            case "create":
                eventProcessStrategy = new CreateEventStrategy();
                break;
            }
            return(eventProcessStrategy);
        }
        private static IEventProcessorStrategy GetEventProcessorStrategy(string action)
        {
            var eventProcessStrategy = default(IEventProcessorStrategy);

            var gitEvents = Enums.Parse <Enum.GitEvents>(action);

            switch (gitEvents)
            {
            case Enum.GitEvents.Create:
                eventProcessStrategy = new CreateEventStrategy();
                break;
            }
            return(eventProcessStrategy);
        }