Я хочу переставить текстовый файл на языке Си#
У меня есть сгенерированный gtest текстовый файл с таким форматом
................text_file_1......................................
FisheyeLens. getCoefficients MaxRadius DistortUndistortEquidistant DistortUndistortEquisolid DistortUndistortStereographic DistortUndistortOrthographic InversePoly Rig Perlin Lens. DistortUndistort BrownLens. MaxRadius DistortUndistort Environment. FloatingPoint ComputePrimaryAxis
я хочу, чтобы он был в следующем формате
..................text_file_2...............................
FisheyeLens.getCoefficients FisheyeLens.MaxRadius FisheyeLens.DistortUndistortEquidistant FisheyeLens.DistortUndistortEquisolid FisheyeLens.DistortUndistortStereographic FisheyeLens.DistortUndistortOrthographic FisheyeLens.InversePoly FisheyeLens.Rig FisheyeLens.Perlin Lens.DistortUndistort BrownLens.MaxRadius BrownLens.DistotUndistort Enviroment.FloatingPoint Enviroment.ComputerPrimaryAxis
Что я уже пробовал:
Я написал код для чтения text_file_2
while ( (line=file.ReadLine()) != null) { writer.WriteStartElement("Test"); writer.WriteAttributeString("ID", "{AB02A59E-2DF9-4EF4-AD3A-7B14BB3341BC}"); writer.WriteAttributeString("StartTime", ""); writer.WriteAttributeString("Description", "Runing Gtest through veracity"); writer.WriteAttributeString("InstanceName", "RunGTest "+propertyNode); writer.WriteAttributeString("Result", "Failed"); writer.WriteAttributeString("Enabled", "1"); writer.WriteAttributeString("Checksum", ""); writer.WriteAttributeString("EndTime", ""); writer.WriteStartElement("PropertyCollection"); writer.WriteStartElement("Property"); writer.WriteAttributeString("Name", "External app path"); writer.WriteAttributeString("Description", "Specify the path relative to Bin folder or you can specify the absolute path.May use env variable"); writer.WriteString(textBox1.Text); writer.WriteEndElement();//property1 writer.WriteStartElement("Property"); writer.WriteAttributeString("Name", "Command line parameters"); writer.WriteAttributeString("Description", "specify the command line parameter for Gtest"); writer.WriteString("--gtest_filter =" + line); writer.WriteEndElement();//property2 writer.WriteStartElement("Property"); writer.WriteAttributeString("Name", "Capture Std Out"); writer.WriteAttributeString("Description", "Set this to true if the external app uses std out"); writer.WriteString("1"); writer.WriteEndElement();//property3 writer.WriteStartElement("Property"); writer.WriteAttributeString("Name", "File Name to Capture Std Out"); writer.WriteAttributeString("Description", "Has effect only when property 'Capture Std Out'is set to true to Capture Std Out"); writer.WriteString("Output.txt"); writer.WriteEndElement();//property4 writer.WriteStartElement("Property"); writer.WriteAttributeString("Name", "Pass Phrase"); writer.WriteAttributeString("Description", "Pass phrase to look for in the std out or the output file to determine if the test passed or failed"); writer.WriteString("FAILED"); writer.WriteEndElement();//property5 writer.WriteEndElement();//propertyCollection*/ writer.WriteEndElement();//Test propertyNode += 1; }
Но я не уверен, как мне это сделать для text_file_1