// Copyright © 2014 The CefSharp Authors. All rights reserved. // // Use of this source code is governed by a BSD-style license that can be found in the LICENSE file. using System; using System.Runtime.Serialization; namespace CefSharp.Internals { [DataContract] public class JavascriptProperty { [DataMember] public JavascriptObject JsObject { get; set; } /// /// Gets or sets a delegate which is used to set the property / field value in the managed object. /// public Action SetValue { get; set; } /// /// Gets or sets a delegate which is used to get the property / field value from the managed object. /// public Func GetValue { get; set; } /// /// Identifies the for BrowserProcess to RenderProcess communication /// [DataMember] public long Id { get; set; } /// /// Gets or sets the name of the managed property. /// [DataMember] public string ManagedName { get; set; } /// /// Gets or sets the name of the property in the JavaScript runtime. /// [DataMember] public string JavascriptName { get; set; } /// /// Gets or sets if this property represents a complex type /// [DataMember] public bool IsComplexType { get; set; } /// /// Gets or sets if this property is read-only /// [DataMember] public bool IsReadOnly { get; set; } /// /// Gets or sets the property value /// Only primative types can be stored in this property /// [DataMember] public object PropertyValue { get; set; } public override string ToString() { return ManagedName ?? base.ToString(); } } }