You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
34 lines
784 B
34 lines
784 B
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using MediaBrowser.Common.Net.Handlers;
|
|
using MediaBrowser.Model.Entities;
|
|
|
|
namespace MediaBrowser.Api.HttpHandlers
|
|
{
|
|
public abstract class ItemListHandler : BaseJsonHandler
|
|
{
|
|
protected override object GetObjectToSerialize()
|
|
{
|
|
return ItemsToSerialize.Select(i =>
|
|
{
|
|
return ApiService.GetSerializationObject(i, false, UserId);
|
|
|
|
});
|
|
}
|
|
|
|
protected abstract IEnumerable<BaseItem> ItemsToSerialize
|
|
{
|
|
get;
|
|
}
|
|
|
|
protected Guid UserId
|
|
{
|
|
get
|
|
{
|
|
return Guid.Parse(QueryString["userid"]);
|
|
}
|
|
}
|
|
}
|
|
}
|