public void Copyright(XMLOutputWriter xml) { Assembly thisAssembly = System.Reflection.Assembly.GetExecutingAssembly(); Version thisVersion = thisAssembly.GetName().Version; AssemblyCopyrightAttribute copyrightAttribute = (AssemblyCopyrightAttribute)thisAssembly.GetCustomAttributes(typeof(AssemblyCopyrightAttribute), false)[0]; xml.WriteContent("SourceGear Vault Command Line Client " + thisVersion.ToString()); xml.WriteContent(copyrightAttribute.Copyright.ToString()); xml.WriteContent(); }
public void Write() { _xml.Begin("usage"); Copyright(_xml); _xml.WriteContent("usage: vault commandname [options] [parameters]"); _xml.WriteContent(); _xml.WriteContent("This is a list of possible commands:"); foreach (Command cmd in Enum.GetValues(typeof(Command))) { if (cmd == Command.NONE || cmd == Command.INVALID) { continue; } string cmdName = cmd.ToString().ToUpper(); CommandHelpEntry he = (CommandHelpEntry)commandHelpHash[cmd]; if (he != null) { _xml.WriteContent(string.Format(" {0,-22}{1}", cmdName, he.ShortDetails)); } else { _xml.WriteContent(string.Format(" {0,-22}", cmdName)); } } _xml.WriteContent(); _xml.WriteContent("For help with a specific command, run 'vault.exe HELP commandname'."); _xml.End(); }