TimerExtensions
Wisej.Web.Markup.TimerExtensions
Namespace: Wisej.Web.Markup
Assembly: Wisej.Framework (4.0.0.0)
Adds fluent markup extension methods to the Timer class.
public class TimerExtensions
Methods
Enabled<TTimer>(timer, enabled)

Sets the Enabled property of the specified Timer.
Returns: TTimer. The modified timer with the updated Enabled property.
This method allows you to enable or disable the timer.
myTimer.Enabled(true);
Interval<TTimer>(timer, interval)

Sets the interval for the specified Timer.
Returns: TTimer. The modified timer with the updated interval.
This method allows you to specify the interval between timer events.
myTimer.Interval(1000);
OnTick<TTimer>(timer, action)

Attaches an event handler for the Tick event of the specified Timer.
Returns: TTimer. The modified timer with the attached Tick event handler.
This method allows you to execute a custom action whenever the timer ticks.
myTimer.OnTick(t =>
{
AlertBox.Show("Timer ticked!");
});
Tag<TTimer>(timer, obj)

Sets the Tag property of the specified Timer.
Returns: TTimer. The modified timer with the updated Tag property.
This method allows you to associate an arbitrary object with the timer.
myTimer.Tag("CustomTagData");
Last updated
Was this helpful?