public RemoteAnswerCapability(PendingQuestion question, MemberAccessPath access) : base(question.RpcEndpoint)
        {
            _question = question ?? throw new ArgumentNullException(nameof(question));
            _access   = access ?? throw new ArgumentNullException(nameof(access));

            _ = AwaitWhenResolved();
        }
Exemplo n.º 2
0
        static async Task <Proxy> TransferOwnershipToDummyProxy(PendingQuestion question, MemberAccessPath access)
        {
            var result = await question.WhenReturned;
            var cap    = access.Eval(result);
            var proxy  = new Proxy(cap);

            cap?.Release();
            return(proxy);
        }
Exemplo n.º 3
0
 public RemoteAnswerCapability(PendingQuestion question, MemberAccessPath access) : this(question, access, TransferOwnershipToDummyProxy(question, access))
 {
 }
Exemplo n.º 4
0
 public RemoteAnswerCapability(PendingQuestion question, MemberAccessPath access, Task <Proxy> proxyTask) : base(question.RpcEndpoint)
 {
     _question          = question ?? throw new ArgumentNullException(nameof(question));
     _access            = access ?? throw new ArgumentNullException(nameof(access));
     _whenResolvedProxy = (proxyTask ?? throw new ArgumentNullException(nameof(proxyTask))).EnforceAwaitOrder();
 }