Dtos: Get rid of more warnings
This commit is contained in:
@ -36,7 +36,7 @@ namespace Elwig.Models.Dtos {
|
||||
var elType = type?.GetElementType();
|
||||
return type != null && type.IsValueType && type.Name.StartsWith("ValueTuple") ? type.GetFields().Select(f => f.FieldType) :
|
||||
type != null && elType != null && type.IsArray && elType.IsValueType && elType.Name.StartsWith("ValueTuple") ? elType.GetFields().Select(f => f.FieldType) :
|
||||
new Type?[] { type };
|
||||
[type];
|
||||
}).ToList();
|
||||
ColumnSpans = ColumnTypes.Select(type => {
|
||||
var elType = type?.GetElementType();
|
||||
@ -44,7 +44,7 @@ namespace Elwig.Models.Dtos {
|
||||
type != null && elType != null && type.IsArray && elType.IsValueType && elType.Name.StartsWith("ValueTuple") ? elType.GetFields().Length : 1;
|
||||
}).ToList();
|
||||
ColumnWidths = colNames.Select(c => c.Item4).ToList();
|
||||
ColumnUnits = colNames.Select(c => c.Item3?.Split("|").Select(p => p.Length == 0 ? null : p).ToArray() ?? Array.Empty<string?>()).ToList();
|
||||
ColumnUnits = colNames.Select(c => c.Item3?.Split("|").Select(p => p.Length == 0 ? null : p).ToArray() ?? []).ToList();
|
||||
}
|
||||
|
||||
public DataTable(string name, string fullName, IEnumerable<T> rows, IEnumerable<(string, string, string?)>? colNames = null) :
|
||||
|
Reference in New Issue
Block a user