/// <summary> /// Finds the first <see cref="InformationElement" /> in the list /// with the provided id. /// </summary> /// <returns> /// The first element with the provided Id or null if the list contains no relevant elements /// </returns> /// <param name='id'> /// The Id to search for /// </param> public InformationElement FindFirstById(InformationElement.ElementId id) { return((from ie in this where ie.Id == id select ie).FirstOrDefault()); }
/// <summary> /// Finds all <see cref="InformationElement">InformatonElements</see> in the lists /// with the provided id. /// </summary> /// <returns> /// The <see cref="InformationElement">InformationElements</see> found, or an empty array if none are found /// </returns> /// <param name='id'> /// The Id to search for /// </param> public InformationElement[] FindById(InformationElement.ElementId id) { return((from ie in this where ie.Id == id select ie).ToArray()); }