Esempio n. 1
0
        /// <summary>
        /// Gets the observer namespace name.
        /// </summary>
        /// <value>The observer namespace name.</value>

        public static string GetNamespace(this ObserverEnum observerEnum)
        {
            switch (observerEnum)
            {
            case ObserverEnum.TIMER_INTERVAL:
            case ObserverEnum.TIMER_CRON:
            case ObserverEnum.TIMER_ISO8601:
                return("timer");
            }

            throw new ArgumentException();
        }
Esempio n. 2
0
        /// <summary>
        /// Gets the implementation clazz.
        /// </summary>
        /// <value>The implementation clazz.</value>

        public static Type GetImplementationType(this ObserverEnum observerEnum)
        {
            switch (observerEnum)
            {
            case ObserverEnum.TIMER_INTERVAL:
                return(typeof(TimerIntervalObserverFactory));

            case ObserverEnum.TIMER_CRON:
                return(typeof(TimerAtObserverFactory));

            case ObserverEnum.TIMER_ISO8601:
                return(typeof(TimerScheduleObserverFactory));
            }

            throw new ArgumentException();
        }
Esempio n. 3
0
        /// <summary>
        /// Gets the name.
        /// </summary>
        /// <value>The name.</value>

        public static string GetName(this ObserverEnum observerEnum)
        {
            switch (observerEnum)
            {
            case ObserverEnum.TIMER_INTERVAL:
                return("interval");

            case ObserverEnum.TIMER_CRON:
                return("at");

            case ObserverEnum.TIMER_ISO8601:
                return("schedule");
            }

            throw new ArgumentException();
        }