예제 #1
0
        /// <summary>
        /// Initializes new instance of <see cref="DataPair"/>
        /// </summary>
        /// <param name="name">Name of this pair</param>
        /// <param name="value">Value of this pair</param>
        public DataPair(string name, string value = null)
        {
            if (name == null)
            {
                throw new ArgumentNullException("name");
            }
#if NET20 || NET30 || NET35
            if (StringExtension.IsNullOrWhiteSpace(name))
            {
                throw new ArgumentOutOfRangeException("name");
            }
#endif

#if NET40 || NET45
            if (string.IsNullOrWhiteSpace(name))
            {
                throw new ArgumentOutOfRangeException("name");
            }
#endif

            Name  = name;
            Value = value;
        }