Catel/Catel.Fody

Attribute to suppress message

Opened this issue · 1 comments

Add attribute to suppress message

Method 'XXXX' matches automatic change method name but has parameters and will not be used as automatic change callback. Rename the method to remove this warning or remove parameters to use as automatic callback method.
fx I had class

class SomeBaseViewModel<T> : ViewModelBase
{
	public T SelectedItem { get; set; }

	protected virtual void OnSelectedItemChanged(T item) { }

	[SuppressMessage("CodeQuality", "IDE0051:Remove unused private members", Justification = "Used by generator")]
	private void OnSelectedItemChanged()
	{
		OnSelectedItemChanged(SelectedItem);
	}
}

I would like to my build be silent

resolution:

add some code here

var callbackReferences = (from method in declaringType.Methods

to not take method with some attribute into account

It can be NoWeavingAttribute or more contextual