/// <summary> /// Create a new CefV8Value object of type Date. This method should only be /// called from within the scope of a CefV8ContextHandler, 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) ); }
public static DateTime ToDateTime(cef_time_t* ptr) { return new DateTime( ptr->year, ptr->month, ptr->day_of_month, ptr->hour, ptr->minute, ptr->second, ptr->millisecond, DateTimeKind.Utc ); }
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; }
public static extern cef_v8value_t* create_date(cef_time_t* date);