Table of Contents

Class DynamoDBEntryConversion

Namespace
Amazon.DynamoDBv2
Assembly
AWSSDK.DynamoDBv2.dll

A collection of converters capable of converting between .NET and DynamoDB objects.

public class DynamoDBEntryConversion
Inheritance
DynamoDBEntryConversion
Inherited Members

Properties

V1

Default conversion before 2014 L, M, BOOL, NULL support.

The following .NET types are converted into the following DynamoDB types: Number types (byte, int, float, decimal, etc.) are converted to N String and char are converted to S Bool is converted to N (0=false, 1=true) DateTime and Guid are converto to S MemoryStream and byte[] are converted to B List, HashSet, and array of numerics types are converted to NS List, HashSet, and array of string-based types are converted to SS List, HashSet, and array of binary-based types are converted to BS Dictionary{string,object} are converted to M

public static DynamoDBEntryConversion V1 { get; }

Property Value

DynamoDBEntryConversion

V2

Schema fully supporting 2014 L, M, BOOL, NULL additions.

The following .NET types are converted into the following DynamoDB types: Number types (byte, int, float, decimal, etc.) are converted to N String and char are converted to S Bool is converted to BOOL DateTime and Guid are converto to S MemoryStream and byte[] are converted to B HashSet of numerics types are converted to NS HashSet of string-based types are converted to SS HashSet of binary-based types are converted to BS List and array of numerics, string-based types, and binary-based types are converted to L type. Dictionary{string,object} are converted to M

public static DynamoDBEntryConversion V2 { get; }

Property Value

DynamoDBEntryConversion

Methods

ConvertFromEntry(Type, DynamoDBEntry)

Convert the DynamoDBEntry to the specified type.

public object ConvertFromEntry(Type outputType, DynamoDBEntry entry)

Parameters

outputType Type
entry DynamoDBEntry

Returns

object

Exceptions

ArgumentNullException

ConvertFromEntry<TOutput>(DynamoDBEntry)

Convert the DynamoDBEntry to the specified type.

public TOutput ConvertFromEntry<TOutput>(DynamoDBEntry entry)

Parameters

entry DynamoDBEntry

Returns

TOutput

Type Parameters

TOutput

ConvertToEntry(Type, object)

Convert value to DynamoDBEntry

public DynamoDBEntry ConvertToEntry(Type inputType, object value)

Parameters

inputType Type
value object

Returns

DynamoDBEntry

ConvertToEntry<TInput>(TInput)

Convert value to DynamoDBEntry

public DynamoDBEntry ConvertToEntry<TInput>(TInput value)

Parameters

value TInput

Returns

DynamoDBEntry

Type Parameters

TInput

TryConvertFromEntry(Type, DynamoDBEntry, out object)

Try to convert the DynamoDBEntry to the specified type. If it fails the method returns false.

public bool TryConvertFromEntry(Type outputType, DynamoDBEntry entry, out object value)

Parameters

outputType Type
entry DynamoDBEntry
value object

Returns

bool

Exceptions

ArgumentNullException

TryConvertFromEntry<TOutput>(DynamoDBEntry, out TOutput)

Try to convert the DynamoDBEntry to the specified type. If it fails the method returns false.

public bool TryConvertFromEntry<TOutput>(DynamoDBEntry entry, out TOutput output)

Parameters

entry DynamoDBEntry
output TOutput

Returns

bool

True if successfully converted, otherwise false.

Type Parameters

TOutput

TryConvertToEntry(Type, object, out DynamoDBEntry)

Try to convert value to DynamoDBEntry. If it fails the method returns false.

public bool TryConvertToEntry(Type inputType, object value, out DynamoDBEntry entry)

Parameters

inputType Type
value object
entry DynamoDBEntry

Returns

bool

Exceptions

ArgumentNullException

TryConvertToEntry<TInput>(TInput, out DynamoDBEntry)

Try to convert value to DynamoDBEntry. If it fails the method returns false.

public bool TryConvertToEntry<TInput>(TInput value, out DynamoDBEntry entry)

Parameters

value TInput
entry DynamoDBEntry

Returns

bool

True if successfully converted, otherwise false.

Type Parameters

TInput