JSB - Improve xmldoc for IJavascriptObjectRepository

This commit is contained in:
amaitland
2018-02-07 12:55:40 +10:00
parent df1ab21c01
commit 91da9ea8a4
2 changed files with 15 additions and 10 deletions
+12 -9
View File
@@ -3,9 +3,7 @@
// Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.
using System;
using CefSharp.Event;
using CefSharp.ModelBinding;
namespace CefSharp
{
@@ -16,19 +14,25 @@ namespace CefSharp
public interface IJavascriptObjectRepository : IDisposable
{
/// <summary>
/// Register a javascript object
/// Register an object for binding in Javascript. You can either
/// register an object in advance or as part of the <see cref="ResolveObject"/>
/// event that will be called if no object matching object is found in the registry.
/// Objects binding is now initiated in Javascript through the CefSharp.BindObjectAsync
/// function (returns a Promose).
/// For more detailed examples see https://github.com/cefsharp/CefSharp/issues/2246
/// The equivilient to RegisterJsObject is isAsync = false
/// The equivilient RegisterAsyncJsObject is isAsync = true
/// </summary>
/// <param name="name">name</param>
/// <param name="objectToBind">object</param>
/// <param name="name">object name</param>
/// <param name="objectToBind">the object that will be bound in javascript</param>
/// <param name="isAsync">
/// if true the object will be registered for async communication,
/// only methods will be exposed and when called from javascript will return a Promise to be awaited.
/// This method is newer and recommended for everyone starting out as it is faster and more reliable.
/// If false then methods and properties will be registered, this method relies on a WCF service to communicate.
/// </param>
/// <param name="options">binding options</param>
/// <param name="options">binding options, by default method/property names are camelCased, you can control this
/// and other advanced options though this class.</param>
void Register(string name, object objectToBind, bool isAsync = false, BindingOptions options = null);
/// <summary>
/// Has bound objects
@@ -40,13 +44,12 @@ namespace CefSharp
/// <param name="name">name</param>
/// <returns>true if object with matching name bound</returns>
bool IsBound(string name);
/// <summary>
/// Event handler is called when an object with a given name is requested for binding and is not yet
/// registered with the repository
/// registered with the repository. Use <see cref="JavascriptBindingEventArgs.ObjectRepository"/>
/// to register objects (using
/// </summary>
event EventHandler<JavascriptBindingEventArgs> ResolveObject;
/// <summary>
/// Event handler is triggered when a object has been successfully bound on javascript
/// </summary>
+3 -1
View File
@@ -3,7 +3,6 @@
// Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.
using System;
using CefSharp.ModelBinding;
namespace CefSharp
{
@@ -99,6 +98,9 @@ namespace CefSharp
/// object will be a standard javascript Promise object which is usable to wait for completion or failure.</remarks>
void RegisterAsyncJsObject(string name, object objectToBind, BindingOptions options = null);
/// <summary>
/// The javascript object repository, one repository per ChromiumWebBrowser instance.
/// </summary>
IJavascriptObjectRepository JavascriptObjectRepository { get; }
/// <summary>