When you create an interface, and know that you will have a dependency on another, do you create a part of the interface constructor?
In my case, I want to create
IClientReceiveRecorder, which I can provide to the client and receive all network traffic in a short test session. It will probably just contain a set of strings.
An IEvaluator that can receive all received messages and implement various things that we want to check. For example, I may have a specific evaluator that checks to see if all lines contain the letter "c".
I know that any IEvaluator will need IClientReceiveRecorder in order to receive the messages that it needs to evaluate.
So, I see several options. I'm doing something like
interface IEvaluator
{
IEvaluator(IClientReceiveRecorder);
void Evaluate();
}
It does not compile, so I do not think so.
Maybe I'm something like
interface IEvaluator
{
void Evaluate(IClientReceiveRecorder);
}
, IClientReceiveRecorder constuctor?