22 lines
627 B
C#
22 lines
627 B
C#
// See https://aka.ms/new-console-template for more information
|
|
|
|
using System.Text;
|
|
using InkBlot;
|
|
using Microsoft.Extensions.Logging;
|
|
|
|
var loggerFactory = LoggerFactory.Create(builder => builder.AddConsole());
|
|
|
|
var parser = new InkBlotParser();
|
|
InkBlotParser.Parse(new PreMadeFileReader(new Dictionary<string, string>
|
|
{
|
|
{ "main.ink", "Hel-\\lo!" }
|
|
}), loggerFactory, "main.ink");
|
|
|
|
|
|
internal class PreMadeFileReader(Dictionary<string, string> filesToContents) : IFileReader
|
|
{
|
|
public Stream GetContents(string filename)
|
|
{
|
|
return new MemoryStream(Encoding.UTF8.GetBytes(filesToContents[filename]));
|
|
}
|
|
} |