Files

49 lines
1.8 KiB
Plaintext
Raw Permalink Normal View History

// <auto-generated/>
using System.Collections.Generic;
using System.Reflection;
using System;
using mROA.Abstract;
using mROA.Implementation.Backend;
using mROA.Implementation;
namespace mROA.Codegen
{
public sealed class RemoteTypeBinder
{
static RemoteTypeBinder(){
2025-05-08 00:04:53 +03:00
InstanceRepository.EventBinders = new object[] {
2025-07-03 17:37:25 +03:00
<!I eventBinder r sep typesSep><!D typesSep>,
<!D>
<!T objectBinderTemplate>
new EventBinder<<!L type>>
{
BindAction = (instance, context, representationProducer, index) =>
{
var ownerId = context.OwnerId;
var module = representationProducer.Produce(ownerId);
<!I eventBinder r sep typesSep><!D typesSep>
<!D>
<!T eventBinderTemplate>
(instance as <!L type>).<!L eventName> += (<!L parametersDeclaration>) =>
{
<!I callFilter>
Console.WriteLine("Sending event...");
2025-08-03 00:32:32 +03:00
var request = new CallRequest
{
2025-07-27 00:14:15 +03:00
Id = RequestId.Generate(),
CommandId = <!L commandId>,
ObjectId = new ComplexObjectIdentifier(index, ownerId),
Parameters = new object[] { <!L transferParameters> }
};
module.PostCallMessageAsync(request.Id, EMessageType.EventRequest, request, context);
};
<!T>
}
}
<!T>
};
}
}
}