mirror of
https://github.com/FabInfra/capnproto-dotnetcore_Runtime.git
synced 2025-03-12 14:51:41 +01:00
22 lines
642 B
C#
22 lines
642 B
C#
using System.Threading.Tasks;
|
|
|
|
namespace Capnp.Rpc
|
|
{
|
|
/// <summary>
|
|
/// A promised capability.
|
|
/// </summary>
|
|
public interface IResolvingCapability
|
|
{
|
|
/// <summary>
|
|
/// Completes when the capability gets resolved.
|
|
/// </summary>
|
|
Task WhenResolved { get; }
|
|
|
|
/// <summary>
|
|
/// Returns the resolved capability
|
|
/// </summary>
|
|
/// <typeparam name="T">Capability interface or <see cref="BareProxy"/></typeparam>
|
|
/// <returns>the resolved capability, or null if it did not resolve yet</returns>
|
|
T? GetResolvedCapability<T>() where T: class;
|
|
}
|
|
} |