diff options
| author | Roy Ben Shabat <Roy.mail.net@gmail.com> | 2020-12-29 01:25:37 +0200 |
|---|---|---|
| committer | Roy Ben Shabat <Roy.mail.net@gmail.com> | 2020-12-29 01:25:37 +0200 |
| commit | 5d68a000c44712026835be2af4698411e931865e (patch) | |
| tree | edf078c59631df433c26268d39c51c58343862dd /Software/Visual_Studio/Tango.CSV | |
| parent | 29241b674e6e747ce64e521446e87596eb66dedd (diff) | |
| download | Tango-5d68a000c44712026835be2af4698411e931865e.tar.gz Tango-5d68a000c44712026835be2af4698411e931865e.zip | |
Latest release notes.
Fixed issue with color space transition from volume.
New job creation template.xlsx
Improved job csv importer.
Fixed issue with CsvReader and CsvOrder Attr.
Diffstat (limited to 'Software/Visual_Studio/Tango.CSV')
| -rw-r--r-- | Software/Visual_Studio/Tango.CSV/CsvFileReader.cs | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/Software/Visual_Studio/Tango.CSV/CsvFileReader.cs b/Software/Visual_Studio/Tango.CSV/CsvFileReader.cs index 79f716aab..c4e3e6d07 100644 --- a/Software/Visual_Studio/Tango.CSV/CsvFileReader.cs +++ b/Software/Visual_Studio/Tango.CSV/CsvFileReader.cs @@ -247,6 +247,15 @@ namespace Tango.CSV var flags = BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.IgnoreCase | (staticMember ? BindingFlags.Static : BindingFlags.Instance); Action<T, string> action = null; + var propByIndex = typeof(T).GetProperties(flags).SingleOrDefault(x => x.GetCustomAttribute<CsvOrderAttribute>() != null && x.GetCustomAttribute<CsvOrderAttribute>().Index == index); + + if (propByIndex != null) + { + var pFunc = StringToObject(propByIndex.PropertyType); + action = EmitSetValueAction(propByIndex, pFunc); + return action; + } + PropertyInfo pi = typeof(T).GetProperty(c, flags); if (pi != null) { @@ -264,17 +273,6 @@ namespace Tango.CSV } } - if (action == null && index != null) - { - var propByIndex = typeof(T).GetProperties(flags).SingleOrDefault(x => x.GetCustomAttribute<CsvOrderAttribute>() != null && x.GetCustomAttribute<CsvOrderAttribute>().Index == index); - - if (propByIndex != null) - { - var pFunc = StringToObject(propByIndex.PropertyType); - action = EmitSetValueAction(propByIndex, pFunc); - } - } - return action; } |
