Example #1
0
 /// <summary>
 ///     Asynchronously initialize with Stream.
 /// </summary>
 /// <param name="stream">The stream to use. It will be used from its current position. </param>
 /// <exception cref="ArgumentNullException"></exception>
 public static async Task<Reader> CreateAsync(Stream stream)
 {
     return new Reader(await ArrayBuffer.CreateAsync(stream).ConfigureAwait(false), null);
 }
Example #2
0
 /// <summary>
 ///     Asynchronously initializes a new instance of the <see cref="Reader" /> class by loading the specified file into memory.
 /// </summary>
 /// <param name="file">The file.</param>
 public static async Task<Reader> CreateAsync(string file)
 {
     return new Reader(await ArrayBuffer.CreateAsync(file).ConfigureAwait(false), file);
 }