REVERTED commit : BenchInfo : Exception when 2nd instance created, ver. 3.1.1635

This commit is contained in:
Milan Hanajik
2021-03-15 16:09:55 +01:00
parent d22158404d
commit 95a0cebcf8
2 changed files with 2 additions and 6 deletions
@@ -17,8 +17,6 @@ namespace TBF.Rig.DataContainer.BenchInfo
public class Component : ComponentBase, GenericDevices.IBenchInfo
{
private static readonly ILog log = LogManager.GetLogger(typeof(Component));
static int instances = 0;
public override string ToString() { return string.Format("BenchInfo({0})", Cfg.ToString(-1)); }
readonly ComponentCfg myCfg;
@@ -43,8 +41,6 @@ namespace TBF.Rig.DataContainer.BenchInfo
Events.DB.SetBenchName(myCfg.TestBenchName);
log.Warn(this.ToString());
instances++;
if (instances > 1) throw new Exception("Second or next instance of BenchInfo !!!");
}
}
}