本文整理汇总了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);
}
示例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
}
示例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));
}
示例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);
}
示例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"));
}
示例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);
}