Exemplo n.º 1
0
        public static IActionResult AsActionResult(this OperationResult operation, bool?internalFlag = null)
        {
            var actionBuilder = new ActionBuilder(operation);

            if (internalFlag.HasValue)
            {
                actionBuilder.WithInternalFlag(internalFlag.Value);
            }
            return(actionBuilder.Execute());
        }
Exemplo n.º 2
0
        public static async Task <IActionResult> AsActionResultAsync(this Task <OperationResult> operationTask, bool?internalFlag = null)
        {
            var actionBuilder = new ActionBuilder(operationTask);

            if (internalFlag.HasValue)
            {
                actionBuilder.WithInternalFlag(internalFlag.Value);
            }
            return(await new ActionBuilder(operationTask).ExecuteAsync());
        }