Configure.Instance.Configurer
.ConfigureProperty<YourHandlerType>(h => h.BoolProperty,
Bool.Parse(ConfigurationManager.AppSettings["YourSetting"]));
In future versions, this will be even easier.
Edit:
You can try registering late with IWantToRunBeforeConfigurationIsFinalized
, as suggested by David.
You can also register the component early. Since NServiceBus registers handlers as DependencyLifecycle.InstancePerUnitOfWork
, your code should be doing the same
Configure.Component<YourHandlerType>(DependencyLifecycle.InstancePerUnitOfWork)
.ConfigureProperty(h => h.BoolProperty,
Bool.Parse(ConfigurationManager.AppSettings["YourSetting"]));