Skip to content

Commit

Permalink
Merge pull request #4 from dotnet/master
Browse files Browse the repository at this point in the history
Update fork
  • Loading branch information
zeahmed committed May 11, 2018
2 parents 3fb99ae + 3780923 commit ea161ff
Show file tree
Hide file tree
Showing 6 changed files with 276 additions and 84 deletions.
5 changes: 3 additions & 2 deletions src/Microsoft.ML.Api/SchemaDefinition.cs
Expand Up @@ -332,8 +332,9 @@ public static SchemaDefinition Create(Type userType)

if (fieldInfo.GetCustomAttribute<NoColumnAttribute>() != null)
continue;
var mappingAttr = fieldInfo.GetCustomAttribute<ColumnNameAttribute>();
var name = mappingAttr == null ? fieldInfo.Name : (mappingAttr.Name ?? fieldInfo.Name);
var mappingAttr = fieldInfo.GetCustomAttribute<ColumnAttribute>();
var mappingNameAttr = fieldInfo.GetCustomAttribute<ColumnNameAttribute>();
string name = mappingAttr?.Name ?? mappingNameAttr?.Name ?? fieldInfo.Name;
// Disallow duplicate names, because the field enumeration order is not actually
// well defined, so we are not gauranteed to have consistent "hiding" from run to
// run, across different .NET versions.
Expand Down

0 comments on commit ea161ff

Please sign in to comment.