Aerospike.Database.LINQPadDriver.Extensions Namespace
Aerospike LINDPad Driver

ARecord..::..Cast<(Of <(<'T>)>)> Method (Object, Func<(Of <(<'String, Type, String, Object, Object>)>)>)

Will convert the record into a user defined class were the bin's name is matches the class's field/property name and type.

Namespace:  Aerospike.Database.LINQPadDriver.Extensions
Assembly:  Aerospike.Database.LINQPadDriver (in Aerospike.Database.LINQPadDriver.dll)

Syntax


public T Cast<T>(
	Object primaryKey,
	Func<string, Type, string, Object, Object> transform
)

Type Parameters

T
user defined class

Parameters

primaryKey
Type: Object
The primary key can be a Key, Value, digest (byte[]), or a .net type.
transform
Type: Func<(Of <(<'String, Type, String, Object, Object>)>)>
A action that is called to perform customized transformation. First argument -- the name of the property/field Second argument -- the property/field type Third argument -- bin name Fourth argument -- bin value Returns the new transformed object or null to indicate that this transformation should be skipped.

Return Value

An instance of the class or an exception.

Exceptions


ExceptionCondition
MissingMethodExceptionThrown if the constructor for the type cannot be determined