public static XmlElementAsDictionary Parse(Stream stream) { if (stream == null) { throw new ArgumentNullException("stream"); } return(Parse(QuickIO.StreamToString(stream))); }
private static string TryGetResponseBody(HttpWebResponse response) { if (response != null) { var stream = response.GetResponseStream(); if (stream != null) { return(QuickIO.StreamToString(stream)); } } return(String.Empty); }
public static IEnumerable <IDictionary <string, object> > GetData(Stream stream, bool scalarResult = false) { var text = QuickIO.StreamToString(stream); if (scalarResult) { return new[] { new Dictionary <string, object>() { { "$result", text } } } } ; else { return(GetData(text)); } }
private static void ProcessDirectory(string path) { Parallel.ForEach(QuickIO.EnumerateDirectories(path), dir => { try { Parallel.ForEach(QuickIO.EnumerateFiles(dir), file => { if (file.AsFileInfo().Extension.Equals(".docx")) { fileInfos.Add(file); } }); ProcessDirectory(dir.FullName); } catch (Exception e) { Console.WriteLine("Unable to access directory {0}", dir.FullName); } }); }
public static string GetSchemaAsString(Stream stream) { return(QuickIO.StreamToString(stream)); }
public static EdmSchema GetSchema(Stream stream) { return(GetSchema(QuickIO.StreamToString(stream))); }
public static IEnumerable <IDictionary <string, object> > GetData(Stream stream, out int totalCount) { var text = QuickIO.StreamToString(stream); return(GetData(text, out totalCount)); }