in src/MIMConfigDocumenter/ConnectorDocumenter.cs [2337:2407]
protected virtual void FillConnectorRunProfileDataSet(string runProfileName, bool pilotConfig)
{
Logger.Instance.WriteMethodEntry("Run Profile Name: '{0}'. Pilot Config: '{1}'.", runProfileName, pilotConfig);
try
{
var config = pilotConfig ? this.PilotXml : this.ProductionXml;
var dataSet = pilotConfig ? this.PilotDataSet : this.ProductionDataSet;
var connector = config.XPathSelectElement(Documenter.GetConnectorXmlRootXPath(pilotConfig) + "/ma-data[name ='" + this.ConnectorName + "']");
if (connector != null)
{
var table = dataSet.Tables[0];
var table2 = dataSet.Tables[1];
var runProfileSteps = connector.XPathSelectElements("ma-run-data/run-configuration[name = '" + runProfileName + "']/configuration/step");
var stepIndex = 0;
foreach (var runProfileStep in runProfileSteps)
{
++stepIndex;
var runProfileStepType = ConnectorDocumenter.GetRunProfileStepType(runProfileStep.Element("step-type"));
Documenter.AddRow(table, new object[] { stepIndex, runProfileStepType });
var logFileName = (string)runProfileStep.Element("dropfile-name");
if (!string.IsNullOrEmpty(logFileName))
{
Documenter.AddRow(table2, new object[] { stepIndex, "Log file", logFileName, 1 });
}
var numberOfObjects = (string)runProfileStep.XPathSelectElement("threshold/object");
if (!string.IsNullOrEmpty(numberOfObjects))
{
Documenter.AddRow(table2, new object[] { stepIndex, "Number of objects", numberOfObjects, 2 });
}
var numberOfDeletions = (string)runProfileStep.XPathSelectElement("threshold/delete");
if (!string.IsNullOrEmpty(numberOfDeletions))
{
Documenter.AddRow(table2, new object[] { stepIndex, "Number of deletions", numberOfDeletions, 3 });
}
var partitionId = ((string)runProfileStep.Element("partition") ?? string.Empty).ToUpperInvariant();
var partitionName = (string)connector.XPathSelectElement("ma-partition-data/partition[translate(id, '" + Documenter.LowercaseLetters + "', '" + Documenter.UppercaseLetters + "') = '" + partitionId + "']/name");
Documenter.AddRow(table2, new object[] { stepIndex, "Partition", partitionName, 4 });
var inputFileName = (string)connector.XPathSelectElement("custom-data/run-config/input-file");
if (!string.IsNullOrEmpty(inputFileName))
{
Documenter.AddRow(table2, new object[] { stepIndex, "Input file name", inputFileName, 5 });
}
var outputFileName = (string)connector.XPathSelectElement("custom-data/run-config/output-file");
if (!string.IsNullOrEmpty(outputFileName))
{
Documenter.AddRow(table2, new object[] { stepIndex, "Output file name", outputFileName, 6 });
}
}
table.AcceptChanges();
table2.AcceptChanges();
}
}
finally
{
Logger.Instance.WriteMethodExit("Run Profile Name: '{0}'. Pilot Config: '{1}'.", runProfileName, pilotConfig);
}
}