Beispiel #1
0
        internal void CopyFrom(ProxyBaseResult SvcBaseResult)
        {
            _resultCode    = (SeverityLevel)SvcBaseResult.ResultCode;
            _transactionId = SvcBaseResult.TransactionId;

            if (SvcBaseResult.Messages != null)
            {
                for (int i = 0; i < SvcBaseResult.Messages.Length; i++)
                {
                    //Ignore clientMetrics message
                    if (SvcBaseResult.Messages[i].Name != null && SvcBaseResult.Messages[i].Name.ToLower() != "clientmetricsrequest")
                    {
                        Message message = new Message();
                        message.CopyFrom(SvcBaseResult.Messages[i]);
                        _messages.Add(message);
                    }
                }
            }

            if (SvcBaseResult.InvoiceInfoMessages != null)
            {
                for (int i = 0; i < SvcBaseResult.InvoiceInfoMessages.Length; i++)
                {
                    InvoiceMessage message = new InvoiceMessage();
                    message.CopyFrom(SvcBaseResult.InvoiceInfoMessages[i]);
                    _invoiceMessages.Add(message);
                }
            }
        }
Beispiel #2
0
        /// <summary>
        /// Loads a BaseResult based on an external base result.
        /// </summary>
        /// <param name="baseResult"></param>
        internal void CopyFrom(BaseResult baseResult)
        {
            _resultCode    = baseResult.ResultCode;
            _transactionId = baseResult.TransactionId;

            if (baseResult.Messages != null)
            {
                for (int i = 0; i < baseResult.Messages.Count; i++)
                {
                    Message message = new Message();
                    message.CopyFrom(baseResult.Messages[i]);
                    _messages.Add(message);
                }
            }

            if (baseResult.InvoiceMessages != null)
            {
                for (int i = 0; i < baseResult.InvoiceMessages.Count; i++)
                {
                    InvoiceMessage message = new InvoiceMessage();
                    message.CopyFrom(baseResult.InvoiceMessages[i]);
                    _invoiceMessages.Add(message);
                }
            }
        }
Beispiel #3
0
 /// <summary>
 /// Loads Message based on an external message object.
 /// </summary>
 /// <param name="message"></param>
 internal void CopyFrom(InvoiceMessage message)
 {
     _lineNo  = message.LineNo;
     _message = message.Message;
 }