Исправлен баг с не правильной генерацией параметров для событий
This commit is contained in:
@@ -8,7 +8,7 @@ namespace Example.Frontend
|
||||
{
|
||||
public class ClientBasedPrinter : IPrinter
|
||||
{
|
||||
public void OnPrintExternal(IPage p0, RequestContext p1)
|
||||
public void OnPrintExternal(IPage p0)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -29,7 +29,7 @@ namespace Example.Frontend
|
||||
return new ClientBasedPage();
|
||||
}
|
||||
|
||||
public event Action<IPage, RequestContext>? OnPrint;
|
||||
public event Action<IPage>? OnPrint;
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
|
||||
<DefineConstants />
|
||||
<DefineConstants>TRACE;</DefineConstants>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
|
||||
|
||||
@@ -48,6 +48,7 @@ class Program
|
||||
//правильный порядок команд 8-5-10-7
|
||||
using (var disposingPrinter = factory.Create("Test"))
|
||||
{
|
||||
disposingPrinter.OnPrint += page1 => { Console.WriteLine("New page creater. Called from event!!!"); };
|
||||
Console.WriteLine("Printer created");
|
||||
Thread.Sleep(100);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user