NuGet.Services.Work.InvocationResult.Suspended C# (CSharp) 메소드

Suspended() 공개 정적인 메소드

public static Suspended ( JobContinuation continuation ) : InvocationResult
continuation JobContinuation
리턴 InvocationResult
        public static InvocationResult Suspended(JobContinuation continuation)
        {
            return new InvocationResult(ExecutionResult.Incomplete, continuation);
        }

Usage Example

예제 #1
0
        private async Task <InvocationResult> InvokeCore(Func <Task <JobContinuation> > invoker)
        {
            try
            {
                var continuation = await invoker();

                if (continuation != null)
                {
                    return(InvocationResult.Suspended(continuation));
                }
                else
                {
                    return(InvocationResult.Completed());
                }
            }
            catch (Exception ex)
            {
                return(InvocationResult.Faulted(ex));
            }
        }