//-----------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation.
//
//-----------------------------------------------------------------------
namespace Microsoft.Database.Isam.Config
{
using System;
using System.Collections;
using System.Collections.Generic;
///
/// A delegate type that is used by the config classes to change the parameter get behaviour when the config set is alive (is associated with a container).
///
/// The parameter id.
/// The parameter value.
/// True if the parameter's value was read and returned. False otherwise.
internal delegate bool TryGetParamDelegate(int key, out object value);
///
/// Base class for a config set.
///
public abstract class ConfigSetBase : IConfigSet
{
///
/// Initializes a new instance of the ConfigSetBase class.
///
protected ConfigSetBase()
{
this.ParamStore = new Dictionary();
}
///
/// Gets or sets the dictionary containing all config parameters.
///
internal Dictionary ParamStore { get; set; }
///
/// Gets or sets the delegate used by config sets to update parameters.
///
internal Action SetParamDelegate { get; set; }
///
/// Gets or sets the delegate used by config sets to get parameter values.
///
internal TryGetParamDelegate GetParamDelegate { get; set; }
///
/// Gets a particular config parameter's value.
///
/// The parameter to get.
/// The requested parameter's value.
public object this[int key]
{
get
{
return this.GetParam