// --------------------------------------------------------------------------------------------------------------------
// <copyright file="Microsoft.Exchange.CtsResources.SharedStrings.cs" company="Microsoft Corporation">
//   Copyright (c) 2008, 2009, 2010 All Rights Reserved, Microsoft Corporation
//
//   This source is subject to the Microsoft Permissive License.
//   Please see the License.txt file for more information.
//   All other rights reserved.
//
//   THIS CODE AND INFORMATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY 
//   KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
//   IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
//   PARTICULAR PURPOSE.
// </copyright>
// <summary>
//   Shared string resources.
// </summary>
// --------------------------------------------------------------------------------------------------------------------

namespace Microsoft.Exchange.CtsResources
{
    using System.Resources;

    /// <summary>
    /// Shared string resources.
    /// </summary>
    internal static class SharedStrings
    {
        /// <summary>
        /// A resource manager for the shared strings.
        /// </summary>
        private static readonly ResourceManager ResourceManager = 
            new ResourceManager("Microsoft.Exchange.CtsResources.SharedStrings", typeof(SharedStrings).Assembly);

// Orphaned WPL code.
#if false
        /// <summary>
        /// Identifiers for the string resource name.
        /// </summary>
        private static readonly string[] stringIdentifiers = 
        {
            "CountTooLarge", 
            "CannotSeekBeforeBeginning", 
            "CannotSetNegativelength", 
            "InvalidFactory", 
            "OffsetOutOfRange", 
            "CountOutOfRange", 
            "StringArgumentMustBeAscii"
        };

        /// <summary>
        /// The string resource identifiers.
        /// </summary>
        public enum Identifiers
        {
            /// <summary>
            /// The count was too large.
            /// </summary>
            CountTooLarge, 

            /// <summary>
            /// A seek was attempted before the beginning position of the stream.
            /// </summary>
            CannotSeekBeforeBeginning, 

            /// <summary>
            /// The length of the stream cannot be negative.
            /// </summary>
            CannotSetNegativelength, 
            
            /// <summary>
            /// An invalid factory name was specified.
            /// </summary>
            InvalidFactory, 

            /// <summary>
            /// The offset was outside the range of the stream.
            /// </summary>
            OffsetOutOfRange, 

            /// <summary>
            /// The character count was outside the length of the stream.
            /// </summary>
            CountOutOfRange, 

            /// <summary>
            /// The string argument was not an ASCII stream.
            /// </summary>
            StringArgumentMustBeAscii
        }

        /// <summary>
        /// Identifiers for the parameter which caused an error.
        /// </summary>
        public enum ParameterIdentifiers
        {
            /// <summary>
            /// The file creation failed.
            /// </summary>
            CreateFileFailed
        }
#endif

        /// <summary>
        /// Gets the localized string for the Count Too Large error.
        /// </summary>
        public static string CountTooLarge
        {
            get
            {
                return ResourceManager.GetString("CountTooLarge");
            }
        }

        /// <summary>
        /// Gets the localized string for the Cannot Seek Before Beginning error.
        /// </summary>
        public static string CannotSeekBeforeBeginning
        {
            get
            {
                return ResourceManager.GetString("CannotSeekBeforeBeginning");
            }
        }

        /// <summary>
        /// Gets the localized string for the Cannot Set Negative Length error.
        /// </summary>
        public static string CannotSetNegativelength
        {
            get
            {
                return ResourceManager.GetString("CannotSetNegativelength");
            }
        }

        // Orphaned WPL code.
#if false
        /// <summary>
        /// Gets the localized string for the Offset Out of Range error.
        /// </summary>
        public static string OffsetOutOfRange
        {
            get
            {
                return ResourceManager.GetString("OffsetOutOfRange");
            }
        }

        /// <summary>
        /// Gets the localized string for the Count Out of Range error.
        /// </summary>
        public static string CountOutOfRange
        {
            get
            {
                return ResourceManager.GetString("CountOutOfRange");
            }
        }

        /// <summary>
        /// Gets the localized string for the Invalid Factory error.
        /// </summary>
        public static string InvalidFactory
        {            
            get
            {
                return ResourceManager.GetString("InvalidFactory");
            }
        }

        /// <summary>
        /// Gets the localized string for the String Argument Must Be ASCII error.
        /// </summary>
        public static string StringArgumentMustBeAscii
        {
            get
            {
                return ResourceManager.GetString("StringArgumentMustBeAscii");
            }
        }

        /// <summary>
        /// Gets the localized string for the Create File Failed parameter.
        /// </summary>
        /// <param name="filePath">The file path that failed the create file action.</param>
        /// <returns>Rhe localized string for the Create File Failed parameter.</returns>
        public static string CreateFileFailed(string filePath)
        {
            return string.Format(ResourceManager.GetString("CreateFileFailed"), filePath);
        }

        /// <summary>
        /// Gets the localized string for the specified identifier.
        /// </summary>
        /// <param name="key">The resource identifier.</param>
        /// <returns>The localized string for the specified identifier.</returns>
        public static string GetLocalizedString(Identifiers key)
        {
            return ResourceManager.GetString(stringIdentifiers[(int)key]);
        }
#endif
    }
}
