示例#1
0
        public static MethodReference?TryImportPropertySet <TResult>(this ITypeSystem typeSystem, Expression <Func <TResult> > expression)
        {
            GetMemberInfo(expression, out var declaringType, out var name);

            return(typeSystem.TryImportPropertySet(declaringType, name));
        }
示例#2
0
 public static MethodReference ImportPropertySet(this ITypeSystem typeSystem, Type declaringType, string name)
 {
     return(typeSystem.TryImportPropertySet(declaringType, name) ?? throw new WeavingException($"Can't find setter for property {name} on type {declaringType}"));
 }
示例#3
0
 public static MethodReference?TryImportPropertySet <T>(this ITypeSystem typeSystem, string name)
 {
     return(typeSystem.TryImportPropertySet(typeof(T), name));
 }