Show / Hide Table of Contents

Class ADynamoAttributeConverter

The ADynamoAttributeConverter is the base class for DynamoDB attribute value converters.

Inheritance
System.Object
ADynamoAttributeConverter
DynamoBoolConverter
DynamoByteArrayConverter
DynamoDateTimeOffsetConverter
DynamoDecimalConverter
DynamoDoubleConverter
DynamoEnumConverter
DynamoFloatConverter
DynamoGuidConverter
DynamoIDictionaryConverter
DynamoIntConverter
DynamoISetByteArrayConverter
DynamoISetDecimalConverter
DynamoISetDoubleConverter
DynamoISetIntConverter
DynamoISetLongConverter
DynamoISetStringConverter
DynamoJsonElementConverter
DynamoListConverter
DynamoLongConverter
DynamoObjectConverter
DynamoStringConverter
Implements
IDynamoAttributeConverter
Namespace: LambdaSharp.DynamoDB.Serialization.Converters
Assembly: LambdaSharp.DynamoDB.Serialization.dll
Syntax
public abstract class ADynamoAttributeConverter : IDynamoAttributeConverter

Methods

CanConvert(Type)

The CanConvert(Type) method checks if this converter can handle the presented type.

Declaration
public abstract bool CanConvert(Type typeToConvert)
Parameters
Type Name Description
System.Type typeToConvert

The type to convert.

Returns
Type Description
System.Boolean

true if the converter can handle the type; otherwise, false

FromBinary(MemoryStream, Type, DynamoSerializerOptions)

The FromBinary(MemoryStream, Type, DynamoSerializerOptions) method converts a DynamoDB B attribute value to the type of the converter.

Declaration
public virtual object FromBinary(MemoryStream value, Type targetType, DynamoSerializerOptions options)
Parameters
Type Name Description
System.IO.MemoryStream value

The DynamoDB attribute value to convert.

System.Type targetType

The expected return type.

DynamoSerializerOptions options

The deserialization options.

Returns
Type Description
System.Object

An instance of type targetType.

FromBinarySet(List<MemoryStream>, Type, DynamoSerializerOptions)

The FromBinarySet(List<MemoryStream>, Type, DynamoSerializerOptions) method converts a DynamoDB BS attribute value to the type of the converter.

Declaration
public virtual object FromBinarySet(List<MemoryStream> value, Type targetType, DynamoSerializerOptions options)
Parameters
Type Name Description
System.Collections.Generic.List<System.IO.MemoryStream> value

The DynamoDB attribute value to convert.

System.Type targetType

The expected return type.

DynamoSerializerOptions options

The deserialization options.

Returns
Type Description
System.Object

An instance of type targetType.

FromBool(Boolean, Type, DynamoSerializerOptions)

The FromBool(Boolean, Type, DynamoSerializerOptions) method converts a DynamoDB BOOL attribute value to the type of the converter.

Declaration
public virtual object FromBool(bool value, Type targetType, DynamoSerializerOptions options)
Parameters
Type Name Description
System.Boolean value

The DynamoDB attribute value to convert.

System.Type targetType

The expected return type.

DynamoSerializerOptions options

The deserialization options.

Returns
Type Description
System.Object

An instance of type targetType.

FromList(List<AttributeValue>, Type, DynamoSerializerOptions)

The FromList(List<AttributeValue>, Type, DynamoSerializerOptions) method converts a DynamoDB L attribute value to the type of the converter.

Declaration
public virtual object FromList(List<AttributeValue> value, Type targetType, DynamoSerializerOptions options)
Parameters
Type Name Description
System.Collections.Generic.List<Amazon.DynamoDBv2.Model.AttributeValue> value

The DynamoDB attribute value to convert.

System.Type targetType

The expected return type.

DynamoSerializerOptions options

The deserialization options.

Returns
Type Description
System.Object

An instance of type targetType.

FromMap(Dictionary<String, AttributeValue>, Type, DynamoSerializerOptions)

The FromMap(Dictionary<String, AttributeValue>, Type, DynamoSerializerOptions) method converts a DynamoDB M attribute value to the type of the converter.

