using MediaBrowser.Common.Kernel; using MediaBrowser.Model.Logging; 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"; } } /// /// Initializes a new instance of the class. /// /// The logger. [ImportingConstructor] public SystemInfoWebSocketListener([Import("logger")] ILogger logger) : base(logger) { } /// /// Gets the data to send. /// /// The state. /// Task{SystemInfo}. protected override Task GetDataToSend(object state) { return Task.FromResult(Kernel.GetSystemInfo()); } } }