public Task <Result> Load(string directoryName, string fileName) { string connectionId = Context.ConnectionId; if (Context.Items.TryGetValue(connectionId, out object serverId)) { string userName = Context.User.Identity.Name; string id = (string)serverId; return(_factorioServerManager.Load(id, directoryName, fileName, userName)); } var error = Result.Failure(Constants.ServerIdErrorKey, $"The server id for the connection is invalid."); return(Task.FromResult(error)); }