예제 #1
0
        public override Task <AddCoordinateSystemResponse> ExecuteAsync(AddCoordinateSystemArgument arg)
        {
            // Construct the function to be used
            var func = new AddCoordinateSystemComputeFunc();

            // Send the appropriate response to the caller
            return(Compute.ApplyAsync(func, arg));
        }
예제 #2
0
        /// <summary>
        /// Executes the generic request by instantiating the required ComputeFunc and sending it to
        /// the compute projection on the grid as defined by the GridName and Role parameters in this request
        /// </summary>
        public override Task <TResponse> ExecuteAsync(TArgument arg)
        {
            // Construct the function to be used
            var func = new TComputeFunc();

            var cts = new CancellationTokenSource(Timeout);

            // Send the request to the application service pool and retrieve the result
            return(Compute.ApplyAsync(func, arg, cts.Token));
        }
예제 #3
0
 /// <summary>
 /// Processes a set of TAG files from a machine into a project asynchronously
 /// </summary>
 public override Task <ProcessTAGFileResponse> ExecuteAsync(ProcessTAGFileRequestArgument arg)
 {
     try
     {
         // Send the appropriate response to the caller
         return(Compute.ApplyAsync(func, arg));
     }
     catch (Exception e)
     {
         _log.LogError(e, $"Exception occurred during execution of {nameof(Execute)}");
         return(Task.FromResult <ProcessTAGFileResponse>(null));
     }
 }
예제 #4
0
 /// <summary>
 /// Processes a set of TAG files from a machine into a project asynchronously
 /// </summary>
 /// <param name="arg"></param>
 /// <returns></returns>
 public override Task <SubmitTAGFileResponse> ExecuteAsync(SubmitTAGFileRequestArgument arg) => Compute.ApplyAsync(func, arg);
예제 #5
0
 /// <summary>
 /// Processes an override event for  a machine into a project asynchronously
 /// </summary>
 public override Task <OverrideEventResponse> ExecuteAsync(OverrideEventRequestArgument arg) => Compute.ApplyAsync(func, arg);