문제

I'm using Autofac as my IoC. I have one object that I would like configurable in the app.config file. This object has a property of type IPAddress. I have a TypeConverter on my property to convert between string and IPAddress. However, it appears that Autofac does not use the TypeConverter on my property. Instead it just throws an error saying that its TypeConverter won't convert string to IPAddress. Can I make Autofac use my TypeConverter to specify the IP address in the app.config? I would like to avoid adding an additional property that takes a string type.

도움이 되었습니까?

해결책

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top