База для нового бэкэнда

This commit is contained in:
2025-03-06 14:10:52 +03:00
parent be6dedaee4
commit c802f337c7
18 changed files with 245 additions and 163 deletions
+4 -4
View File
@@ -22,11 +22,11 @@ namespace mROA.Implementation
public int Id => _identifier.ContextId;
public int OwnerId => _identifier.OwnerId;
public UniversalObjectIdentifier Identifier => _identifier;
protected async Task<T> GetResultAsync<T>(int methodId, object? parameter = default,
protected async Task<T> GetResultAsync<T>(int methodId, object?[]? parameters = null,
CancellationToken cancellationToken = default)
{
var request = new DefaultCallRequest
{ CommandId = methodId, ObjectId = _identifier.ContextId, Parameter = parameter
{ CommandId = methodId, ObjectId = _identifier.ContextId, Parameters = parameters
};
await _representationModule.PostCallMessageAsync(request.Id, MessageType.CallRequest, request);
@@ -76,11 +76,11 @@ namespace mROA.Implementation
throw errorResponse.Result.GetException();
}
protected async Task CallAsync(int methodId, object? parameter = default,
protected async Task CallAsync(int methodId, object?[]? parameters = null,
CancellationToken cancellationToken = default)
{
var request = new DefaultCallRequest
{ CommandId = methodId, ObjectId = _identifier.ContextId, Parameter = parameter
{ CommandId = methodId, ObjectId = _identifier.ContextId, Parameters = parameters
};
await _representationModule.PostCallMessageAsync(request.Id, MessageType.CallRequest, request);