Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Carl Sjöholm 44 posts 327 karma points
    Jun 25, 2019 @ 08:02
    Carl Sjöholm
    0

    LightInject Decorators

    Hi.

    How do I apply decorators in IUserComposer?

    https://www.lightinject.net/designpatterns/#_code0

     composition.Decorate<>()
    

    Does not exist, I want to use a default vs override pattern on services for example.

    // Carl

  • Jarno 21 posts 152 karma points
    Oct 01, 2019 @ 13:20
    Jarno
    100

    Hi Carl,

    You can use the following to acces the light inject container.:

    var container = composition.Concrete as LightInject.ServiceContainer;
    

    If you have the container it's possible to use decorators. You can check https://www.zpqrtbnk.net/posts/composing-umbraco-v8/ for more information.

    I hope this will help you.

    Jarno

Please Sign in or register to post replies

Write your reply to:

Draft