using System;
namespace UnityEditor.U2D.Tooling.Analyzer
{
///
/// Interface for providing access to report data sources and notifying when data sources change.
/// Implementations of this interface serve as a centralized registry for managing and retrieving
/// different types of data sources used by analyzer reports.
///
interface IDataSourceProvider
{
///
/// Gets a data source of the specified generic type.
///
/// The type of data source to retrieve. Must implement IReportDataSource.
/// The data source of type T if available, otherwise null.
T GetDataSource() where T : class, IReportDataSource;
///
/// Gets a data source for the specified type.
///
/// The type of data source to retrieve.
/// The data source instance if available, otherwise null.
IReportDataSource GetDataSource(Type t);
///
/// Event raised when any data source managed by this provider changes.
/// Subscribers can use this to be notified of data source updates without
/// having to monitor individual data sources directly.
///
event Action onDataSourceChanged;
}
}