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

            _ = AwaitWhenResolved();
        }
Пример #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);
        }
Пример #3
0
 public RemoteAnswerCapability(PendingQuestion question, MemberAccessPath access) : this(question, access, TransferOwnershipToDummyProxy(question, access))
 {
 }
Пример #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();
 }