//public ContactInfo[] GetContacts(SearchSpec spec) //{ // var arr = _notebook.GetContacts(spec).ToList<IContactInfo>(); // return ConvertListOfIContactInfoToListOfContactInfo(arr).ToArray<ContactInfo>(); //} public ContactInfo[] GetContacts(ByNameSearchCriteria specName = null, BySurnameSearchCriteria specSurname = null, ByPhoneSearchCriteria specPhone = null, ByEmailSearchCriteria specEmail = null) { var arr = _notebook.GetContacts(new SearchSpec(specName, specSurname, specPhone, specEmail)).ToList(); return(ConvertListOfIContactInfoToListOfContactInfo(arr).ToArray <ContactInfo>()); }
void ISearchCriteriaVisitor.VisitByPhone(ByPhoneSearchCriteria sc) { _result = _result.Concat(_initial.Where(c => c.Phone.Contains(sc.Text))); }