Show / Hide Table of Contents

Class DynamoISetLongConverter

The DynamoISetLongConverter class is used to convert ISet<long> value to/from a DynamoDB attribute value.

Inheritance
System.Object
ADynamoAttributeConverter
DynamoISetLongConverter
Implements
IDynamoAttributeConverter
Inherited Members
ADynamoAttributeConverter.FromNull(Type, DynamoSerializerOptions)
ADynamoAttributeConverter.FromBool(Boolean, Type, DynamoSerializerOptions)
ADynamoAttributeConverter.FromBinary(MemoryStream, Type, DynamoSerializerOptions)
ADynamoAttributeConverter.FromNumber(String, Type, DynamoSerializerOptions)
ADynamoAttributeConverter.FromString(String, Type, DynamoSerializerOptions)
ADynamoAttributeConverter.FromList(List<AttributeValue>, Type, DynamoSerializerOptions)
ADynamoAttributeConverter.FromMap(Dictionary<String, AttributeValue>, Type, DynamoSerializerOptions)
ADynamoAttributeConverter.FromBinarySet(List<MemoryStream>, Type, DynamoSerializerOptions)
ADynamoAttributeConverter.FromStringSet(List<String>, Type, DynamoSerializerOptions)
Namespace: LambdaSharp.DynamoDB.Serialization.Converters
Assembly: LambdaSharp.DynamoDB.Serialization.dll
Syntax
public class DynamoISetLongConverter : ADynamoAttributeConverter, IDynamoAttributeConverter

Fields

Instance

The Instance class field exposes a reusable instance of the class.

Declaration
public static readonly DynamoISetLongConverter Instance
Field Value
Type Description
DynamoISetLongConverter

Methods

CanConvert(Type)

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

Declaration
public override 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

Overrides
ADynamoAttributeConverter.CanConvert(Type)

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 override 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.

Overrides
ADynamoAttributeConverter.FromNumberSet(List<String>, Type, DynamoSerializerOptions)

GetDefaultValue(Type, DynamoSerializerOptions)

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

Declaration
public override 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
Overrides
ADynamoAttributeConverter.GetDefaultValue(Type, DynamoSerializerOptions)

ToAttributeValue(Object, Type, DynamoSerializerOptions)

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

Declaration
public override 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.

Overrides
ADynamoAttributeConverter.ToAttributeValue(Object, Type, DynamoSerializerOptions)

Implements

IDynamoAttributeConverter
In This Article
Back to top Generated by DocFX