Skip to content

EomTaeWook/CommandSystem

Repository files navigation

CommandSystem

picture

Default Command Module

defulatModule.AddCmdProcessor<Close>();

defulatModule.Build();

defulatModule.Run();

Server Command Module

var serverModule = new ServerCmdModule(50000);

serverModule.AddCmdProcessor<Close>();

serverModule.Build();

serverModule.Run();

Client Command Module

var client = new ClientCmdModule("127.0.0.1", 50000);

client.Build();

client.Run();

Local Command Module

var local = new LocalCmdModule();

local.Build();

local.Run();

Custom CLI Command

[CmdAttribute("close")]
internal class Close : ICmdProcessor
{
    public Task InvokeAsync(string[] args)
    {
        Process.GetCurrentProcess().Close();
        return Task.CompletedTask;
    }

    public string Print()
    {
        return "close process";
    }
}
//...
cli.AddCmdProcessor<Close>();
cli.Build();
cli.Run();

Base Command

? - Cmd List

Ctrl + C - Command Stop

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages