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. python datetime获取几分钟、小时、天之前的时间

    import datetime print ((datetime.datetime.now()-datetime.timedelta(days=1)).strftime("%Y-%m-%d ...

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

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

  3. codeforces 557 C

    由于期末.非常久没刷题了,CF一直掉-- 这个题事实上非常简单. .由于做法非常easy想到嘛.. 就是枚举max=x时,最大能保留多少价值.不断更新ans, 结果就是全部价值和减去ans就好 因为最 ...

  4. properties配置文件读取

    1.配置文件test.properties: test_123=admin 注:value 可用单引号,双引号,不用引号修饰 2.工具类PropertiesUtil: package com..... ...

  5. SEO大师分析的八条

  6. wepy开发

    工欲善其事必先利其器 ide安装.配置] https://tencent.github.io/wepy/document.html VS Code   1. 在 Code 里先安装 Vue 的语法高亮 ...

  7. moving from a host-centric infrastructure to a container-centric infrastructure

    https://kubernetes.io/docs/concepts/overview/what-is-kubernetes/ Why do I need Kubernetes and what c ...

  8. Redis 单例、主从模式、sentinel 以及集群的配置方式及优缺点对比(转)

    摘要: redis作为一种NoSql数据库,其提供了一种高效的缓存方案,本文则主要对其单例,主从模式,sentinel以及集群的配置方式进行说明,对比其优缺点,阐述redis作为一种缓存框架的高可用性 ...

  9. Android Handle,Looper,Message消息机制

    尊重原创,转载请标明出处    http://blog.csdn.net/abcdef314159 我们知道在Android中更新UI都是在主线程中,而操作一些耗时的任务则须要在子线程中.假设存在多个 ...

  10. 一起来学linux:PAM模块

    在Linux中执行有些程序时,这些程序在执行前首先要对启动它的用户进行认证,符合一定的要求之后才允许执行,例如login, su等 在Linux中进行身份或是状态的验证程序是由PAM来进行的,PAM( ...