本文整理汇总了C#中System.IO.FileInfo.WaitForExit方法的典型用法代码示例。如果您正苦于以下问题:C# FileInfo.WaitForExit方法的具体用法?C# FileInfo.WaitForExit怎么用?C# FileInfo.WaitForExit使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.IO.FileInfo
的用法示例。
在下文中一共展示了FileInfo.WaitForExit方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: SendToNuget
private static void SendToNuget()
{
Process PackagingProcess = new FileInfo("..\\..\\..\\BatmanPackages\\Package.bat").Execute();
PackagingProcess.WaitForExit();
foreach (FileInfo File in new DirectoryInfo("..\\..\\..\\BatmanPackages\\").EnumerateFiles("*.nupkg", SearchOption.AllDirectories))
{
File.Delete();
}
}
示例2: SendToNuget
private static void SendToNuget()
{
Console.WriteLine("Running package.bat");
Process PackagingProcess = new FileInfo("..\\..\\..\\BatmanPackages\\Package.bat").Execute();
PackagingProcess.WaitForExit();
foreach (FileInfo File in new DirectoryInfo("..\\..\\..\\BatmanPackages\\").EnumerateFiles("*.nupkg", SearchOption.AllDirectories))
{
Console.WriteLine("Deleting {0}", File.FullName);
File.Delete();
}
}
示例3: CreatePackages
private static void CreatePackages()
{
new DirectoryInfo("..\\..\\..\\UtilitiesPackages\\Packages").Create();
new DirectoryInfo("..\\..\\..\\UtilitiesPackages\\Packages").DeleteFiles();
new FileInfo("..\\..\\..\\README.md").CopyTo("..\\..\\..\\UtilitiesPackages\\readme.txt");
foreach (FileInfo File in new DirectoryInfo("..\\..\\..\\UtilitiesPackages\\").EnumerateFiles("*.nuspec", SearchOption.AllDirectories).Where(x => !x.Name.Contains("Documentation")))
{
new DirectoryInfo("..\\..\\..\\UtilitiesPackages\\lib").Create();
new DirectoryInfo("..\\..\\..\\UtilitiesPackages\\tools").Create();
new DirectoryInfo("..\\..\\..\\UtilitiesPackages\\content").Create();
new DirectoryInfo("..\\..\\..\\" + File.Name.Replace(".nuspec", "") + "\\bin\\Release").CopyTo("..\\..\\..\\UtilitiesPackages\\lib");
Process NugetProcess = new FileInfo("..\\..\\..\\.nuget\\nuget.exe").Execute("pack \"" + File.FullName + "\"", WorkingDirectory: "..\\..\\..\\UtilitiesPackages\\Packages");
NugetProcess.WaitForExit();
new DirectoryInfo("..\\..\\..\\UtilitiesPackages\\lib").DeleteAll();
new DirectoryInfo("..\\..\\..\\UtilitiesPackages\\tools").DeleteAll();
new DirectoryInfo("..\\..\\..\\UtilitiesPackages\\content").DeleteAll();
}
foreach (FileInfo File in new DirectoryInfo("..\\..\\..\\UtilitiesPackages\\").EnumerateFiles("*.nuspec", SearchOption.AllDirectories).Where(x => x.Name.Contains("Documentation")))
{
new DirectoryInfo("..\\..\\..\\UtilitiesPackages\\lib").Create();
new DirectoryInfo("..\\..\\..\\UtilitiesPackages\\tools").Create();
new DirectoryInfo("..\\..\\..\\UtilitiesPackages\\content").Create();
Process DoxygenProcess = "doxygen.exe".Execute("\"" + File.FullName.Replace(".nuspec", ".doxy") + "\"", WorkingDirectory: "..\\..\\..\\UtilitiesPackages");
DoxygenProcess.WaitForExit();
Process NugetProcess = new FileInfo("..\\..\\..\\.nuget\\nuget.exe").Execute("pack \"" + File.FullName + "\"", WorkingDirectory: "..\\..\\..\\UtilitiesPackages\\Packages");
NugetProcess.WaitForExit();
new DirectoryInfo("..\\..\\..\\UtilitiesPackages\\lib").DeleteAll();
new DirectoryInfo("..\\..\\..\\UtilitiesPackages\\tools").DeleteAll();
new DirectoryInfo("..\\..\\..\\UtilitiesPackages\\content").DeleteAll();
}
new FileInfo("..\\..\\..\\UtilitiesPackages\\readme.txt").Delete();
}
示例4: PushPackages
private static void PushPackages()
{
foreach (FileInfo File in new DirectoryInfo("..\\..\\..\\UtilitiesPackages\\").EnumerateFiles("*.nupkg", SearchOption.AllDirectories))
{
Process NugetProcess = new FileInfo("..\\..\\..\\.nuget\\nuget.exe").Execute("push \"" + File.FullName + "\"");
NugetProcess.WaitForExit();
}
}