Struct BinarySetElement
- Namespace
- DynaSharp.Serialization
- Assembly
- DynaSharp.dll
The elements of a binary set (BS): byte[], as base64.
public readonly struct BinarySetElement : IDynamoDbSetElementConverter<byte[]>
- Implements
- Inherited Members
Remarks
DynamoDB accepts a zero-length element. Arrays compare by reference, so a HashSet<T> of byte[] built with
the default comparer holds two arrays with the same bytes as two elements, and DynamoDB rejects such a set. Leave the duplicates out before
writing, or use a set type with a comparer of your own.
Explicit Interface Implementations
ReadElement(ref DynamoDbReader)
Reads the element the reader is positioned on, with the reader's getter for SetType. Reads nothing beyond the element.
static byte[] ReadElement(ref DynamoDbReader reader)
Parameters
readerDynamoDbReaderThe reader, positioned on an element after TryReadSetElement() returned true.
Returns
- byte[]
The element.
Exceptions
- JsonException
The text is not valid base64.
SetType
static AttributeType SetType { get; }
Returns
WriteElement(DynamoDbWriter, byte[])
Writes one element, with the writer's Write...SetElement method for SetType.
static void WriteElement(DynamoDbWriter writer, byte[] value)
Parameters
writerDynamoDbWriterThe writer, inside a set that SetType started.
valuebyte[]The element.
Exceptions
- ArgumentNullException
valueis null.