Pass Memory stream & string builder as parameters to C# class

  • Thread starter Thread starter Gausha
  • Start date Start date
G

Gausha

Guest
I have a class which needs a .NET Memorystream & string builder to work :

public someclass(stream Stream, stringbuilder builder)

{

}

I want to write this code in a loosely coupled way (using DI) so that this class remains mockable & unit testable.

Can any one suggest how to do it ? How to pass the contracts rather than objects itself to this class ? Which design pattern to use ?

Continue reading...
 
Back
Top