-
Notifications
You must be signed in to change notification settings - Fork 0
net472_EventLogHelper.Interfaces_IRegistryReader
dparvin edited this page Sep 10, 2025
·
1 revision
Provides an abstraction layer for reading from and validating access to the Windows Registry.
public interface IRegistryReader| name | description |
|---|---|
| GetDefaultEventLogSource(…) | Attempts to determine a default event source for the specified event log. |
| HasRegistryAccess(…) | Verifies whether the current user has sufficient permissions to access a registry key. |
| SubKeyExists(…) | Checks whether a specific registry subkey exists under the given hive and path. |
The IRegistryReader interface decouples registry operations from direct calls to Registry. This enables safer, more testable code by allowing registry access to be mocked or replaced in unit tests without requiring actual machine registry modifications.
Implementations typically wrap RegistryKey APIs, but custom implementations may return simulated results for testing security scenarios (e.g., missing permissions, missing keys).
- namespace EventLogHelper.Interfaces
- assembly EventLogHelper
- IRegistryReader.cs