Практически доделанный кодген, но не работает демка
This commit is contained in:
@@ -10,6 +10,10 @@ namespace Example.Backend
|
||||
{
|
||||
public string Name;
|
||||
|
||||
public void OnPrintExternal(IPage p0, RequestContext p1)
|
||||
{
|
||||
}
|
||||
|
||||
public double Resource { get; set; } = 100d;
|
||||
|
||||
public string GetName()
|
||||
@@ -17,22 +21,23 @@ namespace Example.Backend
|
||||
return Name;
|
||||
}
|
||||
|
||||
public async Task<IPage> Print(string text, bool some, CancellationToken cancellationToken = default)
|
||||
public async Task<IPage> Print(string text, bool some, RequestContext context,
|
||||
CancellationToken cancellationToken = default)
|
||||
{
|
||||
// throw new Exception("The method or operation is not implemented.");
|
||||
var page = new Page { Text = text };
|
||||
OnPrint?.Invoke(page);
|
||||
Console.WriteLine($"Request id : :{context.RequestId}");
|
||||
OnPrint?.Invoke(page, context);
|
||||
Resource /= 1.5;
|
||||
return page;
|
||||
}
|
||||
|
||||
public event Action<IPage>? OnPrint;
|
||||
public event Action<IPage, RequestContext>? OnPrint;
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
Console.WriteLine(
|
||||
"Dispose printer with name {0}, Dispose works, Dispose works, Dispose works, Dispose works,", Name);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user