protected object GetEventuallyEvaluatedValue(Ast expression, ref bool isEvaluated, ref object value) { if (!isEvaluated) { value = CurrentExecution.EvaluateAst(expression); isEvaluated = true; } return(value); }
private void Init() { if (!first) { return; } string host = null; string port = null; try { enabled = Boolean.Parse(Configuration.Instance.GetProperty(CONFIGURATION_SECTION, "enabled")); } catch { enabled = false; } try { if (!enabled) { return; } host = Configuration.Instance.GetProperty(CONFIGURATION_SECTION, "host"); port = Configuration.Instance.GetProperty(CONFIGURATION_SECTION, "port"); ExecutionDetails executionDetails = new ExecutionDetails(); if (Configuration.Instance.IsPropertyExists(CONFIGURATION_SECTION, "executionDescription")) { executionDetails.description = Configuration.Instance.GetProperty(CONFIGURATION_SECTION, "executionDescription"); } if (Configuration.Instance.IsPropertyExists(CONFIGURATION_SECTION, "executionProperties")) { string executionPropertiesValue = Configuration.Instance.GetProperty(CONFIGURATION_SECTION, "executionProperties"); // Parsing the properties from the configuration file and adding them as execution properties executionDetails.executionProperties = executionPropertiesValue.Split(';') .Select(value => value.Split('=')) .ToDictionary(pair => pair[0], pair => pair[1]); // We are also adding the execution properties as scenario properties so we could see it in the ElasticSearch Scenario scenario = (Scenario)CurrentExecution.GetLastMachine().children[0]; scenario.scenarioProperties = executionDetails.executionProperties; } client = new DifidoClient(host, Int32.Parse(port)); executionId = client.AddExecution(executionDetails); machineId = client.AddMachine(executionId, CurrentExecution.GetLastMachine()); enabled = true; } catch { enabled = false; } first = false; }
/// <summary> /// This method allows you to reset the parameter object. Please note that this /// method resets all the parameters members except the connection information and /// the command time-out which are left in their current state. /// </summary> public void Reset() { this.currentExecution = CurrentExecution.None; this.sqlCommand = null; this.sqlDataReader = null; this.internal_Param_RETURN_VALUE = System.Data.SqlTypes.SqlInt32.Null; this.internal_Param_Sup_GuidID = System.Data.SqlTypes.SqlGuid.Null; this.internal_Param_Sup_GuidID_UseDefaultValue = this.useDefaultValue; this.errorSource = ErrorSource.NotAvailable; this.sqlException = null; this.otherException = null; }
private void Init() { if (!first) { return; } string host = "localhost"; int port = 8080; try { if (!enabled) { return; } // host = Configuration.Instance.GetProperty("report", "reportServerHost"); // port = Configuration.Instance.GetProperty("report", "reportServerPort"); ExecutionDetails executionDetails = new ExecutionDetails(); //executionDetails.description = "Some description"; //string executionPropertiesValue = "key0=val0;key1=val1"; //// Parsing the properties from the configuration file and adding them as execution properties //executionDetails.executionProperties = executionPropertiesValue.Split(';') // .Select(value => value.Split('=')) // .ToDictionary(pair => pair[0], pair => pair[1]); //// We are also adding the execution properties as scenario properties so we could see it in the ElasticSearch //Scenario scenario = (Scenario)CurrentExecution.GetLastMachine().children[0]; //scenario.scenarioProperties = executionDetails.executionProperties; client = new DifidoClient(host, port); executionId = client.AddExecution(executionDetails); machineId = client.AddMachine(executionId, CurrentExecution.GetLastMachine()); enabled = true; } catch { enabled = false; } first = false; }
internal void internal_Set_SqlDataReader(ref System.Data.SqlClient.SqlDataReader sqlDataReader) { this.currentExecution = CurrentExecution.SqlDataReader; this.sqlDataReader = sqlDataReader; }