RazorDocs Search

Autofac

ForgeTrust.Runnable.Dependency.Autofac

Autofac IoC container integration for Runnable modules.

Overview

This package allows modules to participate in Autofac service registration, enabling advanced DI features not available in the default .NET service collection.

Usage

Inherit from RunnableAutofacModule instead of IRunnableModule if you need to use Autofac-specific registrations.

public class MyAutofacModule : RunnableAutofacModule
{
    protected override void Load(ContainerBuilder builder)
    {
        // Custom Autofac registrations
    }
}

📂 Back to Dependency List | 🏠 Back to Root

Type

RunnableAutofacHostModule

A base module that integrates Autofac into the Runnable host lifecycle.

Type

RunnableAutofacExtensions

Provides extension methods for Autofac's ContainerBuilder to simplify common registrations.

Method

RegisterImplementations

IRegistrationBuilder<object, ScanningActivatorData, DynamicRegistrationStyle> RegisterImplementations<TInterface>(this ContainerBuilder builder)

Registers all non-abstract class implementations of the specified interface type found in the interface's assembly.

Type Parameters

  • TInterfaceThe interface type to scan for implementations of.

Parameters

  • builderThe container builder.

Returns

A registration builder for the scanned types.

Type

RunnableAutofacModule

This class is simply a wrapper around the standard Autofac Module. Its goal is to ensure that your autofac use is consistent across your projects.