Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Generate TextOption items
var field = _fieldDefinitionService.Get(areaType, id).MakeWritableClone();
var options = field.Option as TextOption;
var ran = new Random();
options.Items = Enumerable.Repeat(0, 20000).Select(i =>
new TextOption.Item()
Name = new Dictionary<string, string> { { "*", ran.Next().ToString() } },
Value = ran.Next().ToString()
field.Option = options;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment