/// <summary> /// Tries to get the note identified by <paramref name="id"/> and fills <paramref name="noteData"/> /// with the retrieved note. /// </summary> /// <param name="dossierData"></param> /// <param name="id">The id of the note to retrieve.</param> /// <param name="dossierDetailData">The note to fill with the retrieval result.</param> /// <returns></returns> public static bool TryGetNote(this DossierData dossierData, int id, out NoteData noteData) { if (!dossierData.HasNote(id)) { noteData = null; return(false); } noteData = dossierData.GetNote(id); return(true); }
/// <summary> /// Checks if the dossier contains the note specified by <paramref name="noteData"/>. /// </summary> /// <param name="dossierData"></param> /// <param name="noteData">The note to check for existance.</param> /// <returns></returns> public static bool HasNote(this DossierData dossierData, NoteData noteData) { return(dossierData.HasNote(noteData.Id)); }