Добавлена поддержка нескольких параметров в кодген
This commit is contained in:
@@ -8,6 +8,16 @@ namespace Example.Frontend
|
||||
{
|
||||
public class ClientBasedPrinter : IPrinter
|
||||
{
|
||||
public int Prop { get; set; }
|
||||
public int get_Prop()
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
public int set_Prop(int value)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
public string GetName()
|
||||
{
|
||||
Console.WriteLine("ClientBasedPrinter called from server!!!!!!!!!!! Vova likes that:)");
|
||||
@@ -15,13 +25,15 @@ namespace Example.Frontend
|
||||
return "ClientBasedPrinter from mroa";
|
||||
}
|
||||
|
||||
public async Task<IPage> Print(string text, CancellationToken cancellationToken)
|
||||
public async Task<IPage> Print(string text, bool some, CancellationToken cancellationToken)
|
||||
{
|
||||
Console.WriteLine($"Printed: {text}");
|
||||
await Task.Yield();
|
||||
return new ClientBasedPage();
|
||||
}
|
||||
|
||||
public event Action<IPage>? OnPrint;
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
|
||||
|
||||
@@ -72,7 +72,7 @@ class Program
|
||||
|
||||
Console.WriteLine(string.Join(", ", names));
|
||||
|
||||
var page = disposingPrinter.Print("Test Page", new CancellationToken()).GetAwaiter().GetResult();
|
||||
var page = disposingPrinter.Print("Test Page", false, CancellationToken.None).GetAwaiter().GetResult();
|
||||
Console.WriteLine("Page printed");
|
||||
Console.WriteLine(page.ToString());
|
||||
var data = page.GetData();
|
||||
|
||||
Reference in New Issue
Block a user