The ability to automate Solid PDF Tools Scan to PDF via scripts is very powerful, but there may be times that running it directly from the command line is needed (We're sure a couple system administrators are nodding their heads right now).
Users who need to automate repetitive tasks may want to take a look at this C# class library posted at the Code Project (thanks to Richard Lopes for writing the library).
The post shows how to use the class library with C# to parse, store and retrieve the arguments from a command line .NET application. This, when combined with the various ways you can automate PDF conversions using Solid PDF Tools allows you to create custom tools to suit your needs.
Have any great ideas or code that you'd like to share? Please contact us with your feedback.
Wednesday, June 25, 2008
C# Class for Parsing Command Line Arguments
Subscribe to:
Post Comments (Atom)

1 comments:
NConsoler is an open source library that provides command line parser functionality based on attribute metadata attached to type.
Library is very easy to add and use in your application. NConsoler gives an ability to display help and validation messages without any line of code.
http://nconsoler.csharpus.com/
Example code:
using System;
using NConsoler;
public class Program {
public static void Main(params string[] args) {
Consolery.Run(typeof(Program), args);
}
[Action]
public static void Method(
[Required] string name,
[Optional(true)] bool flag) {
Console.WriteLine("name: {0}, flag: {1}", name, flag);
}
}
and use it:
program.exe "Maxim" /-flag
Post a Comment