/// /// Copyright (c) 2019 Sensus Slovensko a.s. /// using System; using log4net; namespace TBF.BenchControl.DataContainers.Buoyancy { /// /// Holds measured (true) buoyancy value. /// public class Component : ComponentBase { private static readonly ILog log = LogManager.GetLogger(typeof(Component)); public override string ToString() { return string.Format("{0}({1})", this.GetType().Namespace.Substring(32), Cfg.ToString(1)); } readonly ComponentCfg myCfg; public double Buoyancy { get { return myCfg.Buoyancy; } } public Component() { } public Component(Generic.IComponentCfg cfg) : base(cfg) { myCfg = cfg as ComponentCfg; /// This is to use data in formulas Config.Data.Buoyancy = Buoyancy; /// This is to have data in reports Results.WMeterRsltItemSpec.Buoyancy = Buoyancy; log.Debug(this.ToString()); } } }