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);
     }
 }
Ejemplo n.º 3
0
 private static void addBasicDetailRippersToDealRipper(DealRipper basicRipper)
 {
     try
     {
         basicRipper.IssuerRipper             = DetailRipperFactory.GetStringRipper(EDetailRipperType.Issuer);
         basicRipper.CusipRipper              = DetailRipperFactory.GetStringRipper(EDetailRipperType.Cusip);
         basicRipper.FinalValuationDateRipper = DetailRipperFactory.GetDateRipper(EDetailRipperType.ValuationDate);
         basicRipper.InitialLevelRipper       = DetailRipperFactory.GetNumberRipper(EDetailRipperType.InitialUnderlyingLevel);
         basicRipper.ISINRipper          = DetailRipperFactory.GetStringRipper(EDetailRipperType.ISIN);
         basicRipper.NotionalRipper      = DetailRipperFactory.GetNumberRipper(EDetailRipperType.Notional);
         basicRipper.MaturityDateRipper  = DetailRipperFactory.GetDateRipper(EDetailRipperType.MaturityDate);
         basicRipper.ParRipper           = DetailRipperFactory.GetNumberRipper(EDetailRipperType.ParAmount);
         basicRipper.TradeDateRipper     = DetailRipperFactory.GetDateRipper(EDetailRipperType.TradeDate);
         basicRipper.StructureTypeRipper = DetailRipperFactory.GetStructureTypeRipper();
     }
     catch (Exception e)
     {
         throw new DealRipperFactoryException(
                   "addBasicDetailRippersToDealRipper() encountered exception in DealRipperFactory class.", e);
     }
 }