Exemplo n.º 1
0
        public static IScheduleBuildByVM Create(ScheduleBuildBy triggerBy) {
            //var types = Assembly.GetExecutingAssembly().GetTypes()
            //    .Where(t => t.IsInstanceOfType(typeof(ITriggerByVM)) );

            switch (triggerBy) {
                case ScheduleBuildBy.Cron:
                    return new CronTriggerViewModel();
                case ScheduleBuildBy.Simple:
                    return new SimpleTriggerViewModel();
                default:
                    return null;
            }
        }
Exemplo n.º 2
0
        public static IScheduleBuildByVM Create(ScheduleBuildBy triggerBy)
        {
            //var types = Assembly.GetExecutingAssembly().GetTypes()
            //    .Where(t => t.IsInstanceOfType(typeof(ITriggerByVM)) );

            switch (triggerBy)
            {
            case ScheduleBuildBy.Cron:
                return(new CronTriggerViewModel());

            case ScheduleBuildBy.Simple:
                return(new SimpleTriggerViewModel());

            default:
                return(null);
            }
        }