Skip to content

Commit

Permalink
Remove dead code
Browse files Browse the repository at this point in the history
  • Loading branch information
Jericho committed Apr 11, 2021
1 parent f9fb14b commit 6cf2782
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions Source/StrongGrid/Utilities/MailPersonalizationConverter.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
using Newtonsoft.Json;
using Newtonsoft.Json;
using StrongGrid.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;

namespace StrongGrid.Utilities
{
Expand Down Expand Up @@ -71,13 +70,7 @@ public override void WriteJson(JsonWriter writer, object value, JsonSerializer s

writer.WriteStartObject();

#if NETSTANDARD1
var props = value.GetType().GetTypeInfo().DeclaredProperties;
#else
var props = value.GetType().GetProperties();
#endif

foreach (var propertyInfo in props)
foreach (var propertyInfo in value.GetType().GetProperties())
{
var propertyCustomAttributes = propertyInfo.GetCustomAttributes(false);
var propertyConverterAttribute = propertyCustomAttributes.OfType<JsonConverterAttribute>().FirstOrDefault();
Expand Down

0 comments on commit 6cf2782

Please sign in to comment.