Question

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.

Was it helpful?

Solution

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top