C# Class MediaAppSample.Core.Services.BackgroundTasksManager

Task manager is responsible for registering and unregistering all background tasks used by this application.
Inheritance: ServiceBase, IServiceSignout
Mostrar archivo Open project: Microsoft/TVHelpers

Public Methods

Method Description
CheckIfAllowed ( ) : bool

Indicates whether or not the app has permissions to run background tasks.

RegisterAllAsync ( ) : System.Threading.Tasks.Task

Registers all background tasks related to this application.

SignoutAsync ( ) : System.Threading.Tasks.Task

Removes background task registrations when the user signs out of the app.

Private Methods

Method Description
BackgroundTasksManager ( ) : MediaAppSample.Core.Commands
RegisterBackgroundTaskAsync ( string taskEntryPoint, string taskName, IBackgroundTrigger trigger, IBackgroundCondition condition = null ) : BackgroundTaskRegistration

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

Remove ( string name ) : void

Unregister background tasks with specified name.

RemoveAll ( ) : void

Removes all registered background tasks related to this application.

Method Details

CheckIfAllowed() public method

Indicates whether or not the app has permissions to run background tasks.
public CheckIfAllowed ( ) : bool
return bool

RegisterAllAsync() public method

Registers all background tasks related to this application.
public RegisterAllAsync ( ) : System.Threading.Tasks.Task
return System.Threading.Tasks.Task

SignoutAsync() public method

Removes background task registrations when the user signs out of the app.
public SignoutAsync ( ) : System.Threading.Tasks.Task
return System.Threading.Tasks.Task