本文整理汇总了C#中FileInfo.IndexOf方法的典型用法代码示例。如果您正苦于以下问题:C# FileInfo.IndexOf方法的具体用法?C# FileInfo.IndexOf怎么用?C# FileInfo.IndexOf使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FileInfo
的用法示例。
在下文中一共展示了FileInfo.IndexOf方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: CreateHtmlReport
//.........这里部分代码省略.........
<td width='10%' style='font-weight: " + Utility.GetParameter("ReportFontWeight") + @"; font-size: " + Utility.GetParameter("ReportFontSize") + @"; font-style:" + Utility.GetParameter("ReportFontStyle") + @"; color: " + Utility.GetParameter("ReportFontColor") + @"'> </td>
<td width='15%' style='font-weight: " + Utility.GetParameter("ReportFontWeight") + @"; font-size: " + Utility.GetParameter("ReportFontSize") + @"; font-style:" + Utility.GetParameter("ReportFontStyle") + @"; color: " + Utility.GetParameter("ReportFontColor") + @"'>$TC_ExecutionTime_Date</td>
<td width='25%' style='font-weight: " + Utility.GetParameter("ReportRemarksFontWeight") + @"; font-size: " + Utility.GetParameter("ReportFontSize") + @"; font-style:" + Utility.GetParameter("ReportRemarksFontStyle") + @"; color: " + Utility.GetParameter("ReportRemarksFontColor") + @"'>$TC_Remarks</td>
</tr>
</table>";
string newTestCaseBodyEnd = @"</div>";
string htmlEnd = @"</td>
</tr>
</table>
</body>
</html>";
//
// Html Start
finalHtml.Append(htmlStart);
int count = 0;
foreach (string xmlLocation in xmlFilesLocation)
{
//using (StreamWriter sw = new StreamWriter(Property.ErrorLog))
//{
// sw.WriteLine("Logfile Foreach 1");
//}
if (File.Exists(xmlLocation))
{
string rootFolderName = new FileInfo(xmlLocation).Directory.Parent.Name;
string rootFolderExt = string.Empty;
try
{
if (rootFolderName.Contains('-'))
rootFolderExt = rootFolderName.Substring(rootFolderName.IndexOf('-'),
rootFolderName.Length -
rootFolderName.IndexOf('-'));
}
catch
{
// ignored
}
Property.TotalCaseExecuted++;
try
{
#region Individual TestCase
var dsStore = new DataSet();
// copying all data from XML to datatable
dsStore.ReadXml(xmlLocation);
var dtTemp = dsStore.Tables[0];
// getting TestCase Name and ID from extended properties
if (dtTemp.ExtendedProperties["TestCase Name"] != null)
tcName = dtTemp.ExtendedProperties["TestCase Name"].ToString();
if (dtTemp.ExtendedProperties["TestCase Id"] != null)
tcId = dtTemp.ExtendedProperties["TestCase Id"].ToString();
if (dtTemp.ExtendedProperties["Browser"] != null)
tcBrowser = dtTemp.ExtendedProperties["Browser"].ToString();
if (dtTemp.ExtendedProperties["RCMachineId"] != null)
tcMachine = dtTemp.ExtendedProperties["RCMachineId"].ToString();
if ((dtTemp.ExtendedProperties["SauceJobUrl"] != null) && (dtTemp.ExtendedProperties["SauceJobUrl"].ToString() != ""))
tcJobResultLocation = dtTemp.ExtendedProperties["SauceJobUrl"].ToString();
//Extract date/time information from xml files