//******************************************************************************************************
// IIniFile.cs - Gbtc
//
// Copyright © 2012, Grid Protection Alliance. All Rights Reserved.
//
// Licensed to the Grid Protection Alliance (GPA) under one or more contributor license agreements. See
// the NOTICE file distributed with this work for additional information regarding copyright ownership.
// The GPA licenses this file to you under the MIT License (MIT), the "License"; you may
// not use this file except in compliance with the License. You may obtain a copy of the License at:
//
// http://www.opensource.org/licenses/MIT
//
// Unless agreed to in writing, the subject software distributed under the License is distributed on an
// "AS-IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. Refer to the
// License for the specific language governing permissions and limitations.
//
// Code Modification History:
// ----------------------------------------------------------------------------------------------------
// 08/25/2013 - J. Ritchie Carroll
// Made INI file work for both Mono and Windows based implementations.
//
//******************************************************************************************************
namespace GSF.Interop
{
///
/// Represents an interface for common INI functions.
///
public interface IIniFile
{
///
/// File name of the INI file.
///
string FileName
{
get;
set;
}
///
/// Gets the value of the specified key.
///
/// Section key exists in.
/// Name of key.
/// Default value of key.
/// Value of key.
/// This is the default member of this class.
string this[string section, string entry, string defaultValue]
{
get;
}
///
/// Gets or sets the value of the specified key.
///
/// Section key exists in.
/// Name of key.
/// The new key value to store in the INI file.
/// Value of key.
/// This is the default member of this class.
string this[string section, string entry]
{
set;
}
///
/// Gets an array of keys from the specified section in the INI file.
///
/// Section to retrieve keys from.
/// Array of keys from the specified section of the INI file.
string[] GetSectionKeys(string section);
///
/// Gets an array of that section names that exist in the INI file.
///
/// Array of section names from the INI file.
string[] GetSectionNames();
}
}