// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System;
using System.Collections.Generic;
using System.Threading;
using Microsoft.CodeAnalysis.Common;
namespace Microsoft.CodeAnalysis.Diagnostics
{
///
/// Aggregates events from various diagnostic sources.
///
internal interface IDiagnosticService
{
///
/// Event to get notified as new diagnostics are discovered by IDiagnosticUpdateSource
///
/// Notifications for this event are serialized to preserve order.
/// However, individual event notifications may occur on any thread.
///
event EventHandler DiagnosticsUpdated;
///
/// Get current diagnostics stored in IDiagnosticUpdateSource
///
IEnumerable GetDiagnostics(Workspace workspace, ProjectId projectId, DocumentId documentId, object id, bool includeSuppressedDiagnostics, CancellationToken cancellationToken);
///
/// Get current UpdatedEventArgs stored in IDiagnosticUpdateSource
///
IEnumerable GetDiagnosticsUpdatedEventArgs(Workspace workspace, ProjectId projectId, DocumentId documentId, CancellationToken cancellationToken);
}
}