/// <summary> /// Default constructor. /// </summary> /// <param name="uploadProgressCallback">Upload progress call back delegate.</param> /// <param name="downloadProgressCallback">Download progress call back delegate.</param> /// <param name="uploadCompleteCallback">Upload complete call back delegate.</param> /// <param name="downloadCompleteCallback">Download complete call back delegate.</param> /// <param name="onCommandError">On error delegate event handler.</param> /// <param name="onAsyncThreadError">On async thread error delegate event handler.</param> /// <param name="credentials">The user credentials.</param> /// <param name="connection">The server connection data.</param> /// <param name="filePath">The file path transfer data.</param> /// <param name="internalFilePath">The internal file path transfer data.</param> /// <param name="operation">The current operation.</param> /// <param name="secureConnection">Is the connection secure.</param> /// <param name="timeout">The time out for the operation.</param> public FileTransferDataChannel( UploadProgressCallback uploadProgressCallback, DownloadProgressCallback downloadProgressCallback, UploadCompleteCallback uploadCompleteCallback, DownloadCompleteCallback downloadCompleteCallback, ClientCommandHandler onCommandError, ClientThreadErrorHandler onAsyncThreadError, NetworkCredential credentials, FileTransferConnection connection, FileTransferPath filePath, FileTransferPath internalFilePath, Operation operation, bool secureConnection, int timeout) { _connection = new FileTransferConnection(); _connection.Host = connection.Host; _connection.Port = connection.Port; _connection.ValidateCertificate = false; _connection.UseDataChannel = false; _secureConnection = secureConnection; _credentials = credentials; _filePath = filePath; _operation = operation; _timeout = timeout; _internalFilePath = internalFilePath; _onCommandError = onCommandError; _onAsyncThreadError = onAsyncThreadError; _uploadProgressCallback = uploadProgressCallback; _downloadProgressCallback = downloadProgressCallback; _uploadCompleteCallback = uploadCompleteCallback; _downloadCompleteCallback = downloadCompleteCallback; }
public PasswordCommandHandler(Actor Actor, Action<Actor, String, String> AuthenticatingCommand, String UserName) { this.ParentHandler = Actor.CommandHandler; this.AuthenticatingCommand = AuthenticatingCommand; this.UserName = UserName; MudObject.SendMessage(Actor, "Password: "); }
public PasswordCommandHandler(Actor Actor, Action <Actor, String, String> AuthenticatingCommand, String UserName) { this.ParentHandler = Actor.CommandHandler; this.AuthenticatingCommand = AuthenticatingCommand; this.UserName = UserName; MudObject.SendMessage(Actor, "Password: "); }
public PasswordCommandHandler(MudObject Actor, Action <MudObject, String, String> AuthenticatingCommand, String UserName) { this.ParentHandler = Actor.GetProperty <ClientCommandHandler>("command handler"); this.AuthenticatingCommand = AuthenticatingCommand; this.UserName = UserName; Core.SendMessage(Actor, "Password: "); }
public ClientCommandHandlerTests() { _faker = new Faker(); _tokenSource = new CancellationTokenSource(); _uow = new Mock <IUnitOfWork>(); _mediator = new Mock <IMediatorHandler>(); _notifications = new Mock <DomainNotificationHandler>(); _clientRepository = new Mock <IClientRepository>(); _commandHandler = new ClientCommandHandler(_uow.Object, _mediator.Object, _notifications.Object, _clientRepository.Object); }
public Client(TcpClient tcpClient, IClientInformation clientInformation) { ClientInformation = clientInformation; _commandQueueService = new CommandQueueService(); _commandQueueService.OnCommandPending += _commandQueueService_OnCommandPending; _tcpClient = tcpClient; _clientCommandHandler = new ClientCommandHandler(_tcpClient, new CommandSerializer(), this) { ClientInfomation = clientInformation }; _commandFactory = new CommandFactory(); _commandSerializer = new CommandSerializer(); }
public async Task Setup() { repository = new MockClientRepository(); sut = new ClientCommandHandler(repository); clientId = Guid.NewGuid().ToString(); await sut.Handle(new RegisterClientCommand() { ClientId = clientId, Type = "UPLOADER", IpAddress = "192.168.10.1" }); var client = await repository.GetAsync(clientId); lastAccessedTime = client.LastAccessedTime.Value; }
public static void Main() { IServiceCollection service = new ServiceCollection(); ConfigureServices(service); IServiceProvider serviceProvider = service.BuildServiceProvider(); IScheduleCommandManager scheduleCommandManager = new ScheduleCommandManager(); ConfigureScheduleManager(scheduleCommandManager); IClientResponseHandler clientResponseHandler = new ClientResponseHandler(); IClientCommandHandler clientCommandHandler = new ClientCommandHandler(serviceProvider); IUserInterface userInterface = new UserInterface(); IClient client = new CommandResponseProtocol.CRClient.Client(clientCommandHandler, clientResponseHandler, scheduleCommandManager, userInterface); client.Start(); }
public ClientController(ClientQueryHandler queryHandle, ClientCommandHandler commandHandler) { _queryHandler = queryHandle; _commandHandler = commandHandler; }