Добавлена поддержка нескольких параметров в кодген
This commit is contained in:
1 parent
c802f337c7
commit
8d082d1ed4
9 files changed
+80
-25
No files matched your search
@@ -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