using MediaBrowser.Common.Kernel;
using MediaBrowser.Model.Entities;
using System.Threading.Tasks;
namespace MediaBrowser.Common.Net.Handlers
{
///
/// Class BaseActionHandler
///
/// The type of the T kernel type.
public abstract class BaseActionHandler : BaseSerializationHandler
where TKernelType : IKernel
{
///
/// Gets the object to serialize.
///
/// Task{EmptyRequestResult}.
protected override async Task GetObjectToSerialize()
{
await ExecuteAction();
return new EmptyRequestResult();
}
///
/// Performs the action.
///
/// Task.
protected abstract Task ExecuteAction();
}
}