Table of Contents

Method RegisterFunctionsFrom

Namespace
RuleWright.Extensions.Functions
Assembly
RuleWright.Extensions.Functions.dll

RegisterFunctionsFrom(RuleWrightBuilder, Assembly)

Scans an assembly and registers every public, concrete IRuleFunction type that has a public parameterless constructor. Discovery lets a project keep its rule functions as ordinary classes and wire them up with one call instead of registering each by hand.

public static RuleWrightBuilder RegisterFunctionsFrom(this RuleWrightBuilder builder, Assembly assembly)

Parameters

builder RuleWrightBuilder

The builder.

assembly Assembly

The assembly to scan.

Returns

RuleWrightBuilder

The same builder, for chaining.

Exceptions

ArgumentNullException

builder or assembly is null.

ArgumentException

Two discovered functions share a name, or a name is already registered.