Ejemplo n.º 1
0
        public virtual DealContainer GetDealContainer(DealRipper ripper)
        {
            DealContainer container = new DealContainer();

            parse(container, ripper);
            return(container);
        }
Ejemplo n.º 2
0
 protected virtual void parse(DealContainer container, DealRipper ripper)
 {
     try
     {
         try
         {
             string isin = ripper.GetISIN();
             container.Cusip = isin.ExtractCusip();
         }
         catch
         {
             container.Cusip = ripper.GetCusip();
         }
         container.IssuerEnum             = container.Cusip.DetermineIssuer();
         container.InitialUnderlyingLevel = ripper.GetInitialLevel();
         container.MaturityDate           = ripper.GetMaturityDate();
         container.Notional      = ripper.GetNotional();
         container.ParAmount     = ripper.GetPar();
         container.TradeDate     = ripper.GetTradeDate();
         container.StructureEnum = ripper.GetStructureEnum();
         try
         {
             container.FinalValuationDate = ripper.GetFinalValuationDate();
         }
         catch (DetailParsingException)
         {
             // Swallow error because several methods exist after this stage that may attempt to
             // extract the final valuation date through other means.
         }
     }
     catch (DetailParsingException)
     {
         throw;
     }
     catch (Exception e)
     {
         string errorMsg = "Unrecognized exception encountered in DealFactory parse() method.";
         Debug.WriteLine(errorMsg);
         throw new DealFactoryException(errorMsg, e);
     }
 }