// Copyright © 2016 The CefSharp Authors. All rights reserved.
//
// Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.
using System;
namespace CefSharp.ModelBinding
{
///
/// Converts input params into complex .Net types (can also be used for type conversion).
/// This feature is similar in concept to ASP.NET MVC Model Binding.
/// Objects passed from javascript are represented as
/// and arrays/lists as
/// See for the default implementation.
///
///
/// A model binder can be specified in and passed into
///
///
public interface IBinder
{
///
/// Bind to the given model type, can also be used for type conversion e.g. int to uint
///
/// object to be converted into a model
/// the target param type
/// if the modelType is directly assignable then do so, otherwise perform a conversion
/// or create a complex object that matches
object Bind(object obj, Type targetParamType);
}
}