public ServerResponseInformation RecieveTest (ClientCommandInformation clientCommand) { Console.Write(DateTime.Now.ToString()); Console.WriteLine(clientCommand.SerializedData); Console.WriteLine(clientCommand.ClientLogin.Login); return(new ServerResponseInformation { Status = 999, SerializedData = "Success Test Command" }); }
public ServerResponseInformation TestHandleMethod(ClientCommandInformation clientCommand) { AuthorizeController authorizeController = (AuthorizeController)_serviceProvider .GetService(typeof(AuthorizeController)); var resAuthorize = authorizeController.Authorize(clientCommand.ClientLogin); if (resAuthorize != null) { return(resAuthorize); } TestController testController = (TestController)_serviceProvider .GetService(typeof(TestController)); return(testController.RecieveTest(clientCommand)); }
public ServerResponseInformation GetComputerComponent (ClientCommandInformation clientCommand) { AuthorizeController authorizeController = (AuthorizeController)_serviceProvider .GetService(typeof(AuthorizeController)); var resAuthorize = authorizeController.Authorize(clientCommand.ClientLogin); if (resAuthorize != null) { return(resAuthorize); } ComputerHardwareInformationDTO chInformation = JsonConvert .DeserializeObject <ComputerHardwareInformationDTO>(clientCommand.SerializedData); ComputerController computerController = (ComputerController)_serviceProvider .GetService(typeof(ComputerController)); return(computerController.RecieveComputerHardwareInformation(chInformation, clientCommand.ClientLogin)); }
public ServerResponseInformation GetProcessInformationByName (ClientCommandInformation clientCommand) { AuthorizeController authorizeController = (AuthorizeController)_serviceProvider .GetService(typeof(AuthorizeController)); var resAuthorize = authorizeController.Authorize(clientCommand.ClientLogin); if (resAuthorize != null) { return(resAuthorize); } ProcessInformationDTO processInformationDTO = JsonConvert .DeserializeObject <ProcessInformationDTO>(clientCommand.SerializedData); ProcessesController processesController = (ProcessesController)_serviceProvider .GetService(typeof(ProcessesController)); return(processesController.RecieveProcessInformation(processInformationDTO, clientCommand.ClientLogin)); }
public ServerResponseInformation GetTopMemoryUsageProcesses (ClientCommandInformation clientCommand) { AuthorizeController authorizeController = (AuthorizeController)_serviceProvider .GetService(typeof(AuthorizeController)); var resAuthorize = authorizeController.Authorize(clientCommand.ClientLogin); if (resAuthorize != null) { return(resAuthorize); } IEnumerable <ProcessDTO> processes = JsonConvert .DeserializeObject <IEnumerable <ProcessDTO> >(clientCommand.SerializedData); ProcessesController processesController = (ProcessesController)_serviceProvider .GetService(typeof(ProcessesController)); return(processesController.RecieveProcesses(processes, clientCommand.ClientLogin)); }