C# Class OfficeTicTacToe.Common.TaskHelper

Show file Open project: DXFrance/OfficeTicTacToe

Public Properties

Property Type Description
TimeTriggeredTaskProgress string
TimeTriggeredTaskRegistered bool

Public Methods

Method Description
CheckTileBrackgroundTask ( ) : void
GetBackgroundTaskStatus ( String name ) : String

Get the registration / completion status of the background task with given name.

RegisterTileBackgroundTask ( ) : System.Threading.Tasks.Task

Register task for every 15 minutes if Internet is available

SendNotification ( ) : System.Threading.Tasks.Task
TaskRequiresBackgroundAccess ( String name ) : bool

Determine if task with given name requires background access.

UnregisterBackgroundTasks ( string name ) : void

Unregister background tasks with specified name.

Private Methods

Method Description
AttachProgressAndCompletedHandlers ( IBackgroundTaskRegistration task ) : void
OnCompleted ( IBackgroundTaskRegistration task, BackgroundTaskCompletedEventArgs args ) : void

Handle background task completion.

OnProgress ( IBackgroundTaskRegistration task, BackgroundTaskProgressEventArgs args ) : void

Handle background task progress.

RegisterBackgroundTask ( String taskEntryPoint, String name, IBackgroundTrigger trigger, IBackgroundCondition condition ) : Task

Register a background task with the specified taskEntryPoint, name, trigger, and condition (optional).

Method Details

CheckTileBrackgroundTask() public method

public CheckTileBrackgroundTask ( ) : void
return void

GetBackgroundTaskStatus() public static method

Get the registration / completion status of the background task with given name.
public static GetBackgroundTaskStatus ( String name ) : String
name String Name of background task to retreive registration status.
return String

RegisterTileBackgroundTask() public method

Register task for every 15 minutes if Internet is available
public RegisterTileBackgroundTask ( ) : System.Threading.Tasks.Task
return System.Threading.Tasks.Task

SendNotification() public method

public SendNotification ( ) : System.Threading.Tasks.Task
return System.Threading.Tasks.Task

TaskRequiresBackgroundAccess() public static method

Determine if task with given name requires background access.
public static TaskRequiresBackgroundAccess ( String name ) : bool
name String Name of background task to query background access requirement.
return bool

UnregisterBackgroundTasks() public method

Unregister background tasks with specified name.
public UnregisterBackgroundTasks ( string name ) : void
name string Name of the background task to unregister.
return void

Property Details

TimeTriggeredTaskProgress public static property

public static string TimeTriggeredTaskProgress
return string

TimeTriggeredTaskRegistered public static property

public static bool TimeTriggeredTaskRegistered
return bool