Declaration
public virtual object FromMap(Dictionary<string, AttributeValue> value, Type targetType, DynamoSerializerOptions options)
Parameters
Type Name Description
System.Collections.Generic.Dictionary<System.String, Amazon.DynamoDBv2.Model.AttributeValue> value

The DynamoDB attribute value to convert.

System.Type targetType

The expected return type.

DynamoSerializerOptions options

The deserialization options.

Returns
Type Description
System.Object

An instance of type targetType.

FromNull(Type, DynamoSerializerOptions)

The FromNull(Type, DynamoSerializerOptions) method converts a DynamoDB NULL attribute value to the type of the converter.

Declaration
public virtual object FromNull(Type targetType, DynamoSerializerOptions options)
Parameters
Type Name Description
System.Type targetType

The expected return type.

DynamoSerializerOptions options

The deserialization options.

Returns
Type Description
System.Object

An instance of type targetType.

FromNumber(String, Type, DynamoSerializerOptions)

The FromNumber(String, Type, DynamoSerializerOptions) method converts a DynamoDB N attribute value to the type of the converter.

Declaration
public virtual object FromNumber(string value, Type targetType, DynamoSerializerOptions options)
Parameters
Type Name Description
System.String value

The DynamoDB attribute value to convert.

System.Type targetType

The expected return type.

DynamoSerializerOptions options

The deserialization options.

Returns
Type Description
System.Object

An instance of type targetType.

FromNumberSet(List<String>, Type, DynamoSerializerOptions)

The FromNumberSet(List<String>, Type, DynamoSerializerOptions) method converts a DynamoDB NS attribute value to the type of the converter.

Declaration
public virtual object FromNumberSet(List<string> value, Type targetType, DynamoSerializerOptions options)
Parameters
Type Name Description
System.Collections.Generic.List<System.String> value

The DynamoDB attribute value to convert.

System.Type targetType

The expected return type.

DynamoSerializerOptions options

The deserialization options.

Returns
Type Description
System.Object

An instance of type targetType.

FromString(String, Type, DynamoSerializerOptions)

The FromString(String, Type, DynamoSerializerOptions) method converts a DynamoDB S attribute value to the type of the converter.

Declaration
public virtual object FromString(string value, Type targetType, DynamoSerializerOptions options)
Parameters
Type Name Description
System.String value

The DynamoDB attribute value to convert.

System.Type targetType

The expected return type.

DynamoSerializerOptions options

The deserialization options.

Returns
Type Description
System.Object

An instance of type targetType.

FromStringSet(List<String>, Type, DynamoSerializerOptions)

The FromStringSet(List<String>, Type, DynamoSerializerOptions) method converts a DynamoDB SS attribute value to the type of the converter.

Declaration
public virtual object FromStringSet(List<string> value, Type targetType, DynamoSerializerOptions options)
Parameters
Type Name Description
System.Collections.Generic.List<System.String> value

The DynamoDB attribute value to convert.

System.Type targetType

The expected return type.

DynamoSerializerOptions options

The deserialization options.

Returns
Type Description
System.Object

An instance of type targetType.

GetDefaultValue(Type, DynamoSerializerOptions)

The GetDefaultValue(Type, DynamoSerializerOptions) method instantiates a default value for a missing property during deserialization.

Declaration
public virtual object GetDefaultValue(Type targetType, DynamoSerializerOptions options)
Parameters
Type Name Description
System.Type targetType

The expected return type.

DynamoSerializerOptions options

The deserialization options.

Returns
Type Description
System.Object

ToAttributeValue(Object, Type, DynamoSerializerOptions)

The ToAttributeValue(Object, Type, DynamoSerializerOptions) method converts an instance to a DynamoDB attribute value.

Declaration
public virtual AttributeValue ToAttributeValue(object value, Type targetType, DynamoSerializerOptions options)
Parameters
Type Name Description
System.Object value

The value to convert.

System.Type targetType

The source value type.

DynamoSerializerOptions options

The serialization options.

Returns
Type Description
Amazon.DynamoDBv2.Model.AttributeValue

A DynamoDB attribute value, or null if the instance state cannot be represented in DynamoDB.

Implements

IDynamoAttributeConverter
In This Article
Back to top Generated by DocFX