C# Класс SensorbergSDK.Background.BackgroundEngine

BackgroundEngine resolves actions from BluetoothLEAdvertisementWatcherTriggerDetails object and resolves delayed actions. This is not part of the public API. Making modifications into background tasks is not required in order to use the SDK.
Наследование: IDisposable
Показать файл Открыть проект Примеры использования класса

Private Properties

Свойство Тип Описание
AddBeaconArgs void
AddBeaconsToBeaconArgsAsync System.Threading.Tasks.Task
IsOutOfRange bool
IsValidEnterEvent bool
OnBeaconActionResolvedAsync void

Открытые методы

Метод Описание
BackgroundEngine ( ) : System
Dispose ( ) : void

Finishes background processing and releases all resources.

InitializeAsync ( ) : System.Threading.Tasks.Task

Initializes BackgroundEngine.

ProcessDelayedActionsAsync ( bool flushHistory = true ) : System.Threading.Tasks.Task

Processes the delayed actions, executes them as necessary and sends history statistics.

ResolveBeaconActionsAsync ( List beacons, int outOfRangeDb ) : System.Threading.Tasks.Task

Resolves beacons, which triggered the background task.

Приватные методы

Метод Описание
AddBeaconArgs ( Beacon beacon, BeaconEventType eventType ) : void
AddBeaconsToBeaconArgsAsync ( int outOfRangeDb ) : System.Threading.Tasks.Task

Generates BeaconArgs from beacon events. For instance if a beacon is seen for the first time, BeaconArgs with enter type is generated.

IsOutOfRange ( int outOfRangeDb, Beacon beacon ) : bool
IsValidEnterEvent ( BackgroundEvent history, Beacon beacon, int outOfRangeDb ) : bool
OnBeaconActionResolvedAsync ( object sender, BeaconAction beaconAction ) : void

Handles BeaconActions that are resolved in the SDKEngine. All resolved actions are stored into local database. And the UI app will show actions to the user. When the UI app is not running, toast notification is shown for the user.

Описание методов

BackgroundEngine() публичный Метод

public BackgroundEngine ( ) : System
Результат System

Dispose() публичный Метод

Finishes background processing and releases all resources.
public Dispose ( ) : void
Результат void

InitializeAsync() публичный Метод

Initializes BackgroundEngine.
public InitializeAsync ( ) : System.Threading.Tasks.Task
Результат System.Threading.Tasks.Task

ProcessDelayedActionsAsync() публичный Метод

Processes the delayed actions, executes them as necessary and sends history statistics.
public ProcessDelayedActionsAsync ( bool flushHistory = true ) : System.Threading.Tasks.Task
flushHistory bool
Результат System.Threading.Tasks.Task

ResolveBeaconActionsAsync() публичный Метод

Resolves beacons, which triggered the background task.
public ResolveBeaconActionsAsync ( List beacons, int outOfRangeDb ) : System.Threading.Tasks.Task
beacons List
outOfRangeDb int
Результат System.Threading.Tasks.Task