aerogear-xamarin-sdk
AeroGear Xamarin SDK
AeroGear.Mobile.Core.Utils.AbstractUserPreferences Class Referenceabstract

Base class for user preferences. Automatically performs sanity checks on parameters. More...

Inheritance diagram for AeroGear.Mobile.Core.Utils.AbstractUserPreferences:
AeroGear.Mobile.Core.Utils.IUserPreferences AeroGear.Mobile.Core.Utils.AndroidUserPreferences AeroGear.Mobile.Core.Utils.IOSUserPreferences

Public Member Functions

string GetString (string key, string defaultValue=null)
 Returns the value associated with the provided key. defaultValue or if it does not exists. More...
 
void PutString (string key, string value)
 Adds a value to the user preferences store. More...
 
void RemoveValue (string key)
 Removes a value from the preferences store. More...
 

Protected Member Functions

abstract string doGetString (string key, string defaultValue=null)
 Returns the string associated with the given key. More...
 
abstract void doPutString (string key, string value)
 Adds a new key,value pair to the user preferences. More...
 
abstract void doRemoveValue (string key)
 Remove the value associated to the specific key from the user preferences. More...
 

Detailed Description

Base class for user preferences. Automatically performs sanity checks on parameters.

Member Function Documentation

◆ doGetString()

abstract string AeroGear.Mobile.Core.Utils.AbstractUserPreferences.doGetString ( string  key,
string  defaultValue = null 
)
protectedpure virtual

Returns the string associated with the given key.

Returns
The get string.
Parameters
keyKey.
defaultValueDefault value.

Implemented in AeroGear.Mobile.Core.Utils.AndroidUserPreferences, and AeroGear.Mobile.Core.Utils.IOSUserPreferences.

◆ doPutString()

abstract void AeroGear.Mobile.Core.Utils.AbstractUserPreferences.doPutString ( string  key,
string  value 
)
protectedpure virtual

Adds a new key,value pair to the user preferences.

Parameters
keyKey.
valueValue.

Implemented in AeroGear.Mobile.Core.Utils.AndroidUserPreferences, and AeroGear.Mobile.Core.Utils.IOSUserPreferences.

◆ doRemoveValue()

abstract void AeroGear.Mobile.Core.Utils.AbstractUserPreferences.doRemoveValue ( string  key)
protectedpure virtual

Remove the value associated to the specific key from the user preferences.

Parameters
keyKey.

Implemented in AeroGear.Mobile.Core.Utils.AndroidUserPreferences, and AeroGear.Mobile.Core.Utils.IOSUserPreferences.

◆ GetString()

string AeroGear.Mobile.Core.Utils.AbstractUserPreferences.GetString ( string  key,
string  defaultValue = null 
)

Returns the value associated with the provided key. defaultValue or if it does not exists.

Returns
The svalue associated with the given key.
Parameters
keyKey.
defaultValueDefault value. Returned if the key is not present

Implements AeroGear.Mobile.Core.Utils.IUserPreferences.

◆ PutString()

void AeroGear.Mobile.Core.Utils.AbstractUserPreferences.PutString ( string  key,
string  value 
)

Adds a value to the user preferences store.

Parameters
keyKey.
valueValue.

Implements AeroGear.Mobile.Core.Utils.IUserPreferences.

◆ RemoveValue()

void AeroGear.Mobile.Core.Utils.AbstractUserPreferences.RemoveValue ( string  key)

Removes a value from the preferences store.

Parameters
keyKey.

Implements AeroGear.Mobile.Core.Utils.IUserPreferences.


The documentation for this class was generated from the following file: