Skip to content

Commit e4c5a7b

Browse files
committed
Modified previous commit to not break ABI
1 parent af8fb32 commit e4c5a7b

File tree

2 files changed

+19
-7
lines changed

2 files changed

+19
-7
lines changed

Mono.Debugging.Soft/SoftDebuggerSession.cs

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -378,12 +378,18 @@ void ConnectionStarting (IAsyncResult connectionHandle, DebuggerStartInfo dsi, b
378378
throw new InvalidOperationException ("Already connecting");
379379

380380
connection = connectionHandle;
381-
382-
if (ConnectionDialogCreator != null && attemptNumber == 0) {
383-
connectionDialog = ConnectionDialogCreator (dsi);
384-
connectionDialog.UserCancelled += delegate {
385-
EndSession ();
386-
};
381+
382+
if (attemptNumber == 0) {
383+
if (ConnectionDialogCreatorExtended != null)
384+
connectionDialog = ConnectionDialogCreatorExtended (dsi);
385+
else if (ConnectionDialogCreator != null)
386+
connectionDialog = ConnectionDialogCreator ();
387+
388+
if (connectionDialog != null) {
389+
connectionDialog.UserCancelled += delegate {
390+
EndSession ();
391+
};
392+
}
387393
}
388394

389395
if (connectionDialog != null)

Mono.Debugging/Mono.Debugging.Client/DebuggerSession.cs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,8 @@ namespace Mono.Debugging.Client
4242
public delegate string TypeResolverHandler (string identifier, SourceLocation location);
4343
public delegate void BreakpointTraceHandler (BreakEvent be, string trace);
4444
public delegate IExpressionEvaluator GetExpressionEvaluatorHandler (string extension);
45-
public delegate IConnectionDialog ConnectionDialogCreator (DebuggerStartInfo dsi);
45+
public delegate IConnectionDialog ConnectionDialogCreatorExtended (DebuggerStartInfo dsi);
46+
public delegate IConnectionDialog ConnectionDialogCreator ();
4647

4748
public abstract class DebuggerSession: IDisposable
4849
{
@@ -169,6 +170,11 @@ public ExceptionHandler ExceptionHandler {
169170
/// </summary>
170171
public ConnectionDialogCreator ConnectionDialogCreator { get; set; }
171172

173+
/// <summary>
174+
/// Gets or sets the connection dialog creator callback.
175+
/// </summary>
176+
public ConnectionDialogCreatorExtended ConnectionDialogCreatorExtended { get; set; }
177+
172178
/// <summary>
173179
/// Gets or sets the breakpoint trace handler.
174180
/// </summary>

0 commit comments

Comments
 (0)