Exemple #1
0
        /// <inheritdoc />
        public int LaunchProcessWithDebuggerAttached(TestProcessStartInfo testProcessStartInfo)
        {
            var     waitHandle = new ManualResetEventSlim(false);
            Message ackMessage = null;

            this.onLaunchAdapterProcessWithDebuggerAttachedAckReceived = (ackRawMessage) =>
            {
                ackMessage = ackRawMessage;
                waitHandle.Set();
            };

            var data = dataSerializer.SerializePayload(MessageType.LaunchAdapterProcessWithDebuggerAttached,
                                                       testProcessStartInfo, protocolVersion);

            this.SendData(data);

            EqtTrace.Verbose("Waiting for LaunchAdapterProcessWithDebuggerAttached ack");
            waitHandle.Wait();
            this.onLaunchAdapterProcessWithDebuggerAttachedAckReceived = null;
            return(this.dataSerializer.DeserializePayload <int>(ackMessage));
        }