Пример #1
0
        private LineItem GetRelatedLineItem(LinkedOrder repurchase, LineItem lineItem)
        {
            if (repurchase == null)
            {
                throw new ArgumentException("Repurchase is not a valid linked order.");
            }

            return(repurchase.GetRelatedLineItem(lineItem));
        }
Пример #2
0
        private void SetWindowStartAndLengthFromRelatedLineItem(LinkedOrder repurchase, LineItem lineItem)
        {
            if (repurchase.RelatedOrder == null)
            {
                return;
            }

            var relatedLineItem = GetRelatedLineItem(repurchase, lineItem);

            lineItem.WindowStartDate = GetWindowStartDate(relatedLineItem.WindowStartDate, relatedLineItem.Id);
            lineItem.WindowLength    = relatedLineItem.WindowLength;
        }
Пример #3
0
        private DateTime GetValueDateFromRelatedLineItem(LinkedOrder repurchase, LineItem lineItem)
        {
            var relatedLineItem = GetRelatedLineItem(repurchase, lineItem);

            return(GetValueDate(relatedLineItem.ValueDate, relatedLineItem.Id));
        }
 private bool IsReissuedMatureFuturePaymentsOrder(LinkedOrder order)
 {
     return(order != null && order.IsReissue && order.RelatedOrder != null &&
            order.RelatedOrder.OrderType == OrderType.MatureFuturePaymentsOrder);
 }