I have something like this:
public interface IDeviceMonitor {
int DeviceId { get; }
event DeviceUpdatedHandler NewValueRecieved;
void Start();
void Stop();
}
public class DeviceInactivityDetector {
...
public virtual void DeviceUpdated(IDeviceMonitor device, DeviceUpdatedArgs args) {
....
}
}
currently, in my application startup file I do
var dm = IoC.Container.Resolve<IDeviceMonitor>();
var did = IoC.Container.Resolve<DeviceInactivityDetector>();
dm.NewValueRecieved += new DeviceUpdatedHandler(did.DeviceUpdated);
I imagine it is possible to do this wiring with my castle configuration file via xml. But how?