public void Process(PropertyDefinition sourceProperty) { foreach (var attribute in sourceProperty.GetCustomAttributes <InvokeOnChangeAttribute>()) { var attributeValues = (CustomAttributeArgument[])attribute.ConstructorArguments[0].Value; var targetMethodNames = attributeValues.Select(argument => (string)argument.Value); var declaringType = sourceProperty.DeclaringType; var fromSetter = sourceProperty.GetSetMethodOrYeet(); // var fromGetter = sourceProperty.GetGetMethodOrYeet(); var fromGetter = fromSetter.Parameters[0]; foreach (var targetMethodName in targetMethodNames) { var method = declaringType.GetMethodsInBaseHierarchy(targetMethodName).FirstOrDefault(); if (method == null) { throw new MissingTargetMethodException(targetMethodName); } _weaver.Weave(new WeaveMethodParameters(fromSetter, method, null, false, null), fromGetter); } } }