Exemplo n.º 1
0
        /// <summary>
        /// Create a new CefStreamReader object from a file.
        /// </summary>
        public static CefStreamReader Create(string fileName)
        {
            if (string.IsNullOrEmpty(fileName))
            {
                throw new ArgumentNullException("fileName");

                fixed(char *fileName_str = fileName)
                {
                    var n_fileName = new cef_string_t(fileName_str, fileName != null ? fileName.Length : 0);

                    return(CefStreamReader.FromNative(
                               cef_stream_reader_t.create_for_file(&n_fileName)
                               ));
                }
        }
Exemplo n.º 2
0
 /// <summary>
 /// Create a new CefStreamReader object from data.
 /// </summary>
 public static CefStreamReader Create(void *data, long size)
 {
     return(CefStreamReader.FromNative(
                cef_stream_reader_t.create_for_data(data, (UIntPtr)size)
                ));
 }