@@ -74,6 +74,15 @@ public string ServerOptions
74
74
get ; set ;
75
75
}
76
76
77
+ /// <summary>
78
+ /// For Inversion of control mode.
79
+ /// </summary>
80
+ public bool InversionOfControl
81
+ {
82
+ get ;
83
+ internal set ;
84
+ }
85
+
77
86
/// <summary>
78
87
/// Timeoout to wait for the Monitor Application to establish the connection : 30s == 10000ms
79
88
/// </summary>
@@ -778,7 +787,11 @@ public virtual void FromServer(string message)
778
787
else
779
788
{
780
789
ServerConnection . FromServer ( message ) ;
781
- ClientConnection . SendMessage ( message ) ;
790
+ //In ioc Mode don't resent to the Server any message as the server is also the client.
791
+ if ( ! InversionOfControl )
792
+ {
793
+ ClientConnection . SendMessage ( message ) ;
794
+ }
782
795
}
783
796
}
784
797
@@ -790,6 +803,7 @@ public virtual void FromServer(string message)
790
803
/// <param name="serverPath">The Server's path</param>
791
804
/// <param name="serverOptions">The Server's options</param>
792
805
/// <param name="scriptRepositoryPath">The script repository path</param>
806
+ /// <param name="promptReplay">Display a wait message before starting replay</param>
793
807
/// <returns>0 if no error -1 otherwise.</returns>
794
808
public static int ReplayScript ( string script_path , Script script , string serverPath , string serverOptions , string scriptRepositoryPath , bool bStopAtFirstError , bool promptReplay )
795
809
{
@@ -814,13 +828,16 @@ public static int ReplayScript(string script_path, Script script, string serverP
814
828
/// <param name="script_path">The path of the script to replay</param>
815
829
/// <param name="script">The script model to replay</param>
816
830
/// <param name="scriptRepositoryPath">The script repository path</param>
831
+ /// <param name="inversionOfControl">Inform about an inversion of control mode</param>
832
+ /// <param name="promptReplay">Display a wait message before starting replay</param>
817
833
/// <returns>0 if no error -1 otherwise.</returns>
818
- public static int DumpScript ( string script_path , Script script , string scriptRepositoryPath , bool bStopAtFirstError )
834
+ public static int DumpScript ( string script_path , Script script , string scriptRepositoryPath , bool bStopAtFirstError , bool inversionOfControl , bool promptReplay )
819
835
{
820
836
var server = new ServerRobotConnectionController ( new MessageConnection ( ) ) ;
821
837
var robot = new LanguageServerRobotController ( script_path , script , server , bStopAtFirstError , scriptRepositoryPath ) ;
838
+ robot . InversionOfControl = inversionOfControl ;
822
839
robot . PropagateConnectionLogs ( ) ;
823
- if ( ! robot . Start ( false ) )
840
+ if ( ! robot . Start ( promptReplay ) )
824
841
{
825
842
return - 1 ;
826
843
}
0 commit comments