KiiCloudStorageSDK : KiiCorp.Cloud.Storage Namespace

KiiBaseObject Class

Base class of key-value object.

Syntax

public abstract class KiiBaseObject

Remarks

Developers don't need to extend this class in their apps.

Requirements

Namespace: KiiCorp.Cloud.Storage
Assembly: KiiCloudStorageSDK (in KiiCloudStorageSDK.dll)
Assembly Versions: 3.2.10.0

Members

See Also: Inherited members from object.

Public Properties

default property
Item (string) object . Gets or sets the object with the specified key.

Public Methods

GetBoolean (string) : bool
Gets the boolean in KiiBaseObject.
GetBoolean (string, bool) : bool
Gets the boolean. If key is not found, returns fallback.
GetByteArray (string) : byte[]
Gets the byte array with the specified key.
GetDouble (string) : double
Gets the double in KiiBaseObject.
GetDouble (string, double) : double
Gets the double. If key is not found, returns fallback.
GetInt (string) : int
Gets the integer in KiiBaseObject.
GetInt (string, int) : int
Gets the integer. If key is not found, returns fallback.
GetJsonArray (string) : JsonOrg.JsonArray
Gets the Json array with the specified key.
GetJsonObject (string) : JsonOrg.JsonObject
Gets the JSON object with the specified key.
GetLong (string) : long
Gets the long in KiiBaseObject.
GetLong (string, long) : long
Gets the long. If key is not found, returns fallback.
GetString (string) : string
Gets the string in KiiBaseObject.
GetString (string, string) : string
Gets the string. If key is not found, returns fallback.
GetUri (string) : Uri
Gets the Uri with the specified key.
Has (string) : bool
Determine if this instance has the specified key.
Keys () : IEnumerable<string>
Gets the list of keys
Remove (string)
Remove the specified key and value.

Member Details

GetBoolean Method

Gets the boolean in KiiBaseObject.

Syntax

public bool GetBoolean (string key)

Parameters

key
Key.

Returns

Value as string associated with the key.

Exceptions

Type Reason
KiiCorp.Cloud.Storage.IllegalKiiBaseObjectFormatException Is thrown when the type of value is not bool

Remarks

Requirements

Namespace: KiiCorp.Cloud.Storage
Assembly: KiiCloudStorageSDK (in KiiCloudStorageSDK.dll)
Assembly Versions: 3.2.10.0

GetBoolean Method

Gets the boolean. If key is not found, returns fallback.

Syntax

public bool GetBoolean (string key, bool fallback)

Parameters

key
Key.
fallback
Fallack.

Returns

Value as bool associated with the key or fallback.

Remarks

If key is not found, returns fallback.

Requirements

Namespace: KiiCorp.Cloud.Storage
Assembly: KiiCloudStorageSDK (in KiiCloudStorageSDK.dll)
Assembly Versions: 3.2.10.0

GetByteArray Method

Gets the byte array with the specified key.

Syntax

public byte[] GetByteArray (string key)

Parameters

key
Key.

Returns

The byte array associated with the key.

Exceptions

Type Reason
KiiCorp.Cloud.Storage.IllegalKiiBaseObjectFormatException Is thrown when value is not string.

Remarks

If value is empty, returns null.

Requirements

Namespace: KiiCorp.Cloud.Storage
Assembly: KiiCloudStorageSDK (in KiiCloudStorageSDK.dll)
Assembly Versions: 3.2.10.0

GetDouble Method

Gets the double in KiiBaseObject.

Syntax

public double GetDouble (string key)

Parameters

key
Key.

Returns

Value as double associated with the key.

Exceptions

Type Reason
KiiCorp.Cloud.Storage.IllegalKiiBaseObjectFormatException Is thrown when the type of value is not double

Remarks

Requirements

Namespace: KiiCorp.Cloud.Storage
Assembly: KiiCloudStorageSDK (in KiiCloudStorageSDK.dll)
Assembly Versions: 3.2.10.0

GetDouble Method

Gets the double. If key is not found, returns fallback.

Syntax

public double GetDouble (string key, double fallback)

Parameters

key
Key.
fallback
Fallback.

Returns

Value as double associated with the key or fallback.

Remarks

If key is not found, returns fallback.

Requirements

Namespace: KiiCorp.Cloud.Storage
Assembly: KiiCloudStorageSDK (in KiiCloudStorageSDK.dll)
Assembly Versions: 3.2.10.0

GetInt Method

Gets the integer in KiiBaseObject.

Syntax

public int GetInt (string key)

Parameters

key
Key.

Returns

Value as int associated with the key.

Exceptions

Type Reason
KiiCorp.Cloud.Storage.IllegalKiiBaseObjectFormatException Is thrown when the type of value is not int

Remarks

Requirements

Namespace: KiiCorp.Cloud.Storage
Assembly: KiiCloudStorageSDK (in KiiCloudStorageSDK.dll)
Assembly Versions: 3.2.10.0

GetInt Method

Gets the integer. If key is not found, returns fallback.

Syntax

public int GetInt (string key, int fallback)

Parameters

key
Key.
fallback
Fallback.

Returns

Value as int associated with the key or fallback.

Remarks

If key is not found, returns fallback.

Requirements

Namespace: KiiCorp.Cloud.Storage
Assembly: KiiCloudStorageSDK (in KiiCloudStorageSDK.dll)
Assembly Versions: 3.2.10.0

GetJsonArray Method

Gets the Json array with the specified key.

Syntax

public JsonOrg.JsonArray GetJsonArray (string key)

