public void AddProgramCheck(FLProgramCheck check) { if (IsAttached) { return; } if (!ProgramChecks.Contains(check)) { ProgramChecks.Add(check); } }
public void AddProgramCheck(FLProgramCheck check) { if (IsAttached || ProgramChecks.Any(x => x.GetType() == check.GetType())) { return; } if (!ProgramChecks.Contains(check)) { ProgramChecks.Add(check); ProgramChecks.Sort((x, y) => y.Priority.CompareTo(x.Priority)); } }