Beispiel #1
0
        internal override Task <CpaXmlDetails> FindAgreementById(ILogger logger, Guid id)
        {
            var details = new CpaXmlDetails()
            {
                CollaborationProtocolAgreementXml = _findAgreementById(id)
            };

            return(Task.FromResult(details));
        }
Beispiel #2
0
        internal override Task <CpaXmlDetails> FindAgreementForCounterparty(ILogger logger, int counterpartyHerId)
        {
            try
            {
                CpaXmlDetails details = null;
                var           cpaXml  = _findAgreementForCounterparty(counterpartyHerId);
                if (cpaXml != null && !cpaXml.Contains("CpaXmlDetails i:nil=\"true\""))
                {
                    details = new CpaXmlDetails
                    {
                        CollaborationProtocolAgreementXml = cpaXml
                    };
                }

                return(Task.FromResult(details));
            }
            catch (FileNotFoundException)
            {
                throw new FaultException <AddressService.GenericFault>(new AddressService.GenericFault()
                {
                    ErrorCode = "NotFound"
                });
            }
        }