public class Foo
{
private readonly IBar _iBar;
public Foo(IBar iBar)
{
_iBar = iBar;
}
public void DoStuff()
{
_bar.DoSomething();
}
}
public interface IBar
{
void DoSomething();
}