Last active
April 7, 2023 15:22
-
-
Save VisualBean/1981fa98d5bd3a0ba8d5be82b9bd4a5a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using LEGO.AsyncAPI.Readers; | |
// Read the file into a stream | |
using var filestream = new FileStream("user.yml", FileMode.Open); | |
// Create a new AsyncAPI Stream reader and deserialize the file | |
var document = new AsyncApiStreamReader().Read(filestream, out var diagnostic); | |
foreach (var channel in document.Channels) | |
{ | |
// Write out any channel keys | |
Console.WriteLine(channel.Key); | |
} | |
// Outputs "user/signedup |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment