Добавлена поддержка нескольких параметров в кодген
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user