How to override an existing interface implementation in Orchard?

85 Views Asked by At

I'd like to create a custom ILayoutManager in my module for Orchard CMS:

CustomLayoutManager : ILayoutManager

And I want to override the exiting ILayoutManager (in Orchard.Layouts module) implementation.

But I don't know which Orchard API I can use to do it, how can I enforce Orchard to use my implementation?

Thanks!

1

There are 1 best solutions below

0
shine On
[OrchardSuppressDependency("Orchard.Autoroute.Services.AutorouteService")]
public class SbSiteGovernModule : Module {
        builder.RegisterType<MyAutorouteService>().As<IAutorouteService>();
}