コード例 #1
0
        private static bool IsType(Func <ICefValue> getValue, CefTypes type)
        {
            var @this = getValue();

            if (@this.GetValueType() != CefValueType.Binary)
            {
                return(false);
            }

            using (var cefBinaryValue = @this.GetBinary())
            {
                var buffer = new byte[1];
                cefBinaryValue.GetData(buffer, 1, 0);

                return(type == (CefTypes)buffer[0]);
            }
        }
コード例 #2
0
 public static bool IsType(this ICefDictionaryValue @this, string index, CefTypes type)
 {
     return(IsType(() => @this.GetValue(index), type));
 }
コード例 #3
0
 public static bool IsType(this ICefListValue @this, int index, CefTypes type)
 {
     return(IsType(() => @this.GetValue(index), type));
 }
コード例 #4
0
 public static bool IsType(this ICefValue @this, CefTypes type)
 {
     return(IsType(() => @this, type));
 }