I have something like the code below.

The inyected class has a state, so I want to create a clean **new instance** of the class implementing INumberWriter every time it is called. Is there a way to do this?

```
public class NumberWriter() : INumberWriter{
   private int i = 1;
   public void Write(){
      ConsoleWrite(i++);
   }
}

public class SomeClass(){
   private INumberWriter writer;
   public SomeClass(INumberWriter writer){
      this.writer= writer;
   }

   public void AMethod(){
      for(int i=0;i<5;i++){
         writer.Write();// I want to see on console 11111 insted of 12345
      }
   }
}

```