Aerospike.Database.LINQPadDriver.Extensions Namespace
Aerospike LINDPad Driver

ANamespaceAccess..::..WriteObject<(Of <(<'T>)>)> Method

Writes the instance where each field/property is a bin name and the associated value the bin's value. and any of the "Put" methods.

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

Syntax


public void WriteObject<T>(
	string setName,
	Object primaryKey,
	T instance,
	Func<string, string, Object, bool, Object> transform,
	string documentBinName,
	WritePolicy writePolicy,
	Nullable<TimeSpan> ttl
)

Type Parameters

T

Parameters

setName
Type: String
Set name or null for the null set
primaryKey
Type: Object
Primary AerospikeKey. This can be a Key, Value, or Bin object besides a native, collection, etc. value/object.
instance
Type: T
The instance that will be transformed into an Aerospike Record.
transform
Type: Func<(Of <(<'String, String, Object, Boolean, Object>)>)>
A action that is called to perform customized transformation. First argument -- the name of the property/field within the instance/class Second argument -- the name of the bin (can be different from property/field name if BinNameAttribute is defined) Third argument -- the instance being transformed Fourth argument -- if true the instance is within another object. Returns the new transformed object or null to indicate that this instance should be skipped.
documentBinName
Type: String
If provided the record is created as a document and this will be the name of the bin.
writePolicy
Type: WritePolicy
ttl
Type: Nullable<(Of <(<'TimeSpan>)>)>

Exceptions


ExceptionCondition
TypeAccessExceptionThrown if cannot write instance

See Also


[Put{T}(string, dynamic, string, IEnumerable{T}, WritePolicy, TimeSpan?)]
[Put{T}(string, dynamic, string, IList{T}, WritePolicy, TimeSpan?)]
[Put{V}(string, dynamic, IDictionary{string, V}, WritePolicy, TimeSpan?)]
[BatchWriteObject{P,T}(string, IEnumerable{ValueTuple{P, T}}, BatchPolicy, BatchWritePolicy, ParallelOptions, Func{string, string, object, bool, object}, string)]