title: What is the best strategy for Dependency Injection of User Input?
body: <p>I've used a fair amount of dependency injection, but I'd like to get input on how to handle information from the user at runtime.</p>
  
  <p>I have a class that connects to a com port. I allow the user to select the com port number. Right now, I have that com port parameter as a constructor argument. The reasoning being that the class cannot function without that information, and it's implementation specific (a mock version of this class wouldn't need a com port).</p>
  
  <p>The alternative is to have a "Start" method that takes in the com port, or have a property that sets the com port. This makes it very compatible with an IoC container, but it doesn't necessarily make sense from the perspective of the class.</p>
  
  <p>It seems like the logical route conflicts with the dependency injection design, but it's because my UI is getting information for a specific type of class.</p>
  
  <p>Other alternatives would include using an IoC container that lets me pass in additional constructor parameters, or just constructing the classes I need at the top level without using dependency injection.</p>
  
  <p>Is there a generally accepted standard pattern for this type of problem?</p>