public void Add(WiseTele.SlewerTask slewer) { string before; lock (_lock) { before = ToString(); _active.Add(slewer); } #region debug debugger.WriteLine(Common.Debugger.DebugLevel.DebugAxes, "ActiveSlewers: added {0}, \"{1}\" => \"{2}\"", slewer.ToString(), before, this.ToString()); #endregion }
public bool Active(WiseTele.SlewerTask slewer) { bool ret = false; lock (_lock) foreach (var a in _active) { if (a.type == slewer.type) { ret = true; break; } } return(ret); }