properties - How to set a boolean property in NServiceBus MessageHandler through EndPointConfig -
I want to set a value for a public boolean property through endpoint configs in an NSRCBIS message handler.
Is there any other way to achieve this?
configure. ConfuWire Confidential proxy by & lt; YourHandlerType & gt; (H = & gt; H. Bulpleproperty, Bool ConfigurationManager.AppSettings ["YourSetting"])); In future versions, this will also happen.
EDIT:
You can try registering late by IWantToRunBeforeConfigurationIsFinalized , as suggested by David You can register the component as soon as NServiceBus registers, your code should handlers only
Configure.Component & LT; YourHandlerType & gt; (DependencyLifecycle.InstancePerUnitOfWork) .ConfigureProperty (h = & gt; h.BoolProperty, Bool.Parse (ConfigurationManager .AppSettings ["YourSetting"]));
Comments
Post a Comment