using MediaBrowser.Common.Kernel;
using MediaBrowser.Controller;
using System.ComponentModel.Composition;
using System.Threading.Tasks;
namespace MediaBrowser.WebDashboard.Api
{
///
/// Class DashboardInfoWebSocketListener
///
[Export(typeof(IWebSocketListener))]
class DashboardInfoWebSocketListener : BasePeriodicWebSocketListener
{
///
/// Gets the name.
///
/// The name.
protected override string Name
{
get { return "DashboardInfo"; }
}
///
/// Gets the data to send.
///
/// The state.
/// Task{IEnumerable{TaskInfo}}.
protected override Task GetDataToSend(object state)
{
return Task.FromResult(DashboardService.GetDashboardInfo((Kernel)Kernel));
}
}
}