Skip to content

net90_EventLogHelper_SmartEventLogger_SetRegistryReader

dparvin edited this page Sep 10, 2025 · 3 revisions

SmartEventLogger.SetRegistryReader method

Specifies the IRegistryReader implementation to use when accessing the Windows Registry for log-related operations (e.g., determining default event log sources).

public static void SetRegistryReader(IRegistryReader reader)
parameter description
reader The custom IRegistryReader instance to use. This is typically used for unit testing or customizing how registry access is performed. If not set, the default implementation will be used.

Remarks

This method allows injection of a mock or testable registry reader. In production, a default RealRegistryReader is used, but in unit tests, you may inject a fake reader to simulate different registry states without accessing the actual system registry.

See Also

Clone this wiki locally