private static PBNProposalWrappedLookupItem GetWrappedLookupItem(ILookupItem candidate, IEnumerable <CoReProposal> proposals) { var proposal = candidate.ToProposal(); var representation = proposal.ToCoReName(); if (representation != null) { var matchingProposal = proposals.FirstOrDefault(p => p.Name.Equals(representation)); if (matchingProposal != null) { return(new PBNProposalWrappedLookupItem(candidate, matchingProposal.Probability, proposal.Name)); } } return(null); }
public void HandleSelectionChanged(ILookupItem selectedItem) { _event.AddSelection(selectedItem.ToProposal(), FindIndexOf(selectedItem)); }