ylbtech-System.Timers.cs
1.返回顶部
1、
#region 程序集 System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
// C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5.2\System.dll
#endregion using System.ComponentModel; namespace System.Timers
{
//
// 摘要:
// 在设定的间隔之后生成事件,带有生成重复事件的选项。若要浏览此类型的.NET Framework 源代码,请参阅 Reference Source。
[DefaultEvent("Elapsed")]
[DefaultProperty("Interval")]
public class Timer : Component, ISupportInitialize
{
//
// 摘要:
// 初始化 System.Timers.Timer 类的新实例,并将所有属性设置为初始值。
public Timer();
//
// 摘要:
// 初始化 System.Timers.Timer 类的新实例,并将 System.Timers.Timer.Interval 属性设置为指定的毫秒数。
//
// 参数:
// interval:
// 事件之间经过的时间(以毫秒为单位)。 该值必须大于零且小于或等于 System.Int32.MaxValue。
//
// 异常:
// T:System.ArgumentException:
// 值 interval 参数是否小于或等于零,或者大于 System.Int32.MaxValue。
public Timer(double interval); //
// 摘要:
// 获取或设置一个布尔值,该值指示 System.Timers.Timer 是否应只引发一次 System.Timers.Timer.Elapsed 事件((false)
// 或重复 (true))。
//
// 返回结果:
// 如果 System.Timers.Timer 应在每次间隔结束时引发 System.Timers.Timer.Elapsed 事件,则为 true;如果它仅在间隔第一次结束后引发一次
// System.Timers.Timer.Elapsed 事件,则为 false。 默认值为 true。
[Category("Behavior")]
[DefaultValue(true)]
[TimersDescription("TimerAutoReset")]
public bool AutoReset { get; set; }
//
// 摘要:
// 获取或设置一个值,该值指示 System.Timers.Timer 是否应引发 System.Timers.Timer.Elapsed 事件。
//
// 返回结果:
// 如果 System.Timers.Timer 应引发 System.Timers.Timer.Elapsed 事件,则为 true;否则,为 false。
// 默认值为 false。
//
// 异常:
// T:System.ObjectDisposedException:
// 无法设置此属性,因为计时器已被释放。
//
// T:System.ArgumentException:
// System.Timers.Timer.Interval 属性设置为一个值大于 System.Int32.MaxValue 启用计时器之前。
[Category("Behavior")]
[DefaultValue(false)]
[TimersDescription("TimerEnabled")]
public bool Enabled { get; set; }
//
// 摘要:
// 获取或设置引发 System.Timers.Timer.Elapsed 事件的间隔(以毫秒为单位)。
//
// 返回结果:
// System.Timers.Timer.Elapsed 事件之间经过的时间(以毫秒为单位)。 该值必须大于零并小于或等于 System.Int32.MaxValue。
// 默认值为 100 毫秒。
//
// 异常:
// T:System.ArgumentException:
// 时间间隔小于或等于零。- 或 -间隔值大于 System.Int32.MaxValue, ,和计时器当前处于启用状态。 (如果当前未启用计时器,不是引发异常之前将变为启用状态。)
[Category("Behavior")]
[DefaultValue()]
[SettingsBindable(true)]
[TimersDescription("TimerInterval")]
public double Interval { get; set; }
//
// 摘要:
// 获取或设置在设计模式中将 System.Timers.Timer 绑定到其容器的站点。
//
// 返回结果:
// System.ComponentModel.ISite 界面,此界面表示将 System.Timers.Timer 对象绑定到其容器的站点。
public override ISite Site { get; set; }
//
// 摘要:
// 获取或设置对象,该对象用于在间隔过后封送发出的事件处理程序调用。
//
// 返回结果:
// System.ComponentModel.ISynchronizeInvoke,它表示对象,该对象用于在间隔过后封送发出的事件处理程序调用。 默认值为
// null。
[Browsable(false)]
[DefaultValue(null)]
[TimersDescription("TimerSynchronizingObject")]
public ISynchronizeInvoke SynchronizingObject { get; set; } //
// 摘要:
// 达到间隔时发生。
[Category("Behavior")]
[TimersDescription("TimerIntervalElapsed")]
public event ElapsedEventHandler Elapsed; //
// 摘要:
// 开始用于窗体或由其他组件使用的 System.Timers.Timer 的运行时初始化。
public void BeginInit();
//
// 摘要:
// 释放由 System.Timers.Timer 占用的资源。
public void Close();
//
// 摘要:
// 结束用于窗体或由其他组件使用的 System.Timers.Timer 的运行时初始化。
public void EndInit();
//
// 摘要:
// 通过将 System.Timers.Timer.Enabled 设置为 true 开始引发 System.Timers.Timer.Elapsed 事件。
//
// 异常:
// T:System.ArgumentOutOfRangeException:
// 创建 System.Timers.Timer,使其时间间隔等于或大于 System.Int32.MaxValue + 1,或将其时间间隔设置为小于零。
public void Start();
//
// 摘要:
// 通过将 System.Timers.Timer.Enabled 设置为 false 停止引发 System.Timers.Timer.Elapsed 事件。
public void Stop();
//
// 摘要:
// 释放由当前 System.Timers.Timer 使用的所有资源。
//
// 参数:
// disposing:
// 若要释放托管资源和非托管资源,则为 true;若仅释放非托管资源,则为 false。
protected override void Dispose(bool disposing);
}
}
2、
2.返回顶部
 
