When implementing the Visitor Pattern, is it a bad idea to add additional parameters to the Accept and Visit methods? I have never seen any examples that do this but no mention of it being a bad idea either.
I would like to use this pattern in my domain model however additional parameters are required along with the entity itself.
eg -
public interface ISomethingVisitor
{
void Visit(Foo foo, int p1, int p2);
}
public interface ISomethingVisitable
{
void Accept(ISomethingVisitor visitor, int p1, int p2);
}