Ejemplo n.º 1
0
        /// <summary>
        /// Gets a Instance of <see cref="HotstringSendMethodSelectedOptions"/> From a String value
        /// </summary>
        /// <param name="s">The String to parse for values</param>
        /// <returns>
        /// Instance of <see cref="HotstringSendMethodSelectedOptions"/> if Parse succeeded; Otherwise, null.
        /// </returns>
        /// <exception cref="ArgumentNullException"></exception>
        public new static HotstringSendMethodSelectedOptions Parse(string s)
        {
            if (string.IsNullOrEmpty(s))
            {
                throw new ArgumentNullException();
            }
            try
            {
                // all chars except for `n and `t are single chars
                var opt = new HotstringSendMethodSelectedOptions();
                var so  = SelectedOptions <Enums.HotStringSendEnum> .Parse(s);

                opt.Keys    = so.Keys;
                opt.Options = so.Options;
                return(opt);
            }
            catch (Exception)
            {
                throw;
            }
        }