Пример #1
0
 /// <summary>
 /// Handle retrieval the accessor value identified by |name|. |object| is the
 /// receiver ('this' object) of the accessor. If retrieval succeeds set
 /// |retval| to the return value. If retrieval fails set |exception| to the
 /// exception that will be thrown. Return true if accessor retrieval was
 /// handled.
 /// </summary>
 protected abstract bool Get(string name, CefV8Value obj, out CefV8Value returnValue, out string exception);
Пример #2
0
 /// <summary>
 /// Handle assignment of the accessor value identified by |name|. |object| is
 /// the receiver ('this' object) of the accessor. |value| is the new value
 /// being assigned to the accessor. If assignment fails set |exception| to the
 /// exception that will be thrown. Return true if accessor assignment was
 /// handled.
 /// </summary>
 protected abstract bool Set(string name, CefV8Value obj, CefV8Value value, out string exception);
Пример #3
0
 /// <summary>
 /// Create a new CefV8Value object of type unsigned int.
 /// </summary>
 public static CefV8Value CreateUInt(uint value)
 {
     return(CefV8Value.FromNative(
                cef_v8value_t.create_uint(value)
                ));
 }
Пример #4
0
 /// <summary>
 /// Create a new CefV8Value object of type double.
 /// </summary>
 public static CefV8Value CreateDouble(double value)
 {
     return(CefV8Value.FromNative(
                cef_v8value_t.create_double(value)
                ));
 }
Пример #5
0
 /// <summary>
 /// Returns the value with the specified identifier on success. Returns NULL
 /// if this method is called incorrectly or an exception is thrown.
 /// </summary>
 public CefV8Value GetValue(int index)
 {
     return(CefV8Value.FromNativeOrNull(
                cef_v8value_t.get_value_byindex(_self, index)
                ));
 }
Пример #6
0
 /// <summary>
 /// Associates a value with the specified identifier and returns true on
 /// success. Returns false if this method is called incorrectly or an exception
 /// is thrown. For read-only values this method will return true even though
 /// assignment failed.
 /// </summary>
 public bool SetValue(int index, CefV8Value value)
 {
     return(cef_v8value_t.set_value_byindex(_self, index, value.ToNative()) != 0);
 }
Пример #7
0
 /// <summary>
 /// Create a new CefV8Value object of type bool.
 /// </summary>
 public static CefV8Value CreateBool(bool value)
 {
     return(CefV8Value.FromNative(
                cef_v8value_t.create_bool(value ? 1 : 0)
                ));
 }
Пример #8
0
 /// <summary>
 /// Create a new CefV8Value object of type null.
 /// </summary>
 public static CefV8Value CreateNull()
 {
     return(CefV8Value.FromNative(
                cef_v8value_t.create_null()
                ));
 }
Пример #9
0
 /// <summary>
 /// Create a new CefV8Value object of type undefined.
 /// </summary>
 public static CefV8Value CreateUndefined()
 {
     return(CefV8Value.FromNative(
                cef_v8value_t.create_undefined()
                ));
 }
Пример #10
0
 /// <summary>
 /// Create a new CefV8Value object of type array with the specified |length|.
 /// If |length| is negative the returned array will have length 0. This method
 /// should only be called from within the scope of a CefRenderProcessHandler,
 /// CefV8Handler or CefV8Accessor callback, or in combination with calling
 /// Enter() and Exit() on a stored CefV8Context reference.
 /// </summary>
 public static CefV8Value CreateArray(int length)
 {
     return(CefV8Value.FromNative(
                cef_v8value_t.create_array(length)
                ));
 }
Пример #11
0
 /// <summary>
 /// Create a new CefV8Value object of type object with optional accessor. This
 /// method should only be called from within the scope of a
 /// CefRenderProcessHandler, CefV8Handler or CefV8Accessor callback, or in
 /// combination with calling Enter() and Exit() on a stored CefV8Context
 /// reference.
 /// </summary>
 public static CefV8Value CreateObject(CefV8Accessor accessor)
 {
     return(CefV8Value.FromNative(
                cef_v8value_t.create_object(accessor != null ? accessor.ToNative() : null)
                ));
 }