#include "Stdafx.h" #pragma once using namespace System::Collections::Generic; using namespace System::Reflection; namespace CefSharp { namespace Internals { namespace JavascriptBinding { private class BindingHandler : public CefV8Handler { public: static void Bind(String^ name, Object^ obj, CefRefPtr window); IMPLEMENT_REFCOUNTING(BindingHandler); private: virtual bool Execute(const CefString& name, CefRefPtr object, const CefV8ValueList& arguments, CefRefPtr& retval, CefString& exception); static HashSet^ GetMethodNames(Type^ type); static bool IsNullableType(Type^ type); static int GetChangeTypeCost(Object^ value, Type^ conversionType); static Object^ ChangeType(Object^ value, Type^ conversionType); static void CreateJavascriptMethods(CefV8Handler* handler, CefRefPtr javascriptObject, IEnumerable^ methodNames); static void CreateJavascriptProperties(CefV8Handler* handler, CefRefPtr javascriptObject, Dictionary^ properties); static Dictionary^ GetProperties(Type^ type); static void BindingHandler::FindBestMethod(array^ methods, array^ suppliedArguments, MethodInfo^% bestMethod, array^% bestMethodArguments); CefRefPtr ConvertToCef(Object^ obj, Type^ type); Object^ ConvertFromCef(CefRefPtr obj); static String^ BindingHandler::LowercaseFirst(String^ str); }; } } }