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
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
Methods
ConvertFromEntry(Type, DynamoDBEntry)
Convert the DynamoDBEntry to the specified type.
public object ConvertFromEntry(Type outputType, DynamoDBEntry entry)
Parameters
outputType
Typeentry
DynamoDBEntry
Returns
Exceptions
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
Returns
ConvertToEntry<TInput>(TInput)
Convert value to DynamoDBEntry
public DynamoDBEntry ConvertToEntry<TInput>(TInput value)
Parameters
value
TInput
Returns
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
Typeentry
DynamoDBEntryvalue
object
Returns
Exceptions
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
DynamoDBEntryoutput
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
Typevalue
objectentry
DynamoDBEntry
Returns
Exceptions
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
TInputentry
DynamoDBEntry
Returns
- bool
True if successfully converted, otherwise false.
Type Parameters
TInput