public static ContentItem?SearchByTth(this IShare share, string tth) { var results = share.Search(new SearchQuery { Query = tth, SearchType = SearchType.TTH }); if (results.Count > 0) { return(results[0]); } return(null); }