Hourglass.Timing.TimerOptions.FromTimerOptions C# (CSharp) Method

FromTimerOptions() public static method

Returns a TimerOptions for the specified TimerOptions, or null if the specified TimerOptions is null.
public static FromTimerOptions ( TimerOptions options ) : TimerOptions
options TimerOptions A .
return TimerOptions
        public static TimerOptions FromTimerOptions(TimerOptions options)
        {
            return options != null ? new TimerOptions(options) : null;
        }

Usage Example

示例#1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="Timer"/> class.
        /// </summary>
        /// <param name="options">Configuration data for this timer.</param>
        public Timer(TimerOptions options)
        {
            if (options == null)
            {
                throw new ArgumentNullException("options");
            }

            this.timerStart = null;
            this.options    = TimerOptions.FromTimerOptions(options);

            this.UpdateHourglassTimer();
        }