2025-02-23 10:18:38 +03:00
|
|
|
using System;
|
2025-02-23 10:32:31 +03:00
|
|
|
using System.Security.Cryptography;
|
|
|
|
|
using System.Text;
|
2025-02-20 16:10:09 +03:00
|
|
|
using System.Threading;
|
|
|
|
|
using System.Threading.Tasks;
|
2025-02-05 18:04:35 +03:00
|
|
|
using Example.Shared;
|
|
|
|
|
using mROA.Implementation;
|
|
|
|
|
|
2025-02-20 16:10:09 +03:00
|
|
|
namespace Example.Backend
|
2025-02-05 18:04:35 +03:00
|
|
|
{
|
2025-02-20 16:10:09 +03:00
|
|
|
public class Printer : IPrinter
|
2025-02-05 18:04:35 +03:00
|
|
|
{
|
2025-02-20 16:10:09 +03:00
|
|
|
public string Name;
|
|
|
|
|
public string GetName()
|
|
|
|
|
{
|
|
|
|
|
return Name;
|
|
|
|
|
}
|
2025-02-05 18:04:35 +03:00
|
|
|
|
2025-02-20 16:10:09 +03:00
|
|
|
public async Task<SharedObject<IPage>> Print(string text, CancellationToken cancellationToken = default)
|
|
|
|
|
{
|
|
|
|
|
// throw new Exception("The method or operation is not implemented.");
|
|
|
|
|
return new Page {Text = text};
|
|
|
|
|
}
|
2025-02-23 10:18:38 +03:00
|
|
|
|
|
|
|
|
public void Dispose()
|
|
|
|
|
{
|
2025-02-23 10:32:31 +03:00
|
|
|
Console.WriteLine("Dispose printer with name {0}, Dispose works, Dispose works, Dispose works, Dispose works,", Name);
|
2025-02-23 10:18:38 +03:00
|
|
|
}
|
2025-02-05 18:04:35 +03:00
|
|
|
}
|
|
|
|
|
}
|