/// <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)
                       ));
        }
예제 #2
0
        /// <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)
                       ));
        }
예제 #3
0
 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());
     }
 }
예제 #4
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);
        }
예제 #5
0
        internal static cef_v8value_t *ToNativeV8Value(DateTime value)
        {
            cef_time_t nDate = new cef_time_t(value);

            return(NativeMethods.cef_v8value_create_date(&nDate));
        }