mirror of
https://github.com/sphildreth/roadie
synced 2024-11-27 06:30:21 +00:00
20 lines
536 B
C#
20 lines
536 B
C#
using Microsoft.AspNetCore.Mvc.ModelBinding;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace Roadie.Api.ModelBinding
|
|
{
|
|
public class SubsonicRequestBinderProvider : IModelBinderProvider
|
|
{
|
|
public IModelBinder GetBinder(ModelBinderProviderContext context)
|
|
{
|
|
if (context.Metadata.ModelType == typeof(SubsonicRequest))
|
|
{
|
|
return new SubsonicRequestBinder();
|
|
}
|
|
return null;
|
|
}
|
|
}
|
|
}
|