/// <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()) )); }
/// <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) )); } }
/// <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) )); } }
/// <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) )); }