Skip to content
This repository was archived by the owner on Dec 24, 2022. It is now read-only.

Commit 172afd4

Browse files
committed
remove unused getter/setter automapping via backing methodinfo
1 parent f70f16f commit 172afd4

File tree

1 file changed

+0
-31
lines changed

1 file changed

+0
-31
lines changed

src/ServiceStack.Text/AutoMappingUtils.cs

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -507,37 +507,6 @@ private static Dictionary<string, AssignmentMember> GetMembers(Type type, bool i
507507
map[info.Name] = new AssignmentMember(fieldInfo.FieldType, fieldInfo);
508508
continue;
509509
}
510-
511-
var methodInfo = info as MethodInfo;
512-
if (methodInfo != null)
513-
{
514-
var parameterInfos = methodInfo.GetParameters();
515-
if (isReadable)
516-
{
517-
if (parameterInfos.Length == 0 && methodInfo.ReturnType == typeof(object))
518-
{
519-
var name = info.Name.StartsWith("get_") ? info.Name.Substring(4) : info.Name;
520-
if (!map.ContainsKey(name))
521-
{
522-
map[name] = new AssignmentMember(methodInfo.ReturnType, methodInfo);
523-
continue;
524-
}
525-
}
526-
}
527-
else
528-
{
529-
if (parameterInfos.Length == 1 && methodInfo.ReturnType == typeof(void) &&
530-
methodInfo.GetParameters()[0].ParameterType == typeof(object))
531-
{
532-
var name = info.Name.StartsWith("set_") ? info.Name.Substring(4) : info.Name;
533-
if (!map.ContainsKey(name))
534-
{
535-
map[name] = new AssignmentMember(parameterInfos[0].ParameterType, methodInfo);
536-
continue;
537-
}
538-
}
539-
}
540-
}
541510
}
542511
return map;
543512
}

0 commit comments

Comments
 (0)