Skip to content
Documentation

IRequiresConfiguration Interface

Marker interface for types that require a post-instantiation configuration step before they can be used.

public interface IRequiresConfiguration

Types implementing this interface signal to the dependency injection container that after construction, a configuration method (by default named Configure) must be called before any properties or methods are accessed. Attempting to access a property before configuration raises a TypeRequiresConfigurationAfterInstantiationException.

IRequiresConfiguration.ConfigurationMethodName Property

Section titled “IRequiresConfiguration.ConfigurationMethodName Property”

Gets the name of the method that must be called after instantiation to configure this instance. Defaults to Configure.

string ConfigurationMethodName { get; }

System.String

IRequiresConfiguration.GetConfiguredProperty<T>(T, string) Method

Section titled “IRequiresConfiguration.GetConfiguredProperty<T>(T, string) Method”

Returns field if it is not null; otherwise throws a TypeRequiresConfigurationAfterInstantiationException indicating that ConfigurationMethodName has not been called yet.

T GetConfiguredProperty<T>(T? field, string memberName);

T

The type of the property value.

field T

The backing field to check.

memberName System.String

The name of the property being accessed, used in the exception message.

T
The value of field if it is not null.

© 2026 Volue.Version v0.6.38017 November 2026