protected virtual void PreProcessMethod(MethodInfo method) { MethodInfo callbackMethod = GenerateCallbackMethodIfNecessary(method, null); EasyCallable callable = MainTypeBuilder.CreateCallable(method.ReturnType, method.GetParameters()); _method2Delegate[method] = callable; FieldReference field = MainTypeBuilder.CreateField( String.Format("_cached_{0}", callable.ID), callable.TypeBuilder); RegisterDelegateFieldToBeInitialized(method, field, callable, callbackMethod); }
protected override void GenerateFields() { base.GenerateFields(); _targetField = MainTypeBuilder.CreateField("__target", typeof(object)); }