Exemple #1
0
        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);
        }
Exemple #2
0
 public void HandleSelectionChanged(ILookupItem selectedItem)
 {
     _event.AddSelection(selectedItem.ToProposal(), FindIndexOf(selectedItem));
 }