Skip to content

Make IDebugEventListener extend IDisposable

dfc70bf
Select commit
Loading
Failed to load commit list.
Merged

Fix debug adapter reconnection in attach mode with ReconnectableDebugController #1594

Make IDebugEventListener extend IDisposable
dfc70bf
Select commit
Loading
Failed to load commit list.
sonar.openbsl.ru qa-bot / SonarQube Code Analysis succeeded Nov 2, 2025 in 38s

Annotations

Check notice on line 184 in src/OneScript.DebugServices/ReconnectableDebugController.cs

See this annotation in the file changed.

@sonar-openbsl-ru-qa-bot sonar-openbsl-ru-qa-bot / SonarQube Code Analysis

src/OneScript.DebugServices/ReconnectableDebugController.cs#L184

Change ReconnectableDebugController.Dispose() to call GC.SuppressFinalize(object). This will prevent derived types that introduce a finalizer from needing to re-implement 'IDisposable' to call it.

Check notice on line 52 in src/OneScript.DebugServices/ReconnectableDebugController.cs

See this annotation in the file changed.

@sonar-openbsl-ru-qa-bot sonar-openbsl-ru-qa-bot / SonarQube Code Analysis

src/OneScript.DebugServices/ReconnectableDebugController.cs#L52

Use 'ObjectDisposedException.ThrowIf' instead of explicitly throwing a new exception instance

Check warning on line 22 in src/OneScript.DebugServices/ReconnectableDebugController.cs

See this annotation in the file changed.

@sonar-openbsl-ru-qa-bot sonar-openbsl-ru-qa-bot / SonarQube Code Analysis

src/OneScript.DebugServices/ReconnectableDebugController.cs#L22

Fix this implementation of 'IDisposable' to conform to the dispose pattern.

Check notice on line 30 in src/OneScript.DebugServices/ReconnectableDebugController.cs

See this annotation in the file changed.

@sonar-openbsl-ru-qa-bot sonar-openbsl-ru-qa-bot / SonarQube Code Analysis

src/OneScript.DebugServices/ReconnectableDebugController.cs#L30

Change type of field '_callbackService' from 'OneScript.DebugProtocol.IDebugEventListener' to 'OneScript.DebugServices.TcpEventCallbackChannel?' for improved performance

Check notice on line 24 in src/OneScript.DebugServices/ReconnectableDebugController.cs

See this annotation in the file changed.

@sonar-openbsl-ru-qa-bot sonar-openbsl-ru-qa-bot / SonarQube Code Analysis

src/OneScript.DebugServices/ReconnectableDebugController.cs#L24

Remove the field '_port' and declare it as a local variable in the relevant methods.

Check notice on line 28 in src/OneScript.DebugServices/ReconnectableDebugController.cs

See this annotation in the file changed.

@sonar-openbsl-ru-qa-bot sonar-openbsl-ru-qa-bot / SonarQube Code Analysis

src/OneScript.DebugServices/ReconnectableDebugController.cs#L28

Change type of field '_server' from 'OneScript.DebugProtocol.Abstractions.ICommunicationServer' to 'OneScript.DebugProtocol.TcpServer.DefaultMessageServer<OneScript.DebugProtocol.TcpServer.RpcCall>?' for improved performance

Check warning on line 16 in src/OneScript.DebugServices/TcpEventCallbackChannel.cs

See this annotation in the file changed.

@sonar-openbsl-ru-qa-bot sonar-openbsl-ru-qa-bot / SonarQube Code Analysis

src/OneScript.DebugServices/TcpEventCallbackChannel.cs#L16

Fix this implementation of 'IDisposable' to conform to the dispose pattern.