C# Class Ensage.Common.DelayAction

Delays actions by a set time.
Show file Open project: EnsageSharp/Ensage.Common Class Usage Examples

Public Methods

Method Description
Add ( DelayActionItem item ) : void

Adds a new delayed action.

Add ( float time, System.Action func ) : void

Adds a new delayed action, casting the time to an integer.

Add ( float time, System.Action func, CancellationToken token ) : void

Adds a new delayed action with a cancelation token. Use the CancellationTokenSource class for tokens.

Add ( int time, System.Action func ) : void

Adds a new delayed action.

Add ( int time, System.Action func, CancellationToken token ) : void

Adds a new delayed action with a cancelation token. Use the CancellationTokenSource class for tokens.

Method Details

Add() public static method

Adds a new delayed action.
public static Add ( DelayActionItem item ) : void
item DelayActionItem The to add.
return void

Add() public static method

Adds a new delayed action, casting the time to an integer.
public static Add ( float time, System.Action func ) : void
time float The time(in milliseconds) to call the function.
func System.Action The function to call once the has expired.
return void

Add() public static method

Adds a new delayed action with a cancelation token. Use the CancellationTokenSource class for tokens.
public static Add ( float time, System.Action func, CancellationToken token ) : void
time float The time(in milliseconds) to call the function. (Gets casted into an integer)
func System.Action The function to call once the has expired.
token System.Threading.CancellationToken The cancelation token.
return void

Add() public static method

Adds a new delayed action.
public static Add ( int time, System.Action func ) : void
time int Delayed Time
func System.Action Callback Function
return void

Add() public static method

Adds a new delayed action with a cancelation token. Use the CancellationTokenSource class for tokens.
public static Add ( int time, System.Action func, CancellationToken token ) : void
time int The time(in milliseconds) to call the function.
func System.Action The function to call once the has expired.
token System.Threading.CancellationToken The cancelation token.
return void