internal Type GetOrCreateProxyType(ProxyTypeDefinition typeDefinition) { if (typeDefinition is null) { throw new ArgumentNullException(nameof(typeDefinition)); } string name = typeDefinition.Name; Type type = proxyTypes.FirstOrDefault(p => p.Name == name); if (type == null) { TypeBuilder typeBuilder = Module.DefineType(typeDefinition.FullName, typeDefinition.TypeAttributes); ProxyScope proxyScope = new ProxyScope(this, typeBuilder, typeDefinition); proxyScope.DefineTypeAndMembers(); type = typeBuilder.BuildType(); proxyTypes.Add(type); } return(type); }
public virtual void AfterInvoke(ProxyScope proxyScope, ILGenerator il, CallbackMethodDefinition callbackMethodDefinition) { }
public virtual void BeforeDefine(ProxyScope proxyScope) { }
public virtual void AfterDefine(ProxyScope proxyScope) { }