/// <summary> /// Removes a breakpoint. /// </summary> /// <param name="fileName">Filename</param> /// <param name="line">Line</param> /// <remarks> /// If no breakpoint exists in the file at the given line, then nothing happens. /// </remarks> public void RemoveBreakpoint(string fileName, int line) { LuaDebugFile file = GetFile(fileName); if (file != null) { file.RemoveBreakpoint(line); } }
/// <summary> /// Gets a breakpoint. /// </summary> /// <param name="fileName">Filename</param> /// <param name="line">Line</param> /// <returns> /// Returns the breakpoint of a file at a given line. /// If the file or breakpoint des not exist, then null is returned. /// </returns> public LuaDebugBreakpoint GetBreakpoint(string fileName, int line) { LuaDebugFile file = GetFile(fileName); if (file != null) { return(file.GetBreakpoint(line)); } return(null); }
/// <summary> /// Adds a file. /// </summary> /// <param name="fileName">Filename</param> /// <returns> /// Returns the added file. If a file with the given name already exists, /// the existing file is returned. /// </returns> public LuaDebugFile AddFile(string fileName) { LuaDebugFile file = GetFile(fileName); if (file == null) { file = m_FileFactory.CreateFile(this, fileName); m_Files.Add(file); } return(file); }
/// <summary> /// Adds a new breakpoint. /// </summary> /// <param name="fileName">Filename</param> /// <param name="line">Line</param> /// <returns> /// Returns the new breakpoint. /// If the breakpoint already exists, then the existing breakpoint is returned. /// </returns> public LuaDebugBreakpoint AddBreakpoint(string fileName, int line) { LuaDebugFile file = GetFile(fileName); if (file == null) { file = AddFile(fileName); } LuaDebugBreakpoint breakpoint = file.GetBreakpoint(line); if (breakpoint == null) { breakpoint = file.AddBreakpoint(line); } return(breakpoint); }
/// <summary> /// Constructor. /// </summary> /// <param name="file">File</param> /// <param name="line">Line</param> public LuaDebugBreakpoint(LuaDebugFile file, int line) { File = file; Line = line; Enabled = true; }
/// <summary> /// Creates the default implementation of the LuaDebugBreakpoint. /// </summary> /// <param name="file">File</param> /// <param name="line">Line</param> /// <returns>Returns the new LuaDebugBreakpoint.</returns> LuaDebugBreakpoint ILuaDebugBreakpointFactory.CreateBreakpoint(LuaDebugFile file, int line) { return(new LuaDebugBreakpoint(file, line)); }