public static MethodReference?TryImportEventRemove <TResult>(this ITypeSystem typeSystem, Expression <Func <TResult> > expression) { GetMemberInfo(expression, out var declaringType, out var name); return(typeSystem.TryImportEventRemove(declaringType, name)); }
public static MethodReference ImportEventRemove(this ITypeSystem typeSystem, Type declaringType, string name) { return(typeSystem.TryImportEventRemove(declaringType, name) ?? throw new WeavingException($"Can't find remove for event {name} on type {declaringType}")); }
public static MethodReference?TryImportEventRemove <T>(this ITypeSystem typeSystem, string name) { return(typeSystem.TryImportEventRemove(typeof(T), name)); }