Ejemplo n.º 1
0
 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
         );
 }
Ejemplo n.º 2
0
        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;
        }
Ejemplo n.º 3
0
 public static extern cef_v8value_t* create_date(cef_time_t* date);
Ejemplo n.º 4
0
 /// <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)
         );
 }