async Task<bool> ShouldExcludeAsync(Document document) { foreach (Export<IDocumentMatcher, INamedMetadata> exclusionMatcher in this.exclusionMatchers) { document.ApplyOptions(exclusionMatcher.OptionApplier); using (new PerformanceTracer(exclusionMatcher.Metadata.Name, document.Name)) { if (await exclusionMatcher.Part.IsMatchAsync(document)) { Log.WriteVerbose( $"Matcher {exclusionMatcher.Metadata.Name} excluded document {document.Name}"); return true; } } } return false; }