예제 #1
0
 public object Create(Type t, string name)
 {
     if (t.IsAssignableFrom(typeof(CalculationContainer)))
     {
         if (!_calculationContainerDict.ContainsKey(name))
         {
             CalculationContainerParameters param = new CalculationContainerParameters();
             if (param.Load(name))
             {
                 CalculationContainer instance = new CalculationContainer(param);
                 _calculationContainerDict.Add(name, instance);
                 return(instance);
             }
         }
         else
         {
             return(_calculationContainerDict[name]);
         }
     }
     return(null);
 }
예제 #2
0
 public CalculationContainer(CalculationContainerParameters parameters)
 {
     _parameters = parameters;
     _parameters.Logger.Info($"{nameof(CalculationContainer)} created.");
 }