/// <summary> /// Creates a new instance of <see cref="HotstringSendMethodSelectedOptions"/> populated with the /// values in <paramref name="Options"/> /// </summary> /// <param name="Options">The Array of Enum Values use to populate the instance</param> /// <returns> /// Instance of <see cref="HotstringSendMethodSelectedOptions"/>. If <paramref name="Options"/> is null /// then return instance will have no values. /// </returns> public new HotstringSendMethodSelectedOptions FromArray(Enums.HotStringSendEnum[] Options) { var so = SelectedOptions <Enums.HotStringSendEnum> .FromArray(Options); HotstringSendMethodSelectedOptions hs = new HotstringSendMethodSelectedOptions(); hs.Keys = so.Keys; hs.Options = so.Options; return(hs); }
/// <summary> /// Attempts to Parse a string representing one or more Options. /// </summary> /// <param name="s">The Options to Parse</param> /// <param name="ec">The <see cref="HotstringSendMethodSelectedOptions"/> that represents the parsed results</param> /// <returns> /// Returns True if the parse was successful; Otherwise false /// </returns> public static bool TryParse(string s, out HotstringSendMethodSelectedOptions ec) { bool retval = false; HotstringSendMethodSelectedOptions outec = null; try { HotstringSendMethodSelectedOptions ecs = HotstringSendMethodSelectedOptions.Parse(s); outec = ecs; retval = true; } catch (Exception) { } ec = outec; return(retval); }
/// <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; } }