示例#1
0
        public Transaction SubmitAndWaitForTransaction(string applicationId, string workflowId, string commandId, IEnumerable <string> actAs, IEnumerable <string> readAs, DateTimeOffset?minLedgerTimeAbs, TimeSpan?minLedgerTimeRel, TimeSpan?deduplicationTime, IEnumerable <Command> commands, string accessToken = null)
        {
            var request = new SubmitAndWaitRequest {
                Commands = BuildCommands(applicationId, workflowId, commandId, actAs, readAs, minLedgerTimeAbs, minLedgerTimeRel, deduplicationTime, commands)
            };

            return(_commandClient.WithAccess(accessToken).Dispatch(request, (c, r, co) => c.SubmitAndWaitForTransaction(r, co)).Transaction);
        }
示例#2
0
        public async Task <TransactionTree> SubmitAndWaitForTransactionTreeAsync(
            string applicationId,
            string workflowId,
            string commandId,
            string party,
            DateTimeOffset?minLedgerTimeAbs,
            TimeSpan?minLedgerTimeRel,
            TimeSpan?deduplicationTime,
            IEnumerable <Command> commands,
            string accessToken = null)
        {
            var request = new SubmitAndWaitRequest {
                Commands = BuildCommands(applicationId, workflowId, commandId, party, minLedgerTimeAbs, minLedgerTimeRel, deduplicationTime, commands)
            };

            return((await _commandClient.WithAccess(accessToken).Dispatch(request, (c, r, co) => c.SubmitAndWaitForTransactionTreeAsync(r, co))).Transaction);
        }
示例#3
0
        public string SubmitAndWaitForTransactionId(
            string applicationId,
            string workflowId,
            string commandId,
            string party,
            DateTime ledgerEffectiveTime,
            DateTime maximumRecordTime,
            IEnumerable <Command> commands,
            string accessToken = null)
        {
            var request = new SubmitAndWaitRequest {
                Commands = BuildCommands(applicationId, workflowId, commandId, party, ledgerEffectiveTime, maximumRecordTime, commands)
            };
            var response = _commandClient.WithAccess(accessToken).Dispatch(request, (c, r, co) => c.SubmitAndWaitForTransactionId(r, co));

            return(response.TransactionId);
        }