[Pkg-mono-svn-commits] rev 348 - mono-nethostmanager/src
Pablo Fischer
pabl0-guest@quantz.debian.org
Tue, 24 Feb 2004 20:50:05 +0100
Author: pabl0-guest
Date: 2004-02-24 20:50:05 +0100 (Tue, 24 Feb 2004)
New Revision: 348
Modified:
mono-nethostmanager/src/Manager.cs
Log:
* Added a new method: HowToUse, that prints how to use nethostmanager
* Also, Added a new rule to start the program:
If the user wants to print, the user needs to give other arg (--config-file in this case)
Modified: mono-nethostmanager/src/Manager.cs
===================================================================
--- mono-nethostmanager/src/Manager.cs 2004-02-24 19:43:11 UTC (rev 347)
+++ mono-nethostmanager/src/Manager.cs 2004-02-24 19:50:05 UTC (rev 348)
@@ -172,6 +172,24 @@
}
+ ///<summary>
+ ///A brief explanation of how to use nethostmanager
+ ///</summary>
+ public static void HowToUse() {
+ Console.WriteLine("VirtualHost Manager");
+ Console.WriteLine("Use: netvirtualhost [action] [options]\n");
+ Console.WriteLine("Actions:");
+ Console.WriteLine(" add Add a VirtualHost");
+ Console.WriteLine(" del Delete a VirtualHost");
+ Console.WriteLine(" print Prints the file to screen in the xsp format (/alias:path)");
+ Console.WriteLine("Options:");
+ Console.WriteLine(" --config-file=<file> The full path where the config file is");
+ Console.WriteLine(" --alias=<alias> The alias that you want for the host");
+ Console.WriteLine(" --path=<path> The path where your web files are");
+ Console.WriteLine("\nFor example:");
+ Console.WriteLine(" netvirtualhost add --config-file=/etc/xsp/files.conf --alias=/examples --path=/usr/share/foo/bar\n");
+ System.Environment.Exit(0);
+ }
///<summary>
///The main
@@ -182,22 +200,10 @@
}catch(System.IndexOutOfRangeException ex) {
}
- if(args.Length == 0 || args.Length < 4 && action != "print") {
- Console.WriteLine("VirtualHost Manager");
- Console.WriteLine("Use: netvirtualhost [action] [options]\n");
- Console.WriteLine("Actions:");
- Console.WriteLine(" add Add a VirtualHost");
- Console.WriteLine(" del Delete a VirtualHost");
- Console.WriteLine(" print Prints the file to screen in the xsp format (/alias:path)");
- Console.WriteLine("Options:");
- Console.WriteLine(" --config-file=<file> The full path where the config file is");
- Console.WriteLine(" --alias=<alias> The alias that you want for the host");
- Console.WriteLine(" --path=<path> The path where your web files are");
- Console.WriteLine("\nFor example:");
- Console.WriteLine(" netvirtualhost add --config-file=/etc/xsp/files.conf --alias=/examples --path=/usr/share/foo/bar\n");
- System.Environment.Exit(0);
-
+ if(args.Length == 0 || args.Length < 4 && action != "print" || (action == "print" && args.Length < 2)) {
+ HowToUse();
}
+
//Ok, read the command line args
else {
action = args[0];