MFTV0004: Use the tags of the overridden or implemented member
editCause
An override or an interface implementation must accept and return values with the same tags as the member it overrides or implements. Otherwise, a caller that goes through the base member passes values the override does not expect:
public interface IOrderStore
{
Order? Find([ValueTag("OrderId")] Guid id);
}
public sealed class OrderStore : IOrderStore
{
public Order? Find([ValueTag("ProjectId")] Guid id) => null; // MFTV0004
}How to fix
Remove the attribute: the override inherits the tags of the base member. You can also change the attribute to the tags of the base member, which the code fix does:
public sealed class OrderStore : IOrderStore
{
public Order? Find(Guid id) => null; // id inherits the OrderId tag of IOrderStore.Find
}When the override is right and the base member is tagged incorrectly, fix the base member: the code fix never changes a tag inherited from a base member.