public static For ( IEnumerable |
||
values | IEnumerable |
|
리턴 | StoryTeller.Model.Option[] |
public static Option[] For(IEnumerable<string> values)
{
return values.Select(x => new Option {display = x, value = x}).ToArray();
}
private void selectEditor(Type type) { if (type == typeof(bool)) { editor = "boolean"; DefaultValue = false.ToString(); } else if (type.GetTypeInfo().IsEnum) { editor = "select"; options = Option.For(Enum.GetNames(type)); } }