public static string GetConflictMessage( this IMemberFilterIgnore memberFilterIgnore, IMemberIgnoreBase conflictingMemberIgnore) { if (conflictingMemberIgnore is IMemberIgnore otherMemberIgnore) { return(memberFilterIgnore.GetConflictMessage(otherMemberIgnore)); } var otherIgnoredMemberFilter = (IMemberFilterIgnore)conflictingMemberIgnore; return($"Ignore pattern '{otherIgnoredMemberFilter.MemberFilter}' has already been configured"); }