/// <summary> /// Determines whether the item matches the specified value. /// </summary> /// <param name="item"> /// The item. /// </param> /// <param name="value"> /// The value. /// </param> /// <returns> /// <c>true</c> if the item matches the value; otherwise <c>false</c>. /// </returns> private static bool MatchesItem(HtmlFormElement item, string value) { if (item == null) { return(false); } if (item.Value == null) { if (string.IsNullOrEmpty(value)) { return(true); } } else if (item.Value.Equals(value, StringComparison.Ordinal)) { return(true); } if (item.Text == null) { if (string.IsNullOrEmpty(value)) { return(true); } } else if (item.Text.Equals(value, StringComparison.Ordinal)) { return(true); } return(false); }
/// <summary> /// Determines whether the item matches the specified value. /// </summary> /// <param name="item"> /// The item. /// </param> /// <param name="value"> /// The value. /// </param> /// <returns> /// <c>true</c> if the item matches the value; otherwise <c>false</c>. /// </returns> private static bool MatchesItem(HtmlFormElement item, string value) { if (item == null) { return false; } if (item.Value == null) { if (string.IsNullOrEmpty(value)) { return true; } } else if (item.Value.Equals(value, StringComparison.Ordinal)) { return true; } if (item.Text == null) { if (string.IsNullOrEmpty(value)) { return true; } } else if (item.Text.Equals(value, StringComparison.Ordinal)) { return true; } return false; }