FreshIOC and Akavache


How do you register the Akavache interface with FreshMVVM's internal IOC container, FreshIOC?

With Ninject(Portable) it is simple:


With FreshIOC, I would have thought that this would work, but it doesn't

FreshIOC.Container.Register<IBlobCache, BlobCache.LocalMachine>();

Because "static types cannot be used as type arguments"

Have not been able to find a way of doing it;



  • FaisalGFaisalG GBMember ✭✭

    So, I couldn't find a ToConstant() in FreshIOC in the end.
    The solution was to simply implement a class with Akavache.IBlobCache interface, and register this new class in the IOC as the dependency.

  • WilliamWattersonWilliamWatterson USUniversity ✭✭

    @FaisalG - have you an example of this?

Sign In or Register to comment.