mirror of
https://github.com/cefsharp/CefSharp.git
synced 2026-12-04 10:22:55 +00:00
42 lines
1.0 KiB
C#
42 lines
1.0 KiB
C#
using System.Collections.Generic;
|
|
using System.Dynamic;
|
|
using System.Runtime.Serialization;
|
|
|
|
namespace CefSharp.Internals
|
|
{
|
|
[DataContract]
|
|
public class JavascriptObject //: DynamicObject maybe later
|
|
{
|
|
private static long nextId = 0;
|
|
private static readonly object Lock = new object();
|
|
|
|
/// <summary>
|
|
/// Identifies the <see cref="JavascriptObject" /> for BrowserProcess to RenderProcess communication
|
|
/// </summary>
|
|
/// <value>
|
|
/// The identifier.
|
|
/// </value>
|
|
[DataMember]
|
|
public long Id { get; private set; }
|
|
|
|
/// <summary>
|
|
/// Gets the members of the <see cref="JavascriptObject" />.
|
|
/// </summary>
|
|
/// <value>
|
|
/// The members.
|
|
/// </value>
|
|
[DataMember]
|
|
public List<JavascriptMember> Members { get; private set; }
|
|
|
|
public JavascriptObject()
|
|
{
|
|
lock (Lock)
|
|
{
|
|
Id = ++nextId;
|
|
}
|
|
|
|
Members = new List<JavascriptMember>();
|
|
}
|
|
}
|
|
}
|