当前位置: 首页>>代码示例>>C#>>正文


C# IntervalUnit类代码示例

本文整理汇总了C#中IntervalUnit的典型用法代码示例。如果您正苦于以下问题:C# IntervalUnit类的具体用法?C# IntervalUnit怎么用?C# IntervalUnit使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


IntervalUnit类属于命名空间,在下文中一共展示了IntervalUnit类的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: RecurringTimeFrequency

		public RecurringTimeFrequency(int interval, IntervalUnit unit, TimeSpan startTime, TimeSpan endTime)
		{
			this.Interval = interval;
			this.Unit = unit;
			this.StartTime = startTime;
			this.EndTime = endTime;
		}
开发者ID:jerryshi2007,项目名称:AK47Source,代码行数:7,代码来源:RecurringTimeFrequency.cs

示例2: CalendarIntervalTriggerImpl

 /// <summary>
 /// Create a <see cref="CalendarIntervalTriggerImpl" /> that will occur immediately, and
 /// repeat at the the given interval.
 /// </summary>
 /// <param name="name">Name for the trigger instance.</param>
 /// <param name="intervalUnit">The repeat interval unit (minutes, days, months, etc).</param>
 /// <param name="repeatInterval">The number of milliseconds to pause between the repeat firing.</param>
 public CalendarIntervalTriggerImpl(string name, IntervalUnit intervalUnit, int repeatInterval)
     : this(name, null, intervalUnit, repeatInterval)
 {
 }
开发者ID:bittercoder,项目名称:quartznet,代码行数:11,代码来源:CalendarIntervalTriggerImpl.cs

示例3: TranslatedAdd

 private static DateTimeOffset TranslatedAdd(DateTimeOffset date, IntervalUnit unit, int amountToAdd)
 {
     switch (unit)
     {
         case IntervalUnit.Day:
             return date.AddDays(amountToAdd);
         case IntervalUnit.Hour:
             return date.AddHours(amountToAdd);
         case IntervalUnit.Minute:
             return date.AddMinutes(amountToAdd);
         case IntervalUnit.Month:
             return date.AddMonths(amountToAdd);
         case IntervalUnit.Second:
             return date.AddSeconds(amountToAdd);
         case IntervalUnit.Millisecond:
             return date.AddMilliseconds(amountToAdd);
         case IntervalUnit.Week:
             return date.AddDays(amountToAdd*7);
         case IntervalUnit.Year:
             return date.AddYears(amountToAdd);
         default:
             throw new ArgumentException("Unknown IntervalUnit");
     }
 }
开发者ID:quartznet,项目名称:quartznet,代码行数:24,代码来源:DateBuilder.cs

示例4: FutureDate

 public static DateTimeOffset FutureDate(int interval, IntervalUnit unit)
 {
     return TranslatedAdd(SystemTime.Now(), unit, interval);
 }
开发者ID:quartznet,项目名称:quartznet,代码行数:4,代码来源:DateBuilder.cs

示例5: DailyTimeIntervalTriggerImpl

 /// <summary>
 /// Create a <see cref="IDailyTimeIntervalTrigger" /> that will occur at the given time,
 /// fire the identified job and repeat at the given
 /// interval until the given end time.
 /// </summary>
 /// <param name="name"></param>
 /// <param name="group"></param>
 /// <param name="jobName"></param>
 /// <param name="jobGroup"></param>
 /// <param name="startTimeUtc">A <see cref="DateTimeOffset" /> set to the time for the <see cref="ITrigger" />to fire.</param>
 /// <param name="endTimeUtc">A <see cref="DateTimeOffset" /> set to the time for the <see cref="ITrigger" />to quit repeat firing.</param>
 /// <param name="startTimeOfDayUtc">The <see cref="TimeOfDay" /> that the repeating should begin occurring.</param>
 /// <param name="endTimeOfDayUtc">The <see cref="TimeOfDay" /> that the repeating should stop occurring.</param>
 /// <param name="intervalUnit">The repeat interval unit. The only intervals that are valid for this type of trigger are
 /// <see cref="IntervalUnit.Second"/>, <see cref="IntervalUnit.Minute"/>, and <see cref="IntervalUnit.Hour"/>.</param>
 /// <param name="repeatInterval">The number of milliseconds to pause between the repeat firing.</param>
 public DailyTimeIntervalTriggerImpl(string name, string group, string jobName,
                                     string jobGroup, DateTimeOffset startTimeUtc, DateTimeOffset? endTimeUtc,
                                     TimeOfDay startTimeOfDayUtc, TimeOfDay endTimeOfDayUtc,
                                     IntervalUnit intervalUnit, int repeatInterval)
     : base(name, group, jobName, jobGroup)
 {
     StartTimeUtc = startTimeUtc;
     EndTimeUtc = endTimeUtc;
     RepeatIntervalUnit = intervalUnit;
     RepeatInterval = repeatInterval;
     StartTimeOfDay = startTimeOfDayUtc;
     EndTimeOfDay = endTimeOfDayUtc;
 }
开发者ID:jvilalta,项目名称:quartznet,代码行数:29,代码来源:DailyTimeIntervalTriggerImpl.cs

示例6: DateAdd

 public static DateTimeOffset DateAdd(DateTimeOffset timestamp, int interval, IntervalUnit intervalUnit)
 {
     throw Invalid();
 }
开发者ID:neuecc,项目名称:LINQ-to-BigQuery,代码行数:4,代码来源:BqFunc.DateAndTime.cs

示例7: CreateProduct

 public IProduct CreateProduct(int ProductFamilyID, string Name, string Handle, int PriceInCents, int Interval, IntervalUnit IntervalUnit, string AccountingCode, string Description)
 {
     throw new NotImplementedException();
 }
开发者ID:christensena,项目名称:TDDIntro,代码行数:4,代码来源:ChargifyConnectUpTheWazooNotAnAdapter.cs

示例8: Interval

 /// <summary>
 /// Constructs a interval given an value in milliseconds
 /// </summary>
 public Interval(int value)
 {
     _value = value;
     _mode = IntervalUnit.Millisecond;
     AsTimeSpan = TimeSpan.FromMilliseconds(value);
 }
开发者ID:textmetal,项目名称:main,代码行数:9,代码来源:Interval.cs


注:本文中的IntervalUnit类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。