Beispiel #1
0
 public static void AddSB1CalcsToStock(this SB101Stock baseStat,
                                       List <SBC1Calculator> calcs)
 {
     if (calcs != null)
     {
         if (baseStat.SB1Calcs == null)
         {
             baseStat.SB1Calcs = new List <SBC1Calculator>();
         }
         foreach (SBC1Calculator calc in calcs)
         {
             if (calc.CalculatorType
                 == SB1CalculatorHelper.CALCULATOR_TYPES.sb101.ToString())
             {
                 SBC1Calculator sbc = new SBC1Calculator();
                 if (calc.GetType().Equals(sbc.GetType()))
                 {
                     SBC1Calculator sbcInput = (SBC1Calculator)calc;
                     sbc.CopySB1C1Properties(sbcInput);
                     baseStat.SB1Calcs.Add(sbc);
                 }
             }
         }
     }
 }
Beispiel #2
0
 public static void AddInputCalcToStock(this SB101Stock baseStat, Calculator1 calc)
 {
     if (calc.CalculatorType
         == SB1CalculatorHelper.CALCULATOR_TYPES.sb101.ToString())
     {
         SBC1Calculator sbc = new SBC1Calculator();
         if (calc.GetType().Equals(sbc.GetType()))
         {
             SBC1Calculator sbcInput = (SBC1Calculator)calc;
             sbc.CopySB1C1Properties(sbcInput);
             baseStat.SB1Calcs.Add(sbc);
         }
     }
 }