Esempio n. 1
0
 static IList <string> ParseTextScript(string resource)
 {
     using var stream = EmbeddedStream.For(resource);
     using var reader = new StreamReader(stream);
     return(reader.ReadToEnd().Replace("\r", "").Split("---\n")
            .Select(text => text.TrimEnd('\n'))
            .Where(text => text != string.Empty)
            .ToList());
 }
Esempio n. 2
0
 static YamlElement ParseYamlScripts(string resource)
 {
     using var stream = EmbeddedStream.For(resource);
     using var reader = new StreamReader(stream);
     return(YamlStream.Load(reader).First().Contents);
 }