Files
mROA/Example.Shared/ILoadTest.cs
T

50 lines
1.3 KiB
C#
Raw Normal View History

2025-02-22 09:28:59 +03:00
using System.Threading;
using System.Threading.Tasks;
2025-06-27 16:12:38 +03:00
using mROA.Abstract;
using mROA.Implementation;
2025-02-22 09:28:59 +03:00
using mROA.Implementation.Attributes;
namespace Example.Shared
{
[SharedObjectInterface]
public interface ILoadTest : IShared
{
int Next(int last);
int Last(int next);
void C();
void A();
2025-02-22 09:28:59 +03:00
Task AsyncTest(CancellationToken token = default);
}
2025-06-27 16:12:38 +03:00
2025-06-27 16:20:17 +03:00
partial class LoadTestProxy2
2025-06-27 16:12:38 +03:00
: RemoteObjectBase, ILoadTest
{
2025-06-27 16:20:17 +03:00
public LoadTestProxy2(int id, IRepresentationModule representationModule, IEndPointContext context)
2025-06-27 16:12:38 +03:00
: base(id, representationModule, context)
{
}
public void A(){
CallAsync(0).Wait();
}
public async System.Threading.Tasks.Task AsyncTest(System.Threading.CancellationToken token){
await CallAsync(1, cancellationToken : token);
}
public void C(){
CallAsync(2).Wait();
}
public System.Int32 Last(System.Int32 next){
return GetResultAsync<System.Int32>(3, new System.Object[] { next }).GetAwaiter().GetResult();
}
public System.Int32 Next(System.Int32 last){
return GetResultAsync<System.Int32>(4, new System.Object[] { last }).GetAwaiter().GetResult();
}
}
2025-03-13 08:43:48 +03:00
}