public void Generate() { Random random = new Random(); for (int i = 0; i < 10; i++) { // Writes to first IStream that Castle can resolve var numberWriter = numberWriterFactory.Create(random.Next()); numberWriter.Write(); } }
public void Generate() { Random random = new Random(); for (int i = 0; i < 10; i++) { // Writes to the IStream instance that the factory contains var numberWriter = numberWriterFactory.Create(random.Next()); numberWriter.Write(); } }