Добавлена поддержка нескольких параметров в кодген

This commit is contained in:
2025-03-07 09:01:21 +03:00
parent c802f337c7
commit 8d082d1ed4
9 changed files with 80 additions and 25 deletions
+9 -3
View File
@@ -9,20 +9,26 @@ namespace Example.Backend
public class Printer : IPrinter
{
public string Name;
public string GetName()
{
return Name;
}
public async Task<IPage> Print(string text, CancellationToken cancellationToken = default)
public async Task<IPage> Print(string text, bool some, CancellationToken cancellationToken = default)
{
// throw new Exception("The method or operation is not implemented.");
return new Page {Text = text};
var page = new Page { Text = text };
OnPrint?.Invoke(page);
return page;
}
public event Action<IPage>? OnPrint;
public void Dispose()
{
Console.WriteLine("Dispose printer with name {0}, Dispose works, Dispose works, Dispose works, Dispose works,", Name);
Console.WriteLine(
"Dispose printer with name {0}, Dispose works, Dispose works, Dispose works, Dispose works,", Name);
}
}
}