public int UpdateServiceSettings(int serviceId, string[] settings) { return(ServerController.UpdateServiceSettings(serviceId, settings)); }
public QuotaInfo GetProviderServiceQuota(int providerId) { return(ServerController.GetProviderServiceQuota(providerId)); }
public int AddService(ServiceInfo service) { return(ServerController.AddService(service)); }
public int DeleteService(int serviceId) { return(ServerController.DeleteService(serviceId)); }
public List <ServiceInfo> GetServicesByServerIdGroupName(int serverId, string groupName) { return(ServerController.GetServicesByServerIdGroupName(serverId, groupName)); }
public DataSet GetRawServicesByGroupName(string groupName) { return(ServerController.GetRawServicesByGroupName(groupName)); }
public int AddServer(ServerInfo server, bool autoDiscovery) { return(ServerController.AddServer(server, autoDiscovery)); }
public DataSet GetRawServicesByServerId(int serverId) { return(ServerController.GetRawServicesByServerId(serverId)); }
public ServerInfo GetServerByName(string serverName) { return(ServerController.GetServerByName(serverName)); }
public int CheckServerAvailable(string serverUrl, string password) { return(ServerController.CheckServerAvailable(serverUrl, password)); }
public void LoadSettings(ServerController controller) { controller.Model.Settings = SerializerHelper.Load <ServerSettings>(controller.Model.ServerConfigFile); }
private static (Task task, FmShell.Shell shell) StartShell(ServerConfiguration serverConfig, ServerInfo serverInfo, ServerController serverController, RadioCastServer radioCastServer) { LOGGER.Info("Starting Shell..."); var shell = new FmShell.Shell(new ShellMethods(serverInfo, serverController, radioCastServer), serverConfig.ConsolePrompt, "FindFM", ConsoleColor.Black, ConsoleColor.Green); var shellTask = new Task(() => shell.Start()); shellTask.Start(); return(shellTask, shell); }
private void Start() { _serverController = FindObjectOfType <ServerController>(); }
private async Task CanUploadRemoveFiles(ServerController controller) { var fileContent = "content"; var uploadFormFileResult = Assert.IsType <RedirectToActionResult>(await controller.CreateFile(TestUtils.GetFormFile("uploadtestfile.txt", fileContent))); Assert.True(uploadFormFileResult.RouteValues.ContainsKey("fileId")); var fileId = uploadFormFileResult.RouteValues["fileId"].ToString(); Assert.Equal("Files", uploadFormFileResult.ActionName); //check if file was uploaded and saved in db var viewFilesViewModel = Assert.IsType <ViewFilesViewModel>(Assert.IsType <ViewResult>(await controller.Files(fileId)).Model); Assert.NotEmpty(viewFilesViewModel.Files); Assert.Equal(fileId, viewFilesViewModel.SelectedFileId); Assert.NotEmpty(viewFilesViewModel.DirectFileUrl); //verify file is available and the same var net = new System.Net.WebClient(); var data = await net.DownloadStringTaskAsync(new Uri(viewFilesViewModel.DirectFileUrl)); Assert.Equal(fileContent, data); //create a temporary link to file var tmpLinkGenerate = Assert.IsType <RedirectToActionResult>(await controller.CreateTemporaryFileUrl(fileId, new ServerController.CreateTemporaryFileUrlViewModel() { IsDownload = true, TimeAmount = 1, TimeType = ServerController.CreateTemporaryFileUrlViewModel.TmpFileTimeType.Minutes })); Assert.True(tmpLinkGenerate.RouteValues.ContainsKey("StatusMessage")); var statusMessageModel = new StatusMessageModel(tmpLinkGenerate.RouteValues["StatusMessage"].ToString()); Assert.Equal(StatusMessageModel.StatusSeverity.Success, statusMessageModel.Severity); var index = statusMessageModel.Html.IndexOf("target='_blank'>"); var url = statusMessageModel.Html.Substring(index).ReplaceMultiple(new Dictionary <string, string>() { { "</a>", string.Empty }, { "target='_blank'>", string.Empty } }); //verify tmpfile is available and the same data = await net.DownloadStringTaskAsync(new Uri(url)); Assert.Equal(fileContent, data); //delete file Assert.Equal(StatusMessageModel.StatusSeverity.Success, new StatusMessageModel(Assert .IsType <RedirectToActionResult>(await controller.DeleteFile(fileId)) .RouteValues["statusMessage"].ToString()).Severity); //attempt to fetch deleted file viewFilesViewModel = Assert.IsType <ViewFilesViewModel>(Assert.IsType <ViewResult>(await controller.Files(fileId)).Model); Assert.Null(viewFilesViewModel.DirectFileUrl); Assert.Null(viewFilesViewModel.SelectedFileId); }
public int UpdateServer(ServerInfo server) { return(ServerController.UpdateServer(server)); }
public int UpdateVirtualGroups(int serverId, VirtualGroupInfo[] groups) { return(ServerController.UpdateVirtualGroups(serverId, groups)); }
public int UpdateServerConnectionPassword(int serverId, string password) { return(ServerController.UpdateServerConnectionPassword(serverId, password)); }
public List <ServiceInfo> GetServicesByServerId(int serverId) { return(ServerController.GetServicesByServerId(serverId)); }
public int UpdateServerADPassword(int serverId, string adPassword) { return(ServerController.UpdateServerADPassword(serverId, adPassword)); }
public DataSet GetRawServicesByGroupId(int groupId) { return(ServerController.GetRawServicesByGroupId(groupId)); }
public int DeleteServer(int serverId) { return(ServerController.DeleteServer(serverId)); }
public ServiceInfo GetServiceInfo(int serviceId) { return(ServerController.GetServiceInfoAdmin(serviceId)); }
public DataSet GetVirtualServers() { return(ServerController.GetVirtualServers()); }
public int UpdateService(ServiceInfo service) { return(ServerController.UpdateService(service)); }
public DataSet GetVirtualServices(int serverId) { return(ServerController.GetVirtualServices(serverId)); }
public string[] GetServiceSettings(int serviceId) { return(ConvertDictionaryToArray(ServerController.GetServiceSettingsAdmin(serviceId))); }
public int AddVirtualServices(int serverId, int[] ids) { return(ServerController.AddVirtualServices(serverId, ids)); }
public string[] InstallService(int serviceId) { return(ServerController.InstallService(serviceId)); }
public int DeleteVirtualServices(int serverId, int[] ids) { return(ServerController.DeleteVirtualServices(serverId, ids)); }
private static IGameController MakeController(GameType type, GameCore core, EventFactory eventFactory) { IGameController controller; var baseController = new GameController(core, eventFactory); switch (type) { case GameType.Local: controller = baseController; break; case GameType.Streaming: controller = new ServerController(baseController); break; case GameType.Watching: controller = new ClientController(baseController); break; default: throw new ArgumentOutOfRangeException("GameType"); } return controller; }
public ServerInfo GetServerById(int serverId) { return(ServerController.GetServerById(serverId, false)); }