public static Stream AsStream(this byte[] source) { Throw.ArgumentNullException.IfNull(source, nameof(source)); return source.AsStream(0, source.Count()); }
public static Func<Stream> AsLazyStream(this String s) { return () => s.AsStream(); }
public static HtmlDocument AsHtmlDocument(this BrowserResponseBodyWrapper body) { var stream = body.AsStream(); var doc = new HtmlDocument(); doc.Load(stream); return doc; }