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


C# Converter.ConvertFile方法代码示例

本文整理汇总了C#中Converter.ConvertFile方法的典型用法代码示例。如果您正苦于以下问题:C# Converter.ConvertFile方法的具体用法?C# Converter.ConvertFile怎么用?C# Converter.ConvertFile使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Converter的用法示例。


在下文中一共展示了Converter.ConvertFile方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: TestWebmConversion

 public void TestWebmConversion()
 {
     Converter converter = new Converter();
     ConvertSettings VideoSettings = new ConvertSettings();
     bool result = converter.ConvertFile(currentPath + "\\SampleVideo.mp4", 7, 1, false, VideoSettings);
     Assert.AreEqual(true, result);
 }
开发者ID:Mbuckley0,项目名称:VideoConverter,代码行数:7,代码来源:ConversionTest.cs

示例2: Main

        static void Main(string[] args)
        {
            Converter converter = new Converter();
            var commandLineParser = new CommandLineParser();

            InitializeCommandLineArguments(commandLineParser, converter);

            if (args.Length == 0) PrintUsage();

            args = commandLineParser.Parse(args);

            converter.Init();

            foreach (var path in args)
            {
                converter.ConvertFile(path);
            }

            #if DEBUG
            Console.WriteLine("Press any key to continue...");
            Console.ReadKey();
            #endif
        }
开发者ID:vaelen,项目名称:EncodingConverter,代码行数:23,代码来源:Program.cs

示例3: CheckFileConversion

		private static void CheckFileConversion(string path, string expected)
		{
			var converter = new Converter();

			var result = converter.ConvertFile(path);

			Assert.That(result, Is.EqualTo(expected));
		}
开发者ID:Leafney,项目名称:Html2Markdown,代码行数:8,代码来源:ConverterTest.cs

示例4: TestConversionFailure

 public void TestConversionFailure()
 {
     Converter converter = new Converter();
     ConvertSettings VideoSettings = new ConvertSettings();
     bool result = converter.ConvertFile(currentPath + "\\SampleVideo.docx", 1, 1, false, VideoSettings);
     Assert.AreEqual(false, result);
 }
开发者ID:Mbuckley0,项目名称:VideoConverter,代码行数:7,代码来源:ConversionTest.cs

示例5: TestDeleteConversion

 public void TestDeleteConversion()
 {
     Converter converter = new Converter();
     ConvertSettings VideoSettings = new ConvertSettings();
     converter.ConvertFile(currentPath + "//SampleVideo.mp4", 1, 1, false, VideoSettings);
     bool result = converter.ConvertFile(currentPath + "//SampleVideo.mkv", 0, 2, true, VideoSettings);
     Assert.AreEqual(true, result);
     Assert.AreEqual(false, File.Exists(currentPath + "//SampleVideo.mkv"));
 }
开发者ID:Mbuckley0,项目名称:VideoConverter,代码行数:9,代码来源:ConversionTest.cs

示例6: TestConversionASRate

 public void TestConversionASRate()
 {
     Converter converter = new Converter();
     ConvertSettings VideoSettings = new ConvertSettings();
     VideoSettings.VideoFrameRate = Convert.ToInt32("8000");
     bool result = converter.ConvertFile(currentPath + "\\SampleVideo.mp4", 1, 1, false, VideoSettings);
     Assert.AreEqual(true, result);
 }
开发者ID:Mbuckley0,项目名称:VideoConverter,代码行数:8,代码来源:ConversionTest.cs


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