Parameters

key
Key.

Returns

Value as JsonArray associated with the key.

Exceptions

Type Reason
KiiCorp.Cloud.Storage.IllegalKiiBaseObjectFormatException Is thrown when the type of value is not JsonArray.

Remarks

Requirements

Namespace: KiiCorp.Cloud.Storage
Assembly: KiiCloudStorageSDK (in KiiCloudStorageSDK.dll)
Assembly Versions: 3.2.10.0

GetJsonObject Method

Gets the JSON object with the specified key.

Syntax

public JsonOrg.JsonObject GetJsonObject (string key)

Parameters

key
Key.

Returns

Value as JsonObject associated with the key.

Exceptions

Type Reason
KiiCorp.Cloud.Storage.IllegalKiiBaseObjectFormatException Is thrown when the type of value is not JsonObject

Remarks

Requirements

Namespace: KiiCorp.Cloud.Storage
Assembly: KiiCloudStorageSDK (in KiiCloudStorageSDK.dll)
Assembly Versions: 3.2.10.0

GetLong Method

Gets the long in KiiBaseObject.

Syntax

public long GetLong (string key)

Parameters

key
Key.

Returns

Value as string associated with the key.

Exceptions

Type Reason
KiiCorp.Cloud.Storage.IllegalKiiBaseObjectFormatException Is thrown when the type of value is not string

Remarks

Requirements

Namespace: KiiCorp.Cloud.Storage
Assembly: KiiCloudStorageSDK (in KiiCloudStorageSDK.dll)
Assembly Versions: 3.2.10.0

GetLong Method

Gets the long. If key is not found, returns fallback.

Syntax

public long GetLong (string key, long fallback)

Parameters

key
Key.
fallback
Fallback.

Returns

Value as long associated with the key or fallback.

Remarks

If key is not found, returns fallback.

Requirements

Namespace: KiiCorp.Cloud.Storage
Assembly: KiiCloudStorageSDK (in KiiCloudStorageSDK.dll)
Assembly Versions: 3.2.10.0

GetString Method

Gets the string in KiiBaseObject.

Syntax

public string GetString (string key)

Parameters

key
Key.

Returns

Value as string associated with the key.

Exceptions

Type Reason
KiiCorp.Cloud.Storage.IllegalKiiBaseObjectFormatException Is thrown when the type of value is not string

Remarks

Requirements

Namespace: KiiCorp.Cloud.Storage
Assembly: KiiCloudStorageSDK (in KiiCloudStorageSDK.dll)
Assembly Versions: 3.2.10.0

GetString Method

Gets the string. If key is not found, returns fallback.

Syntax

public string GetString (string key, string fallback)

Parameters

key
Key.
fallback
Fallback.

Returns

Value as string associated with the key or fallback.

Remarks

If key is not found, returns fallback.

Requirements

Namespace: KiiCorp.Cloud.Storage
Assembly: KiiCloudStorageSDK (in KiiCloudStorageSDK.dll)
Assembly Versions: 3.2.10.0

GetUri Method

Gets the Uri with the specified key.

Syntax

public Uri GetUri (string key)

Parameters

key
Key.

Returns

Value as Uri associated with the key.

Exceptions

Type Reason
KiiCorp.Cloud.Storage.IllegalKiiBaseObjectFormatException Is thrown when the format of value is not Uri.

Remarks

Requirements

Namespace: KiiCorp.Cloud.Storage
Assembly: KiiCloudStorageSDK (in KiiCloudStorageSDK.dll)
Assembly Versions: 3.2.10.0

Has Method

Determine if this instance has the specified key.

Syntax

public bool Has (string key)

Parameters

key
Key.

Returns

Example
true
if the key is in this instance ; otherwise
Example
false

Remarks

Key must not be null.

Requirements

Namespace: KiiCorp.Cloud.Storage
Assembly: KiiCloudStorageSDK (in KiiCloudStorageSDK.dll)
Assembly Versions: 3.2.10.0

Item Property

Gets or sets the object with the specified key.

Syntax

This is the default property for this class.

public virtual object this [string key] { get; set; }

Parameters

key
Key.

Value

Value associated with the key.

Exceptions

Type Reason
ArgumentNullException Is thrown when key is null.
KiiCorp.Cloud.Storage.IllegalKiiBaseObjectFormatException Is thrown when specified key is not existed

Remarks

As the type of value is object, developers need to cast value. If you want to suppress IllegalKiiBaseObjectFormatException, use GetXxx(key, fallback)

Requirements

Namespace: KiiCorp.Cloud.Storage
Assembly: KiiCloudStorageSDK (in KiiCloudStorageSDK.dll)
Assembly Versions: 3.2.10.0

Keys Method

Gets the list of keys

Syntax

public IEnumerable<string> Keys ()

Returns

List of keys.

Remarks

Reserved keys are not included.

Requirements

Namespace: KiiCorp.Cloud.Storage
Assembly: KiiCloudStorageSDK (in KiiCloudStorageSDK.dll)
Assembly Versions: 3.2.10.0

Remove Method

Remove the specified key and value.

Syntax

public virtual void Remove (string key)

Parameters

key
Key you want to remove

Exceptions

Type Reason
ArgumentException Is thrown when key is empty or reserved.

Remarks

Key must be valid and should not be reserved.

Requirements

Namespace: KiiCorp.Cloud.Storage
Assembly: KiiCloudStorageSDK (in KiiCloudStorageSDK.dll)
Assembly Versions: 3.2.10.0