当前位置: 首页>>代码示例>>C#>>正文


C# FileInfo.WaitForExit方法代码示例

本文整理汇总了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();
            }
        }
开发者ID:modulexcite,项目名称:Batman,代码行数:10,代码来源:Program.cs

示例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();
            }
        }
开发者ID:JaCraig,项目名称:Batman,代码行数:12,代码来源:Program.cs

示例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();
        }
开发者ID:kaytie,项目名称:Craig-s-Utility-Library,代码行数:37,代码来源:Program.cs

示例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();
     }
 }
开发者ID:kaytie,项目名称:Craig-s-Utility-Library,代码行数:8,代码来源:Program.cs


注:本文中的System.IO.FileInfo.WaitForExit方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。