Exemple #1
0
        /// <summary>
        /// 创建一个新的时间片
        /// </summary>
        /// <param name="delayTimeSpan"></param>
        /// <param name="intervalTimeSpan"></param>
        /// <param name="iCount"></param>
        /// <param name="timerCallback"></param>
        /// <returns></returns>
        public static TimeSlice StartTimeSlice(TimerPriority processPriority, TimeSpan delayTimeSpan, TimeSpan intervalTimeSpan, long iCount, TimeSliceCallback timerCallback)
        {
            TimeSlice tTimer = new DelayCallTimer(processPriority, delayTimeSpan, intervalTimeSpan, iCount, timerCallback);

            tTimer.Start();

            return(tTimer);
        }
 public void CallbackTest()
 {
     TimerPriority processPriority = new TimerPriority(); // TODO: 初始化为适当的值
     TimeSpan delayTimeSpan = new TimeSpan(); // TODO: 初始化为适当的值
     TimeSpan intervalTimeSpan = new TimeSpan(); // TODO: 初始化为适当的值
     long iCount = 0; // TODO: 初始化为适当的值
     TimeSliceCallback timerCallback = null; // TODO: 初始化为适当的值
     DelayCallTimer target = new DelayCallTimer( processPriority, delayTimeSpan, intervalTimeSpan, iCount, timerCallback ); // TODO: 初始化为适当的值
     TimeSliceCallback actual;
     actual = target.Callback;
     Assert.Inconclusive( "验证此测试方法的正确性。" );
 }
 public void ToStringTest()
 {
     TimerPriority processPriority = new TimerPriority(); // TODO: 初始化为适当的值
     TimeSpan delayTimeSpan = new TimeSpan(); // TODO: 初始化为适当的值
     TimeSpan intervalTimeSpan = new TimeSpan(); // TODO: 初始化为适当的值
     long iCount = 0; // TODO: 初始化为适当的值
     TimeSliceCallback timerCallback = null; // TODO: 初始化为适当的值
     DelayCallTimer target = new DelayCallTimer( processPriority, delayTimeSpan, intervalTimeSpan, iCount, timerCallback ); // TODO: 初始化为适当的值
     string expected = string.Empty; // TODO: 初始化为适当的值
     string actual;
     actual = target.ToString();
     Assert.AreEqual( expected, actual );
     Assert.Inconclusive( "验证此测试方法的正确性。" );
 }