コード例 #1
0
        public async Task UpdateServerCommand(string[] args)
        {
            if (args.ContainsAny("help", "?"))
            {
                await new HelpPrinter(typeof(UpdateCommands), nameof(UpdateServerCommand))
                .Add("-server  | -s", "The name of the target Photon Server.")
                .PrintAsync();

                return;
            }

            var updateAction = new UpdateServerAction {
                ServerName = Server,
            };

            await updateAction.Run(Context);
        }
コード例 #2
0
        public async Task UpdateServerCommand(string[] args)
        {
            if (args.ContainsAny("help", "?"))
            {
                await new HelpPrinter(typeof(UpdateCommands), nameof(UpdateServerCommand))
                .Add("-server  | -s", "The name of the target Photon Server.")
                .Add("-user    | -u", "The optional username.")
                .Add("-pass    | -p", "The optional password.")
                .Add("-passive     ", "Disable input prompts.")
                .PrintAsync();

                return;
            }

            var updateAction = new UpdateServerAction {
                ServerName = Server,
                Username   = Username,
                Password   = Password,
                Passive    = Passive,
            };

            await updateAction.Run(Context);
        }