public async Task WhenIParseTheContentByMessageWithExceptionsDisabledAsync()
 {
     var options = new NmeaParserOptions {
         ThrowWhenTagBlockContainsUnknownFields = false
     };
     await NmeaStreamParser.ParseStreamAsync(
         new MemoryStream(Encoding.ASCII.GetBytes(this.content.ToString())),
         new NmeaLineToAisStreamAdapter(this.messageProcessor.Processor, options),
         options).ConfigureAwait(false);
 }
示例#2
0
 /// <summary>
 /// Execute the benchmark.
 /// </summary>
 /// <param name="path">The file from which to read messages.</param>
 /// <returns>A task that completes when the benchmark has finished.</returns>
 public static async Task ProcessMessagesFromFile(string path)
 {
     await NmeaStreamParser.ParseFileAsync(path, Processor).ConfigureAwait(false);
 }
 public async Task WhenIParseTheContentByMessageAsync()
 {
     await NmeaStreamParser.ParseStreamAsync(
         new MemoryStream(Encoding.ASCII.GetBytes(this.content.ToString())),
         new NmeaLineToAisStreamAdapter(this.messageProcessor.Processor)).ConfigureAwait(false);
 }
 public async Task WhenIParseTheContentByLineAsync()
 {
     await NmeaStreamParser.ParseStreamAsync(
         new MemoryStream(Encoding.ASCII.GetBytes(this.content.ToString())),
         this.lineProcessor).ConfigureAwait(false);
 }