public SearchResult(FileReference fileReference, string highlightSubstring) { this.FileReference = fileReference; this.HighlightSubstring = highlightSubstring; WeakReference <SearchResult> weakThis = new WeakReference <SearchResult>(this); SearchResultEventSink.Attach(this, fileReference); }
public static void Attach(SearchResult @this, FileReference fileReference) { var sink = new SearchResultEventSink(@this, fileReference); fileReference.SortKeyChanged += sink.SortKeyChanged; }