コード例 #1
0
        private static async Task <Result> JoinA(AsyncResultBase a, AsyncResultBase b)
        {
            var aResult = await a.GetTaskResult();

            var bResult = await b.GetTaskResult();

            var messages     = aResult.Messages.Concat(bResult.Messages);
            var isSuccessful = aResult.IsSuccessful && bResult.IsSuccessful;

            return(new Result(messages, isSuccessful));
        }
コード例 #2
0
        private static async Task <Result> JoinA(AsyncResultBase a, Result b)
        {
            var aResult = await a.GetTaskResult();

            return(Result.Join(aResult, b));
        }