public string[] GetValue(ArrayArgument argument) { return (argument .Options .Select(o => FindValue(o, argument)) .FirstOrDefault(value => value != null) ?.Split(';') ?? argument.DefaultValue); }
public T?[] GetValue <T>(ArrayArgument <T> argument) where T : struct { return(GetValue(argument as ArrayArgument)?.Select(SafeConvertTo <T>).ToArray() ?? argument.DefaultValue.Cast <T?>().ToArray()); }