public static IHolidayStrategy LocateHolidayStrategyForName(string name) { string strategyPrefix = name.ToUpperInvariant().Replace("-", "_"); string strategyName = NAMESPACE + "." + strategyPrefix + HOLIDAY_STRATEGY_NAME; IHolidayStrategy holidayStrategy = CreateObjectInstance <IHolidayStrategy>(strategyName); if (holidayStrategy == null) { holidayStrategy = new DefaultHolidayStrategy(); } return(holidayStrategy); }
public EmployeeStaffingHolidayStrategy(StaffingParameters parameters) { _parameters = parameters; //TODO: There should be a better way to extend without needed to use the LocaleImplemetationLocator manually _innerHolidayStrategy = LocaleImplementationLocator.FindImplementationOf <IHolidayStrategy>(_parameters.Locale); }