Exemplo n.º 1
0
        /// <summary>
        /// Create a new CefZipReader object. The returned object's methods can only
        /// be called from the thread that created the object.
        /// </summary>
        public static CefZipReader Create(CefStreamReader stream)
        {
            if (stream == null) throw new ArgumentNullException("stream");

            return CefZipReader.FromNative(
                cef_zip_reader_t.create(stream.ToNative())
                );
        }
Exemplo n.º 2
0
        /// <summary>
        /// Create a new CefZipReader object. The returned object's methods can only
        /// be called from the thread that created the object.
        /// </summary>
        public static CefZipReader Create(CefStreamReader stream)
        {
            if (stream == null)
            {
                throw new ArgumentNullException("stream");
            }

            return(CefZipReader.FromNative(
                       cef_zip_reader_t.create(stream.ToNative())
                       ));
        }
Exemplo n.º 3
0
        /// <summary>
        /// Create a new CefXmlReader object. The returned object's methods can only
        /// be called from the thread that created the object.
        /// </summary>
        public static CefXmlReader Create(CefStreamReader stream, CefXmlEncoding encodingType, string uri)
        {
            if (stream == null) throw new ArgumentNullException("stream");

            fixed (char* uri_str = uri)
            {
                var n_uri = new cef_string_t(uri_str, uri != null ? uri.Length : 0);
                return CefXmlReader.FromNative(
                    cef_xml_reader_t.create(stream.ToNative(), encodingType, &n_uri)
                    );
            }
        }
Exemplo n.º 4
0
        /// <summary>
        /// Create a new CefXmlReader object. The returned object's methods can only
        /// be called from the thread that created the object.
        /// </summary>
        public static CefXmlReader Create(CefStreamReader stream, CefXmlEncoding encodingType, string uri)
        {
            if (stream == null)
                throw new ArgumentNullException("stream");

            fixed(char *uri_str = uri)
            {
                var n_uri = new cef_string_t(uri_str, uri != null ? uri.Length : 0);

                return(CefXmlReader.FromNative(
                           cef_xml_reader_t.create(stream.ToNative(), encodingType, &n_uri)
                           ));
            }
        }
Exemplo n.º 5
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.º 6
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)
                ));
 }