3.返回顶部
 
4.返回顶部
 
5.返回顶部
 
 
6.返回顶部
 
作者:ylbtech
出处:http://ylbtech.cnblogs.com/
本文版权归作者和博客园共有,欢迎转载,但未经作者同意必须保留此段声明,且在文章页面明显位置给出原文连接,否则保留追究法律责任的权利。

.NETFramework:Timers的更多相关文章

  1. .NETFramework:DateTimeOffset

    ylbtech-.NETFramework:DateTimeOffset 表示一个时间点,通常相对于协调世界时(UTC)的日期和时间来表示. 1.程序集 mscorlib, Version=4.0.0 ...

  2. .NETFramework:Random

    ylbtech-.NETFramework:Random 1.程序集 mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c ...

  3. .NETFramework:ConfigurationManager

    ylbtech-.NETFramework:ConfigurationManager 1.程序集 System.Configuration, Version=4.0.0.0, Culture=neut ...

  4. .NETFramework:StringBuilder

    ylbtech-.NETFramework:StringBuilder 1.程序集 mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken ...

  5. .NETFramework:WebClient

    ylbtech-.NETFramework:WebClient 1.程序集 System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5 ...

  6. .NETFramework:Stream

    ylbtech-.NETFramework:Stream 1.返回顶部 1. #region 程序集 mscorlib, Version=4.0.0.0, Culture=neutral, Publi ...

  7. .NETFramework:HttpContext

    ylbtech-.NETFramework:HttpContext 1.返回顶部 1. #region 程序集 System.Web, Version=4.0.0.0, Culture=neutral ...

  8. .NETFramework:Encoding

    ylbtech-.NETFramework:Encoding 1.返回顶部 1. #region 程序集 mscorlib, Version=4.0.0.0, Culture=neutral, Pub ...

  9. .NETFramework:HttpRuntime

    ylbtech-.NETFramework:HttpRuntime 1.返回顶部 1. #region 程序集 System.Web, Version=4.0.0.0, Culture=neutral ...

随机推荐

  1. ios 清理缓存(EGO)

    一段清理缓存的代码例如以下: dispatch_async( dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT,) , ^{ NSSt ...

  2. vue2.0 自定义 弹窗(MessageBox)组件

    组件模板 src/components/MessageBox/index.vue <!-- 自定义 MessageBox 组件 --> <template> <div c ...

  3. Java如何Attachment源码

    该文章教你如何在Eclipse中Attachment源码,学到了不少东西. http://jingyan.baidu.com/article/1709ad80b107f64635c4f040.html ...

  4. ARM体系结构与编程-5

    GET通经常使用于包括定义常量的源文件. 比如:GET 2440addr.inc 用AREA定义一个段.ENTRY用于指定程序的入口点,END用于告诉汇编器源文件已经结束. 比如: AREA init ...

  5. 微信热补丁 Tinker 的实践演进之路

    http://dev.qq.com/topic/57ad7a70eaed47bb2699e68e http://dev.qq.com/topic/57a30878ac3a1fb613dd40eb ht ...

  6. Django-celery分布式任务

    昨天一个很好的面试官问我你在python中怎么实现定时任务呢?我没回答好,我问了下原来有个叫celery的东西,感觉挺好用的 Celery 是一个 基于python开发的分布式异步消息任务队列,通过它 ...

  7. kubernetes里的各种port解惑

    系列目录 在编排kubernetes时,Deployment的Pod项有containerPort,Service文件里的port,targetPort, nodePort,这些pod概念有些时候可能 ...

  8. 在fedora25x86下编译opencv的Android版本的过程记录

    准备材料: 1. 32位的Fedora25(不建议使用64位系统----64位系统下也是可以编译的,这里为了简单起见,考虑使用32位操作系统.事实上,本人在64位操作系统下也做了尝试,也完成了编译.) ...

  9. 深入Garbage First垃圾收集器(一)术语

    Garbage垃圾收集器的原理,在这篇博客中有讲到,可以拿来参考下, Getting Started with the G1 Garbage Collector(译) 另外在这篇博客中也有讲到很多垃圾 ...

  10. 修改live555支持mpeg2ts RTSP拉流,附代码

    在很早之前的博客<用EasyDarwin进行IPTV rtsp mpeg-ts smil流的转发和分发直播服务>中,我们介绍到如何将live555支持mpeg2ts拉流,这个在IPTV领域 ...