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.

  • inherited from a solid class interface.
  • To start / set prices in that concrete square.
  • Injecting concrete squared through end-point config.

    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

    Popular posts from this blog

    Verilog Error: output or inout port "Q" must be connected to a structural net expression -

    jasper reports - How to center align barcode using jasperreports and barcode4j -

    c# - ASP.NET MVC - Attaching an entity of type 'MODELNAME' failed because another entity of the same type already has the same primary key value -