* 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>
Core - Add IAsyncMethodInterceptor
- Add IAsyncMethodInterceptor
Extension of IMethodInterceptor to allow for easier evaluation of async taskScheduler
- Add Additional unit tests
- Add JavascriptBindingSettings.AlwaysInterceptAsynchronously for cases where you'd like all method calls to use
IAsyncMethodInterceptor.InterceptAsync
Follow up to PR #3291
Co-authored-by: Andrew Sampson <andrew@rainway.com>
Co-authored-by: Emily Hudson <emily33901@gmail.com>
* Core - Move NameConverter to IJavascriptObjectRepository
- Move NameConverter property from BindingOptions to IJavascriptObjectRepository
- Remove BindingOptions.CamelCaseJavascriptNames
**Breaking Change**
Follow up to https://github.com/cefsharp/CefSharp/commit/898ca38e7a7261b3a42c33b2abf5eac6c022ddde
* Core - Javascript Binding Pluggable Naming Improvements
- Added some basic unit tests (more required)
- DefaultBinder now accepts a IJavascriptNameConverter passed into the constructor
to allow for conversion of names
* Core - Replace WeakReference with WeakReference<T>
- Allows for the user to provide their own IJavascriptNameConverter implementation
- Defaults to using the CamelCaseJavascriptNameConverter (which is exactly the same very basic
naming conversion used by default currently).
- If CamelCaseJavascriptNames is false then no conversion is used
Naming is now separate from the JavascriptObjectRepository and can be tested in isolation.
- Bind for all elements in a collection, not just when the collection contains list/arrays
- Add additional unit tests
JavaScript array of [1,2,3,1.23] translates to [int, int, int, double], when attempting to Bind
to a double[] an InvalidOperationException was thrown. We now call Bind for each element,
when the type is directly assignable we return the value, for cases like above we perform a
type conversion.
Resolves#3129
- Some classes are now excluded
- Many minor fixes should hopefully reduce the number of errors reported by Sandcastle
- Some of the xml doc is generated by Atomineer, usually in cases where CEF lacks documentation
Previously only IDictionary<string, object>, IList<object> were passed, now all params are passed to allow for type conversion (Issue #2906)
Binding now occurs before missing params are added (they weren't passed to the binder previously, so this doesn't change the behaviour
This is a breaking change.
Resolves#2908
* Applied formatting
* Fixed file encoding + Updated copyright year
* Updated License
* Fixed more file encoding
* Copyright notice now shows the year the file was created
As ExpandoObject implements IDictionary we can use it interchangeable with only minor breaking changes.
Those expecting Dictionary<string, object> should change to IDictionary<string, object> or ExpandoObject for their param types
This will also impact anyone who has implemented their own custom IBinder
I'd suggest changing the type checking from explicitly checking Dictionary<string, object> to use Type.IsAssignableFrom or another method of comparison
DefaultBinder binder has been updated to accommodate ExpandoObject (now being returned by ObjectsSerialization.cpp)
Add new async binding for testing new assignment method
Rewrite some of the async bound object tests to use await and let - modernize them
Add license disclaimer
Move example MethodInterceptorLogger into CefSharp.Example project
Reword the IMethodInterceptor xml doc a little bit, probably still needs some work
Remove IsCollectionOrArray extension method, use the long hand - makes the code more readable.
Switch to using Activator.CreateInstance directly
Remove a large number of unused extensions in ModelBindingExtensions
Alternate to #2052
* Add basic ModelBinding which was imported from NancyFx framework - more can be stripped out that's unused
* Add IBinder as a param when registering an object for binding
Binding is disabled by default
* Add license and remove unused using statements
* Make bind method virtual to allow for overriding
Make methods protected
* Add very basic collection support - only primitive types supported for now.
Remove unused exceptions
* Support binding a list of sub objects
* Add null check for null params
* Add BindingOptions class - remove binder and CamelCaseJavascriptNames properties - allow for additional options in the future
Breaking change.
* Add support for List<object> binding type