示例#1
0
        public override void WriteUsage()
        {
            System.Console.WriteLine(this.Name + ": " + base.Description);
            System.Console.WriteLine(string.Empty);
            System.Console.WriteLine(CommandResources.GetString(CommandResources.ResourceID.Label_Usage));
            System.Console.WriteLine("  " + CommandResources.GetString(CommandResources.ResourceID.ProgramUsage));
            System.Console.WriteLine(string.Empty);
            NameValueCollection nameValueArgs = new NameValueCollection();
            List <Command>      list          = new List <Command>();

            list.Add(new BTSDeployAppCommand(nameValueArgs));
            list.Add(new BTSDeployCommand(nameValueArgs));
            StringBuilder builder = new StringBuilder();
            string        str4    = CommandResources.GetString(CommandResources.ResourceID.Label_Commands);

            builder.Append(str4);
            foreach (Command command in list)
            {
                builder.Append(Environment.NewLine);
                builder.Append(command.GetSummary());
            }
            System.Console.WriteLine(builder.ToString());
            System.Console.WriteLine(string.Empty);
            System.Console.WriteLine(this.Example);
            System.Console.WriteLine(string.Empty);
            System.Console.WriteLine(ConsoleHelper.Wrap(this.Notes, 2, System.Console.BufferWidth, -2));
            System.Console.WriteLine(string.Empty);
        }
示例#2
0
        protected override CommandLineArgDescriptorList GetParameterDescriptors()
        {
            string paramDesc_Type = CommandResources.GetString(CommandResources.ResourceID.ParamDesc_Type);

            paramDesc_Type += "[" + ConfigurationManager.AppSettings["Type"] + "]";
            string paramDesc_Action = CommandResources.GetString(CommandResources.ResourceID.ParamDesc_Action);

            paramDesc_Action += "[" + ConfigurationManager.AppSettings["Action"] + "]";
            CommandLineArgDescriptor[] collection = new CommandLineArgDescriptor[] {
                new CommandLineArgDescriptor(true, "Type", paramDesc_Type, CommandLineArgDescriptor.ArgumentType.String),
                new CommandLineArgDescriptor(true, "Environment", CommandResources.GetString(CommandResources.ResourceID.ParamDesc_Environment), CommandLineArgDescriptor.ArgumentType.String),
                new CommandLineArgDescriptor(true, "Application", CommandResources.GetString(CommandResources.ResourceID.ParamDesc_Application), CommandLineArgDescriptor.ArgumentType.String),
                new CommandLineArgDescriptor(true, "Version", CommandResources.GetString(CommandResources.ResourceID.ParamDesc_Version), CommandLineArgDescriptor.ArgumentType.String),
                new CommandLineArgDescriptor(true, "Adapter", CommandResources.GetString(CommandResources.ResourceID.ParamDesc_Adapter), CommandLineArgDescriptor.ArgumentType.String),
                new CommandLineArgDescriptor(true, "Action", paramDesc_Action, CommandLineArgDescriptor.ArgumentType.String),
                new CommandLineArgDescriptor(true, "Log", CommandResources.GetString(CommandResources.ResourceID.ParamDesc_Log), CommandLineArgDescriptor.ArgumentType.Boolean)
            };
            CommandLineArgDescriptorList list = new CommandLineArgDescriptorList();

            list.AddRange(collection);
            return(list);
        }