using System;

namespace DeviceRepair.Utils.Config
{
    /// <summary>
    /// 是否DES加密特性
    /// </summary>
    [AttributeUsage(AttributeTargets.Property, AllowMultiple = false)]
    public class DESEncryptedAttribute : Attribute
    {
        #region Fieles & Property
        private bool isEncrypted;

        /// <summary>
        /// 属性值是否是DES加密文本
        /// </summary>
        public bool IsEncrypted
        {
            get
            {
                return isEncrypted;
            }
            set
            {
                isEncrypted = value;
            }
        }

        #endregion

        #region Ctor
        /// <summary>
        /// Ctor
        /// </summary>
        public DESEncryptedAttribute()
            : this(true)
        {
        }
        /// <summary>
        /// Ctor
        /// </summary>
        /// <param name="required">属性值是否是DES加密文本</param>
        public DESEncryptedAttribute(bool required)
        {
            this.isEncrypted = required;
        }

        #endregion
    }
}
