Exemplo n.º 1
0
        /// <summary>
        /// Returns the representation of the <see cref="TimerInfo"/> used for XML serialization.
        /// </summary>
        /// <returns>The representation of the <see cref="TimerInfo"/> used for XML serialization.</returns>
        public override TimerInfo ToTimerInfo()
        {
            TimerInfo timerInfo = base.ToTimerInfo();

            timerInfo.TimerStart = TimerStartInfo.FromTimerStart(this.TimerStart);
            timerInfo.Options    = TimerOptionsInfo.FromTimerOptions(this.Options);
            return(timerInfo);
        }
Exemplo n.º 2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="TimerStart"/> class.
        /// </summary>
        /// <param name="timerStartInfo">A <see cref="TimerStartInfo"/>.</param>
        private TimerStart(TimerStartInfo timerStartInfo)
        {
            if (timerStartInfo == null)
            {
                throw new ArgumentNullException("timerStartInfo");
            }

            this.timerStartToken = timerStartInfo.TimerStartToken;
        }
Exemplo n.º 3
0
        /// <summary>
        /// Returns a <see cref="TimerStart"/> for a <see cref="TimerStartInfo"/>.
        /// </summary>
        /// <param name="timerStartInfo">A <see cref="TimerStartInfo"/>.</param>
        /// <returns>The <see cref="TimerStart"/> for the <see cref="TimerStartInfo"/>.</returns>
        public static TimerStart FromTimerStartInfo(TimerStartInfo timerStartInfo)
        {
            if (timerStartInfo == null)
            {
                return(null);
            }

            return(new TimerStart(timerStartInfo));
        }