internal void SetInModule(Module module) { // This is in case that the client modifies the collection as a response to set breakpoint // NB: If client adds new breakpoint, it will be set directly as a result of his call, not here (because module is already loaded) List <Breakpoint> collection = new List <Breakpoint>(); collection.AddRange(this); var currentModuleTypes = module.GetNamesOfDefinedTypes(); foreach (Breakpoint b in collection) { if (b is ILBreakpoint) { // set the breakpoint only if the module contains the type if (!currentModuleTypes.Contains(b.TypeName)) { continue; } b.SetBreakpoint(module); } else { b.SetBreakpoint(module); } } }