Files
mROA/Example.Frontend/ClientBasedPrinter.cs
T

42 lines
978 B
C#
Raw Normal View History

using System;
using System.Threading;
using System.Threading.Tasks;
using Example.Shared;
using mROA.Implementation;
namespace Example.Frontend
{
public class ClientBasedPrinter : IPrinter
{
public double Resource { get; set; }
public string GetName()
{
Console.WriteLine("ClientBasedPrinter called from server!!!!!!!!!!! Vova likes that:)");
2025-03-06 14:10:52 +03:00
return "ClientBasedPrinter from mroa";
}
public async Task<IPage> Print(string text, bool some, CancellationToken cancellationToken)
{
Console.WriteLine($"Printed: {text}");
await Task.Yield();
return new ClientBasedPage();
}
2025-02-23 10:18:38 +03:00
public event Action<IPage>? OnPrint;
2025-02-23 10:18:38 +03:00
public void Dispose()
{
}
}
public class ClientBasedPage : IPage
{
public byte[] GetData()
{
return new byte[] { 1, 2, 3 };
}
}
}