Files
Santosh M Ghanti 9e0236876c Sync Javascript Binding - Add support for property interception (#3935)
* Core - added support for property interceptor

* Incorporated the review comments

* Incorporated the review comments 2

* Review comments exclude trygetproperty and trysetproperty for .netcore app

* Added the unit test cases for trygetproperty and trysetproperty

* Fixed .net core app build failure

* Added the separate test case for property interceptor

Co-authored-by: sghanti <santosh_ghanti@intuit.com>
2022-02-14 13:58:35 +10:00

27 lines
850 B
C#

// Copyright © 2022 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;
using System.Diagnostics;
using CefSharp.ModelBinding;
namespace CefSharp.Example.ModelBinding
{
public class PropertyInterceptorLogger : IPropertyInterceptor
{
object IPropertyInterceptor.InterceptGet(Func<object> propertyGetter, string propertyName)
{
object result = propertyGetter();
Debug.WriteLine("InterceptGet " + propertyName);
return result;
}
void IPropertyInterceptor.InterceptSet(Action<object> propertySetter, object parameter, string propertName)
{
Debug.WriteLine("InterceptSet " + propertName);
propertySetter(parameter);
}
}
}