using System;
using System.Collections.Generic;
using System.Text;
using Microsoft.AspNetCore.Mvc.ModelBinding;
namespace Jellyfin.Api.ModelBinders
{
///
/// Comma delimited array model binder provider.
///
public class CommaDelimitedArrayModelBinderProvider : IModelBinderProvider
{
private readonly IModelBinder _binder;
///
/// Initializes a new instance of the class.
///
public CommaDelimitedArrayModelBinderProvider()
{
_binder = new CommaDelimitedArrayModelBinder();
}
///
public IModelBinder? GetBinder(ModelBinderProviderContext context)
{
return context.Metadata.ModelType.IsArray ? _binder : null;
}
}
}