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