/*
* Copyright (c) 2023 ETH Zürich, Educational Development and Technology (LET)
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
using System.Collections.Generic;
using SafeExamBrowser.SystemComponents.Contracts.Registry.Events;
namespace SafeExamBrowser.SystemComponents.Contracts.Registry
{
///
/// Provides functionality related to the Windows registry.
///
public interface IRegistry
{
///
/// Fired when a registry value previously registred via has changed.
///
event RegistryValueChangedEventHandler ValueChanged;
///
/// Starts monitoring the specified registry value.
///
void StartMonitoring(string key, string name);
///
/// Stops the monitoring of all previously registered registry values.
///
void StopMonitoring();
///
/// Stops the monitoring of the specified registry value.
///
void StopMonitoring(string key, string name);
///
/// Attempts to read the value of the given name under the specified registry key.
///
bool TryRead(string key, string name, out object value);
///
/// Attempts to read the value names of the given registry key.
///
bool TryGetNames(string key, out IEnumerable names);
///
/// Attempts to read the subkey names of the given registry key.
///
bool TryGetSubKeys(string key, out IEnumerable subKeys);
}
}