// ******************************************************************************//
//  RAYTHEON PROPRIETARY: THIS DOCUMENT CONTAINS DATA OR INFORMATION
//  PROPRIETARY TO RAYTHEON COMPANY AND IS RESTRICTED TO USE ONLY BY PERSONS
//  AUTHORIZED BY RAYTHEON COMPANY IN WRITING TO USE IT. DISCLOSURE TO
//  UNAUTHORIZED PERSONS WOULD LIKELY CAUSE SUBSTANTIAL COMPETITIVE HARM TO
//  RAYTHEON COMPANY''S BUSINESS POSITION. NEITHER SAID DOCUMENT NOR ITS
//  CONTENTS SHALL BE FURNISHED OR DISCLOSED TO OR COPIED OR USED BY PERSONS
//  OUTSIDE RAYTHEON COMPANY WITHOUT THE EXPRESS WRITTEN APPROVAL OF RAYTHEON
//  COMPANY.
//
//  THIS PROPRIETARY NOTICE IS NOT APPLICABLE IF DELIVERED TO THE U.S. GOVERNMENT
//
//  UNPUBLISHED WORK - COPYRIGHT RAYTHEON COMPANY.
//
//  WARNING: THIS DOCUMENT CONTAINS TECHNICAL DATA AND / OR TECHNOLOGY WHOSE
//  EXPORT OR DISCLOSURE TO NON-U.S. PERSONS, WHEREVER LOCATED, IS RESTRICTED
//  BY THE INTERNATIONAL TRAFFIC IN ARMS REGULATIONS (ITAR) (22 C.F.R. SECTION
//  120-130) OR THE EXPORT ADMINISTRATION REGULATIONS (EAR) (15 C.F.R. SECTION
//  730-774). THIS DOCUMENT CANNOT BE EXPORTED (E.G., PROVIDED TO A SUPPLIER
//  OUTSIDE OF THE UNITED STATES) OR DISCLOSED TO A NON-U.S. PERSON, WHEREVER
//  LOCATED, UNTIL A FINAL JURISDICTION AND CLASSIFICATION DETERMINATION HAS
//  BEEN COMPLETED AND APPROVED BY RAYTHEON, AND ANY REQUIRED U.S. GOVERNMENT
//  APPROVALS HAVE BEEN OBTAINED. VIOLATIONS ARE SUBJECT TO SEVERE CRIMINAL
//  PENALTIES.
//
//  DOD 5220.22-M, INDUSTRIAL SECURITY MANUAL, CHAPTER 5, SECTION 1 THROUGH 9 :
//  FOR CLASSIFIED DOCUMENTS FOLLOW THE PROCEDURES IN OR DOD 5200.1-R,
//  INFORMATION SECURITY PROGRAM, CHAPTER 6. FOR UNCLASSIFIED, LIMITED DOCUMENTS
//  DESTROY BY ANY  METHOD THAT WILL PREVENT DISCLOSURE OF CONTENTS OR
//  RECONSTRUCTION OF THE DOCUMENT.
// ****************************************************************************//

namespace Raytheon.Common
{
   /// <summary>
   /// Configuration interface
   /// restored from the previous version of Raytheon.Configuration package
   /// </summary>
   public interface IConfiguration
   {
      /// <summary>
      /// Sets the configuration value.
      /// </summary>
      /// <param name="section">The section.</param>
      /// <param name="key">The key.</param>
      /// <param name="value">The value.</param>
      void SetConfigurationValue(string section, string key, string value);

      /// <summary>
      /// Gets the configuration value.
      /// </summary>
      /// <param name="section">The section.</param>
      /// <param name="key">The key.</param>
      /// <param name="defaultValue">The default value.</param>
      /// <returns></returns>
      string GetConfigurationValue(string section, string key, string defaultValue);

      /// <summary>
      /// Gets the configuration value.
      /// </summary>
      /// <param name="section">The section.</param>
      /// <param name="key">The key.</param>
      /// <returns></returns>
      string GetConfigurationValue(string section, string key);

      /// <summary>
      /// Sets the XML configuration.
      /// </summary>
      /// <param name="name">The name.</param>
      /// <param name="xml">The XML.</param>
      void SetXmlConfiguration(string name, string xml);

      /// <summary>
      /// Gets the XML configuration.
      /// </summary>
      /// <param name="name">The name.</param>
      /// <returns></returns>
      string GetXmlConfiguration(string name);

      /// <summary>
      /// Attempts to get the enumerated configuration value.  
      /// If it does not exist or cannot be parsed to a valid value, 
      /// it will create a new section called Valid_{key} and list the valid enumeration values.
      /// </summary>
      /// <param name="section">The section.</param>
      /// <param name="key">The key.</param>
      /// <param name="defaultValue">The default value.</param>
      /// <returns></returns>
      bool TryGetEnumValue<T>(string section, string key, out T value) where T : struct;

   }
}
