using MediaBrowser.Common.Kernel; using System.ComponentModel.Composition; using System.Threading.Tasks; namespace MediaBrowser.Common.Api { /// /// Class SystemInfoWebSocketListener /// [Export(typeof(IWebSocketListener))] public class SystemInfoWebSocketListener : BasePeriodicWebSocketListener { /// /// Gets the name. /// /// The name. protected override string Name { get { return "SystemInfo"; } } /// /// Gets the data to send. /// /// The state. /// Task{SystemInfo}. protected override Task GetDataToSend(object state) { return Task.FromResult(Kernel.GetSystemInfo()); } } }