public FunctionHandler(long objectId, MethodDescriptor descriptor, ObjectSerializer v8Serializer, SavedValueFactory <Promise> functionCallRegistry) { this.objectId = objectId; this.descriptor = descriptor; this.v8Serializer = v8Serializer; this.functionCallRegistry = functionCallRegistry; }
public BrowserController(CefBrowser browser, PromiseService promiseService) { this.browser = browser; functionCallPromiseRegistry = new SavedValueFactory <Promise>(promiseService.CreatePromise); dynamicObjectPromiseRegistry = new SavedValueFactory <Promise>(promiseService.CreatePromise); objectSerializer.Serializers.Insert(0, new V8Serializer(promiseService, callbackRegistry)); objectSerializer.Deserializers.Insert(0, new V8Deserializer(functionCallPromiseRegistry)); }
public ObjectBinder(ObjectDescriptor descriptor, ObjectSerializer serializer, SavedValueFactory <Promise> functionCallRegistry) { v8Serializer = serializer; functions = descriptor.Methods?.Select(m => new { m.Key, Value = new FunctionBinder(descriptor.Id, m.Value, serializer, functionCallRegistry) }) .ToDictionary(k => k.Key, v => v.Value); propertyDescriptors = descriptor.Properties?.Select(p => p.Value).OfType <CefPropertyDescriptor>().ToList(); }
public V8Deserializer(SavedValueFactory <Promise> functionCallPromiseRegistry) { this.functionCallPromiseRegistry = functionCallPromiseRegistry; }