/// <summary> /// Create a new CefV8Value object of type Date. 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 CreateDate(DateTime value) { var n_value = new cef_time_t(value); return(CefV8Value.FromNative( cef_v8value_t.create_date(&n_value) )); }
/// <summary> /// Create a new CefV8Value object of type Date. /// </summary> public static CefV8Value CreateDate(DateTime value) { cef_time_t n_date = new cef_time_t(value); return(CefV8Value.From( NativeMethods.cef_v8value_create_date(&n_date) )); }
internal static cef_v8value_t *ToNativeV8Value(DateTime?value) { if (value.HasValue) { cef_time_t nDate = new cef_time_t(value.Value); return(NativeMethods.cef_v8value_create_date(&nDate)); } else { return(NativeMethods.cef_v8value_create_null()); } }
internal cef_cookie_t *ToNative() { var ptr = cef_cookie_t.Alloc(); cef_string_t.Copy(Name, &ptr->name); cef_string_t.Copy(Value, &ptr->value); cef_string_t.Copy(Domain, &ptr->domain); cef_string_t.Copy(Path, &ptr->path); ptr->secure = Secure; ptr->httponly = HttpOnly; ptr->creation = new cef_time_t(Creation); ptr->last_access = new cef_time_t(LastAccess); ptr->has_expires = Expires != null; ptr->expires = Expires != null ? new cef_time_t(Expires.Value) : new cef_time_t(); return(ptr); }
internal static cef_v8value_t *ToNativeV8Value(DateTime value) { cef_time_t nDate = new cef_time_t(value); return(NativeMethods.cef_v8value_create_date(&nDate)); }