Skip to content

Commit 5c72347

Browse files
committed
code clean up
1 parent 5d076a6 commit 5c72347

File tree

2 files changed

+1
-3
lines changed

2 files changed

+1
-3
lines changed

src/WebApiContrib.Core.Formatter.Csv/CsvInputFormatter.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ private object ReadStream(Type type, Stream stream)
106106
var properties = useJsonAttributes
107107
? item.GetType().GetProperties().Where(pi => !pi.GetCustomAttributes<JsonIgnoreAttribute>().Any()).ToArray()
108108
: item.GetType().GetProperties();
109-
// TODO: Maybe refactor to not use positional mapping?, mapping by index could generate errors pretty easily :)
109+
110110
for (int i = 0; i < values.Length; i++)
111111
{
112112
properties[i].SetValue(item, Convert.ChangeType(values[i], properties[i].PropertyType), null);

src/WebApiContrib.Core.Formatter.Csv/CsvOutputFormatter.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,8 +100,6 @@ public async override Task WriteResponseBodyAsync(OutputFormatterWriteContext co
100100

101101
foreach (var obj in (IEnumerable<object>)context.Object)
102102
{
103-
104-
//IEnumerable<ObjectValue> vals;
105103
var vals = useJsonAttributes
106104
? obj.GetType().GetProperties()
107105
.Where(pi => !pi.GetCustomAttributes<JsonIgnoreAttribute>().Any())

0 commit comments

Comments
 (0)