24 lines
933 B
C#
Raw Normal View History

2019-06-12 21:56:55 +02:00
using System;
using System.Threading;
using System.Threading.Tasks;
namespace Capnp.Rpc
{
/// <summary>
/// Low-level interface of a capability at provider side.
/// </summary>
public interface IProvidedCapability
{
/// <summary>
/// Calls an interface method of this capability.
/// </summary>
/// <param name="interfaceId">ID of interface to call</param>
/// <param name="methodId">ID of method to call</param>
/// <param name="args">Method arguments ("params struct")</param>
/// <param name="cancellationToken">Cancellation token, indicating when the call should cancelled.</param>
/// <returns>A Task which will resolve to the call result ("result struct")</returns>
Task<AnswerOrCounterquestion> Invoke(ulong interfaceId, ushort methodId,
DeserializerState args, CancellationToken cancellationToken = default);
}
2020-01-11 17:56:12 +01:00
}