// Copyright © 2017 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
{
///
/// Provides the capability intercept Net method calls made from javascript as part of the
/// JavascriptBinding (JSB) implementation. One example use case is logging method calls.
///
public interface IMethodInterceptor
{
///
/// Called before the method is invokved. You are now responsible for evaluating
/// the function and returning the result.
///
/// A Func that represents the method to be called
/// paramaters to be passed to
/// Name of the method to be called
/// The method result
///
///
/// object IMethodInterceptor.Intercept(Func<object[], object> method, object[] parameters, string methodName)
/// {
/// object result = method(parameters);
/// Debug.WriteLine("Called " + methodName);
/// return result;
/// }
///
object Intercept(Func