Exemplo n.º 1
0
 public async Task SetServiceAsync(IRpcServiceAsync value)
 {
     _service = value;
     Nodes.Clear();
     if (_service == null)
     {
         return;
     }
     _directory = (IDirectory)await _service.ResolveReferenceAsync("dir:/");
     await DoLoad();
 }
Exemplo n.º 2
0
 public FilePresenter(IRpcServiceAsync service, IFile file)
 {
     _service = service;
     _file    = file;
 }
Exemplo n.º 3
0
 RpcPromise(IRpcServiceAsync service, Expression call, bool continueOnCapturedContext)
 {
     _serviceAsync = service;
     _call = call;
     _continueOnCapturedContext = continueOnCapturedContext;
 }
Exemplo n.º 4
0
 internal RpcPromise(IRpcServiceAsync service, Expression<Action> call)
 {
     _serviceAsync = service;
     _call = ExpressionSimplifier.Simplify(call.Body);
 }
Exemplo n.º 5
0
 public FilePresenter(IRpcServiceAsync service, IFile file)
 {
     _service = service;
     _file = file;
 }
 /// <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));
 }
Exemplo n.º 8
0
 public DirectoryPresenter(IRpcServiceAsync service, IDirectory directory)
 {
     _service   = service;
     _directory = directory;
 }
Exemplo n.º 9
0
 RpcPromise(IRpcServiceAsync service, Expression call, bool continueOnCapturedContext)
 {
     _serviceAsync = service;
     _call         = call;
     _continueOnCapturedContext = continueOnCapturedContext;
 }
Exemplo n.º 10
0
 internal RpcPromise(IRpcServiceAsync service, Expression <Action> call)
 {
     _serviceAsync = service;
     _call         = ExpressionSimplifier.Simplify(call.Body);
 }