Show / Hide Table of Contents

Interface IPersistenceCallback

The Smartcrypt SDK persists user information across sessions. The IPersistenceCallback is the application developer's way to control how data are retained across sessions.

Namespace: PKWARE.Smartcrypt.KeyManagement
Assembly: SmartcryptKeyManagement.dll
Syntax
public interface IPersistenceCallback

Methods

OnLoadData()

Loads persisted data from storage. Implementers are responsible for returning all data they know about. Invoked when Restore() is called. Will be invoked on the same thread.

Declaration
[NotNull]
IDictionary<string, string> OnLoadData()
Returns
Type Description
IDictionary<String, String>

An empty dictionary if no data have been persisted, otherwise all persisted values.

OnSaveData(IDictionary<String, String>, ISet<String>)

Declaration
bool OnSaveData(IDictionary<string, string> toSave, ISet<string> toDelete)
Parameters
Type Name Description
IDictionary<String, String> toSave

A list of new or modified data which must be saved. The key is safe for filename and any other system sensitive to special characters. The value must be saved.

ISet<String> toDelete

A list of data which must be deleted. For this method to return true, each item in this collection must not exist by the time this method completes.

Returns
Type Description
Boolean

true if the data were correctly saved and deleted, otherwise false.

Back to top Copyright © 2018 PKWARE, Inc.