Skip to content

Commit 2937876

Browse files
committed
优化调试内容
1 parent 216f7f7 commit 2937876

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

  • src/MediaConverters/MediaConverters.Tool

src/MediaConverters/MediaConverters.Tool/Program.cs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,15 @@ class Program
2020
{
2121
static async Task<int> Main(string[] args)
2222
{
23-
if (args.Length == 0)
23+
if (args.Length == 0 || args.Length == 1)
2424
{
2525
// 调试模式
26+
var inputFile = "image.wmf";
27+
if (args.Length == 1)
28+
{
29+
inputFile = args[0];
30+
}
31+
2632
var imageConvertContext = new ImageConvertContext()
2733
{
2834
MaxImageWidth = 1000,
@@ -38,7 +44,7 @@ static async Task<int> Main(string[] args)
3844

3945
return await RunAsync(new Options()
4046
{
41-
InputFile = "image.wmf",
47+
InputFile = inputFile,
4248
ConvertConfigurationFile = configurationFile,
4349
WorkingFolder = testFolder.FullName,
4450
OutputFile = outputFile,

0 commit comments

Comments
 (0)