Copied to clipboard

Flag this post as spam?

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


  • Mike Chambers 636 posts 1253 karma points c-trib
    Jul 10, 2019 @ 17:45
    Mike Chambers
    0

    Umbraco 8 Signalr lightinject + ms stockticker example

    So i got the sample up and running but then can't inject umbraco services into the stockticker as it uses Lazy

    So I followed https://docs.microsoft.com/en-us/aspnet/signalr/overview/advanced/dependency-injection to decouple ready for DI..

    I'm now at https://docs.microsoft.com/en-us/aspnet/signalr/overview/advanced/dependency-injection#add-the-ninject-library

    but can't see how to use LightInject instead..

    Though this would be the way to get the IStockTicker service registered?

    public class MyComposer : Umbraco.Core.Composing.IUserComposer
        {
            public void Compose(Umbraco.Core.Composing.Composition composition)
            {
                composition.Register<IStockTicker, StockTicker>(Umbraco.Core.Composing.Lifetime.Singleton);
            }
        }
    

    but now stuck as to how to extend the UmbracoDefaultOwinStartup

    app.MapSignalR(); to get the sample back running...

    Any help greatly appreciated..

    ps also looked at https://www.lightinject.net/signalr/

    but that seems to have complications...

    https://github.com/seesharper/LightInject/issues/215

    and LightInject.SignalR

  • Rasmus Lynggaard 118 posts 325 karma points
    Oct 24, 2019 @ 07:55
    Rasmus Lynggaard
    0

    @mike: Did you ever find an answer to the issue?

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies