protected override FieldDefinition GetFieldDefinitionTemplate() { var def = new MultiChoiceFieldDefinition(); var choiceCount = Rnd.Int(10) + 1; for (var index = 0; index < choiceCount; index++) { def.Choices.Add(Rnd.String(8)); def.Mappings.Add(Rnd.String(8)); } return def; }
protected override FieldDefinition GetFieldDefinitionTemplate() { var def = new MultiChoiceFieldDefinition(); var choiceCount = Rnd.Int(10) + 1; for (var index = 0; index < choiceCount; index++) { var choiceValue = Rnd.String(8); def.Choices.Add(choiceValue); def.Mappings.Add(choiceValue); } defaultValue = Rnd.RandomFromArray(def.Choices); def.DefaultValue = defaultValue; return def; }
public static ModelNode AddMultiChoiceField(this ModelNode model, MultiChoiceFieldDefinition definition, Action<ModelNode> action) { return model.AddDefinitionNode(definition, action); }
public static ModelNode AddMultiChoiceField(this ModelNode model, MultiChoiceFieldDefinition definition) { return AddMultiChoiceField(model, definition, null); }