Some code style cleanup

This commit is contained in:
Haacked
2014-02-20 09:23:56 -08:00
parent b1650bbd2b
commit 9257ba4f41

View File

@@ -30,14 +30,12 @@ namespace Octokit.Internal
[SuppressMessage("Microsoft.Design", "CA1007:UseGenericsWhereAppropriate", Justification = "Need to support .NET 2")]
protected override bool TrySerializeUnknownTypes(object input, out object output)
{
if (input == null) throw new ArgumentNullException("input");
output = null;
Type type = input.GetType();
if (type.FullName == null)
return false;
IDictionary<string, object> obj = new JsonObject();
IDictionary<string, ReflectionUtils.GetDelegate> getters = GetCache[type];
foreach (KeyValuePair<string, ReflectionUtils.GetDelegate> getter in getters)
Ensure.ArgumentNotNull(input, "input");
var type = input.GetType();
var jsonObject = new JsonObject();
var getters = GetCache[type];
foreach (var getter in getters)
{
if (getter.Value != null)
{
@@ -45,10 +43,10 @@ namespace Octokit.Internal
if (value == null)
continue;
obj.Add(MapClrMemberNameToJsonFieldName(getter.Key), value);
jsonObject.Add(MapClrMemberNameToJsonFieldName(getter.Key), value);
}
}
output = obj;
output = jsonObject;
return true;
}