using compiled delegate instead of reflection in Marr

This commit is contained in:
kay.one 2013-06-02 20:15:56 -07:00
commit ace98831c7
16 changed files with 170 additions and 388 deletions

View file

@ -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);
}