示例#1
0
 //copy constructor
 public InputGroup(CalculatorParameters calcParameters, InputGroup inputGroup)
 {
     //several extensions store some calculator props in base element (observations, targettype)
     //no harm done in setting them but never set their attributes
     this.CopyCalculatorProperties(inputGroup);
     this.CopySharedObjectProperties(inputGroup);
     this.DocStatus = inputGroup.DocStatus;
     this.ServiceId = inputGroup.ServiceId;
     this.Type      = inputGroup.Type;
     //better to set in base
     this.CopyTotalCostsProperties(inputGroup);
     //calculators are always app-specific and must be copied subsequently
     this.Calculators  = new List <Calculator1>();
     this.ErrorMessage = inputGroup.ErrorMessage;
     if (inputGroup.Local == null)
     {
         inputGroup.Local = new Local();
     }
     this.Local = new Local(calcParameters, inputGroup.Local);
     if (inputGroup.XmlDocElement != null)
     {
         this.XmlDocElement = new XElement(inputGroup.XmlDocElement);
     }
 }