在使用IoC容器时如何处理原始类型?
即,你有:
class Pinger { private int timeout; private string targetMachine; public Pinger(int timeout, string targetMachine) { this.timeout = timeout; this.targetMachine = targetMachine; } public void CheckPing() { ... } }
你如何获得int和string构造函数参数?