void LoadInternal() { DNSpySettings settings = DNSpySettings.Load(); var bpsx = settings[SETTINGS_NAME]; BreakpointManager.Instance.Clear(); foreach (var bpx in bpsx.Elements("Breakpoint")) { uint? token = (uint?)bpx.Attribute("Token"); string asmFullName = SessionSettings.Unescape((string)bpx.Attribute("AssemblyFullName")); string moduleName = SessionSettings.Unescape((string)bpx.Attribute("ModuleName")); bool? isDynamic = (bool?)bpx.Attribute("IsDynamic"); bool? isInMemory = (bool?)bpx.Attribute("IsInMemory"); uint? ilOffset = (uint?)bpx.Attribute("ILOffset"); bool? isEnabled = (bool?)bpx.Attribute("IsEnabled"); if (token == null) { continue; } if (isDynamic == null || isInMemory == null) { continue; } if (string.IsNullOrEmpty(asmFullName)) { continue; } if (string.IsNullOrEmpty(moduleName)) { continue; } if (ilOffset == null) { continue; } if (isEnabled == null) { continue; } var snModule = SerializedDnSpyModule.Create(asmFullName, moduleName, isDynamic.Value, isInMemory.Value); var key = new SerializedDnSpyToken(snModule, token.Value); if (!isInMemory.Value && !isDynamic.Value) { var s = SessionSettings.Unescape((string)bpx.Attribute("Method")); if (s == null || s != GetMethodAsString(key)) { continue; } } var bp = new ILCodeBreakpoint(key, ilOffset.Value, isEnabled.Value); BreakpointManager.Instance.Add(bp); } }
public static SerializedDnSpyModule ToSerializedDnSpyModule(this SerializedDnModule self) { return(SerializedDnSpyModule.Create(self.AssemblyFullName, self.ModuleName, self.IsDynamic, self.IsInMemory)); }