示例#1
0
        public Launcher(ICharService charService,
                        ICommandHandler commandHandler,
                        IWorldKeeper worldKeeper)
        {
            this.worldKeeper    = worldKeeper ?? throw new ArgumentNullException(nameof(worldKeeper));
            this.charService    = charService ?? throw new ArgumentNullException(nameof(charService));
            this.commandHandler = commandHandler ?? throw new ArgumentNullException(nameof(commandHandler));

            this.Action[UserStatus.Launch] = this.Launch;
        }
示例#2
0
 public InputHandlerChain(ICommandHandler commandHandler,
                          ICharService charService,
                          IMudConfiguration config,
                          IWorldKeeper worldKeeper)
 {
     (this.chain = new Disconnecter())
     .Then(new Cleanser())
     .Then(new Echo())
     .Then(new Commander(commandHandler))
     .Then(new Authenticator(charService))
     .Then(new Creator(charService, config))
     .Then(new Launcher(charService, commandHandler, worldKeeper));
 }
示例#3
0
 public WorldHandler(IWorldKeeper worldKeeper, IAreaLoader areaLoader, IMudLogger log)
 {
     this.worldKeeper = worldKeeper ?? throw new ArgumentNullException(nameof(worldKeeper));
     this.areaLoader  = areaLoader ?? throw new ArgumentNullException(nameof(areaLoader));
     this.log         = log ?? throw new ArgumentNullException(nameof(log));
 }