/// <summary> /// получаем список всех игр, созданных на данный момент /// </summary> public static ResultModel ApiGetSessions() { try { var result = InternalSessionManager.InternalGetSessionsList(); if (result == null) { return(new ResultModel(false, "Something wrong")); } return(new ResultModel(true, result?.ToArray())); } catch (Exception ex) { return(null); } }
/// <summary> /// удаляем игрока из сессии /// </summary> public static ResultModel ApiDeleteUserFromGame(int userId, int sessionId) { try { var result = InternalSessionManager.InternalDeleteUserFromGame(userId, sessionId); if (result == null) { return(new ResultModel(false, "Something wrong")); } return(new ResultModel(true, result)); } catch (Exception ex) { Logger.Error($"ApiDeleteUserFromGame {ex.Message}"); return(new ResultModel(false, ex.Message)); } }