Merge pull request #1156 from Bond-009/sep

Small cleanups here and there
This commit is contained in:
Anthony Lavado
2019-06-13 22:27:00 -04:00
committed by GitHub
9 changed files with 80 additions and 177 deletions

View File

@@ -48,7 +48,7 @@ namespace Emby.Server.Implementations.Services
foreach (var propertyInfo in RestPath.GetSerializableProperties(type))
{
var propertySetFn = TypeAccessor.GetSetPropertyMethod(type, propertyInfo);
var propertySetFn = TypeAccessor.GetSetPropertyMethod(propertyInfo);
var propertyType = propertyInfo.PropertyType;
var propertyParseStringFn = GetParseFn(propertyType);
var propertySerializer = new PropertySerializerEntry(propertySetFn, propertyParseStringFn, propertyType);
@@ -110,9 +110,9 @@ namespace Emby.Server.Implementations.Services
}
}
internal class TypeAccessor
internal static class TypeAccessor
{
public static Action<object, object> GetSetPropertyMethod(Type type, PropertyInfo propertyInfo)
public static Action<object, object> GetSetPropertyMethod(PropertyInfo propertyInfo)
{
if (!propertyInfo.CanWrite || propertyInfo.GetIndexParameters().Length > 0)
{