Table of Contents

Class AvroRandomDataOptions

Namespace
AvroSharp.Generic
Assembly
AvroSharp.dll

The shape of the values AvroRandomData generates.

public sealed class AvroRandomDataOptions
Inheritance
AvroRandomDataOptions
Inherited Members

Fields

MaxLength

The largest MaxCollectionLength and MaxStringLength: 1,048,576.

Properties

Default

Gets the default options.

LogicalValuesInDotNetRange

Gets whether logical values stay in the range of the .NET type generated code maps them to: date in DateTime's years 1 to 9999, and the timestamp-millis, timestamp-micros and local timestamps in that range too. The default is true. When false, those take any value of their underlying type. Every other logical value is always valid: decimals fit their precision, times are within a day, and UUIDs are well formed.

MaxCollectionLength

Gets the largest number of items in an array or entries in a map, from 0 to MaxLength. The default is 5.

MaxDepth

Gets how deep records nest before the generator ends the recursion, from 1 to 128 (the writers' default limit, DefaultMaxDepth, so every value can be written): below it, arrays and maps are empty and unions take the branch that ends soonest. Once a value holds 10,000 values, the arrays and maps it starts after that are empty and its unions end as soon as they can. The default is 6.

MaxStringLength

Gets the longest string, in UTF-16 code units, and the longest bytes value, in bytes, from 0 to MaxLength. Map keys are at most 8 long, or this when it is shorter. The default is 30.

NullBranchProbability

Gets how often a union with a null branch takes it, from 0 to 1, or null (the default) for as often as each other branch. Unions without a null branch pick each branch equally often.