ekonbenefits / impromptu-interface

Static interface to dynamic implementation (duck casting). Uses the DLR combined with Reflect.Emit.
Apache License 2.0
655 stars 67 forks source link

Null reference exception #12

Open firelizzard18 opened 9 years ago

firelizzard18 commented 9 years ago

System.NullReferenceException:

mscorlib.dll!System.Reflection.Emit.TypeBuilder.GetField(System.Type type, System.Reflection.FieldInfo field)   Unknown
ImpromptuInterface.dll!ImpromptuInterface.Build.EmitExtensions.GetFieldEvenIfGeneric(System.Type type, string fieldName)    Unknown
ImpromptuInterface.dll!ImpromptuInterface.Build.BuildProxy.EmitMethodBody(System.Reflection.Emit.MethodBuilder methodBuilder, System.Reflection.ParameterInfo[] paramInfo, ImpromptuInterface.Build.BuildProxy.MethodEmitInfo emitInfo) Unknown
ImpromptuInterface.dll!ImpromptuInterface.Build.BuildProxy.MakeMethod(System.Reflection.Emit.ModuleBuilder builder, System.Reflection.MethodInfo info, System.Reflection.Emit.TypeBuilder typeBuilder, System.Type contextType, bool nonRecursive, bool defaultImp) Unknown
ImpromptuInterface.dll!ImpromptuInterface.Build.BuildProxy.BuildTypeHelper(System.Reflection.Emit.ModuleBuilder builder, System.Type contextType, System.Type[] interfaces) Unknown
ImpromptuInterface.dll!ImpromptuInterface.Build.BuildProxy.BuildType(System.Type contextType, System.Type mainInterface, System.Type[] otherInterfaces) Unknown
ImpromptuInterface.dll!ImpromptuInterface.Impromptu.ActLike<TraceDB.Models.IRepository>(object originalDynamic, System.Type[] otherInterfaces)  Unknown
...

For GetFieldEventIfGeneric, the type is Impromptu_Callsite_Add_GUID and the fieldName Convert_Method.