mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-19 21:13:28 -07:00
using compiled delegate instead of reflection in Marr
This commit is contained in:
parent
9db5b7963e
commit
ace98831c7
16 changed files with 170 additions and 388 deletions
|
@ -1,14 +1,17 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace Marr.Data.Reflection
|
||||
{
|
||||
public interface IReflectionStrategy
|
||||
{
|
||||
void SetFieldValue<T>(T entity, string fieldName, object val);
|
||||
object GetFieldValue(object entity, string fieldName);
|
||||
|
||||
GetterDelegate BuildGetter(Type type, string memberName);
|
||||
SetterDelegate BuildSetter(Type type, string memberName);
|
||||
|
||||
object CreateInstance(Type type);
|
||||
}
|
||||
|
||||
public delegate void SetterDelegate(object instance, object value);
|
||||
public delegate object GetterDelegate(object instance);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue