public async Task SetServiceAsync(IRpcServiceAsync value) { _service = value; Nodes.Clear(); if (_service == null) { return; } _directory = (IDirectory)await _service.ResolveReferenceAsync("dir:/"); await DoLoad(); }
public FilePresenter(IRpcServiceAsync service, IFile file) { _service = service; _file = file; }
RpcPromise(IRpcServiceAsync service, Expression call, bool continueOnCapturedContext) { _serviceAsync = service; _call = call; _continueOnCapturedContext = continueOnCapturedContext; }
internal RpcPromise(IRpcServiceAsync service, Expression<Action> call) { _serviceAsync = service; _call = ExpressionSimplifier.Simplify(call.Body); }
/// <summary> /// Builds a reusable and awaitable RPC that returns an object /// </summary> /// <remarks> /// This server call is not started until awaited. /// Unlike tasks, awaiting it multiple times will trigger the same server action multiple times. /// It can also be reused in children RPCs definitions as a "sub-procedure" /// </remarks> /// <returns>An awaitable object that represents this remote call</returns> public static RpcPromise <T> CallAsync <T>(this IRpcServiceAsync service, Expression <Func <T> > call) { return(new RpcPromise <T>(service, call)); }
/// <summary> /// Builds a reusable and awaitable RPC /// </summary> /// <remarks> /// This server call is not started until awaited. /// Unlike tasks, awaiting it multiple times will trigger the same server action multiple times. /// It can also be reused in children RPCs definitions as a "sub-procedure" /// </remarks> /// <returns>An awaitable object that represents this remote call</returns> public static RpcPromise CallAsync(this IRpcServiceAsync service, Expression <Action> call) { return(new RpcPromise(service, call)); }
public DirectoryPresenter(IRpcServiceAsync service, IDirectory directory) { _service = service; _directory = directory; }
internal RpcPromise(IRpcServiceAsync service, Expression <Action> call) { _serviceAsync = service; _call = ExpressionSimplifier.Simplify(call.Body); }