C# Class SensorbergSDK.Internal.Services.StorageService

Inheritance: IStorageService
Mostra file Open project: sensorberg-dev/windows10-sdk

Public Methods

Method Description
CleanupDatabase ( ) : System.Threading.Tasks.Task
FlushHistory ( ) : Task
GetActionsForForeground ( bool doNotDelete = false ) : Task>
GetDelayedActions ( ) : Task>
GetLastEventStateForBeacon ( string pid ) : Task
InitStorage ( ) : System.Threading.Tasks.Task
InvalidateLayout ( ) : System.Threading.Tasks.Task

Invalidates both the current and cached layout.

LoadLayoutFromLocalStorage ( ) : Task

Tries to load the layout from the local storage.

RetrieveLayout ( ) : Task
SaveBeaconEventState ( string pid, BeaconEventType enter ) : Task
SaveDelayedAction ( ResolvedAction action, DateTimeOffset dueTime, string beaconPid, BeaconEventType eventType, string location ) : Task
SaveHistoryAction ( string uuid, string beaconPid, DateTimeOffset now, BeaconEventType beaconEventType, string location ) : Task
SaveHistoryEvent ( string pid, DateTimeOffset timestamp, BeaconEventType eventType, string location ) : Task
SetDelayedActionAsExecuted ( string id ) : System.Threading.Tasks.Task
StorageService ( bool createdOnForeground = true ) : System
ValidateApiKey ( string apiKey ) : Task

Checks whether the given API key is valid or not.

Private Methods

Method Description
ExecuteCall ( Func action ) : Task
SaveBeaconEventStateRetry ( string pid, BeaconEventType enter, int retry ) : Task
SaveDelayedActionsRetry ( ResolvedAction action, DateTimeOffset dueTime, string beaconPid, BeaconEventType eventTypeDetectedByDevice, string location, int retry ) : Task
SaveHistoryActionRetry ( string uuid, string beaconPid, DateTimeOffset now, BeaconEventType beaconEventType, string location, int retry ) : Task
SaveHistoryEventRetry ( string pid, DateTimeOffset timestamp, BeaconEventType eventType, string location, int retry ) : Task
SaveLayoutToLocalStorage ( string headers, string content, DateTimeOffset layoutRetrievedTime ) : System.Threading.Tasks.Task

Saves the strings that make up a layout.

StoreData ( string fileName, string data ) : Task

Saves the given data to the specified file.

WaitBackoff ( int currentRetries ) : System.Threading.Tasks.Task

Method Details

CleanupDatabase() public method

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

FlushHistory() public method

public FlushHistory ( ) : Task
return Task

GetActionsForForeground() public method

public GetActionsForForeground ( bool doNotDelete = false ) : Task>
doNotDelete bool
return Task>

GetDelayedActions() public method

public GetDelayedActions ( ) : Task>
return Task>

GetLastEventStateForBeacon() public method

public GetLastEventStateForBeacon ( string pid ) : Task
pid string
return Task

InitStorage() public method

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

InvalidateLayout() public method

Invalidates both the current and cached layout.
public InvalidateLayout ( ) : System.Threading.Tasks.Task
return System.Threading.Tasks.Task

LoadLayoutFromLocalStorage() public method

Tries to load the layout from the local storage.
public LoadLayoutFromLocalStorage ( ) : Task
return Task

RetrieveLayout() public method

public RetrieveLayout ( ) : Task
return Task

SaveBeaconEventState() public method

public SaveBeaconEventState ( string pid, BeaconEventType enter ) : Task
pid string
enter BeaconEventType
return Task

SaveDelayedAction() public method

public SaveDelayedAction ( ResolvedAction action, DateTimeOffset dueTime, string beaconPid, BeaconEventType eventType, string location ) : Task
action SensorbergSDK.Internal.Transport.ResolvedAction
dueTime DateTimeOffset
beaconPid string
eventType BeaconEventType
location string
return Task

SaveHistoryAction() public method

public SaveHistoryAction ( string uuid, string beaconPid, DateTimeOffset now, BeaconEventType beaconEventType, string location ) : Task
uuid string
beaconPid string
now DateTimeOffset
beaconEventType BeaconEventType
location string
return Task

SaveHistoryEvent() public method

public SaveHistoryEvent ( string pid, DateTimeOffset timestamp, BeaconEventType eventType, string location ) : Task
pid string
timestamp DateTimeOffset
eventType BeaconEventType
location string
return Task

SetDelayedActionAsExecuted() public method

public SetDelayedActionAsExecuted ( string id ) : System.Threading.Tasks.Task
id string
return System.Threading.Tasks.Task

StorageService() public method

public StorageService ( bool createdOnForeground = true ) : System
createdOnForeground bool
return System

ValidateApiKey() public method

Checks whether the given API key is valid or not.
public ValidateApiKey ( string apiKey ) : Task
apiKey string The API key to validate.
return Task