protected void startTestButton_Click(object sender, EventArgs e) { TraceManager.WebRoleComponent.TraceIn(); try { TestRunStartEvent startEvent = new TestRunStartEvent() { TestRunID = Guid.Parse(this.testRunIDTextBox.Text), MessageCount = Convert.ToInt32(this.messageCountTextBox.Text), MessageSize = Convert.ToInt32(this.messageSizeDropDown.Text), EnableAsyncPublish = this.publishAsyncCheckbox.Checked, EnableAsyncDispatch = this.enableAsyncDispatchCheckbox.Checked, RequireTopicCleanup = this.requireTopicCleanupCheckbox.Checked, PurgeTraceLogTable = this.purgeTraceLogTableCheckbox.Checked }; var targetInstance = RoleEnvironment.Roles.Where(r => { return(r.Value != RoleEnvironment.CurrentRoleInstance.Role); }). SelectMany(i => i.Value.Instances).OrderBy(inst => { return(CommonFuncs.GetRoleInstanceIndex(inst.Id)); }).Take(1). FirstOrDefault(); TraceManager.WebRoleComponent.TraceInfo("Sending an unicast IRC event to role instance ID {0}", targetInstance.Id); var ircEvent = new InterRoleCommunicationEvent(startEvent, roleInstanceID: targetInstance.Id); Global.InterRoleCommunicator.Publish(ircEvent); this.panelInfo.Visible = true; } catch (Exception ex) { this.labelExceptionDetails.Text = ExceptionTextFormatter.Format(ex); this.panelException.Visible = true; } }