public static GameSession ParseFromBufferedGameSession(Com.Amazon.Whitewater.Auxproxy.Pbuffer.GameSession gameSession) { var translation = new GameSession(); translation.Name = gameSession.Name; translation.FleetId = gameSession.FleetId; translation.GameSessionId = gameSession.GameSessionId; translation.MaximumPlayerSessionCount = gameSession.MaxPlayers; translation.Port = gameSession.Port; translation.IpAddress = gameSession.IpAddress; translation.GameSessionData = gameSession.GameSessionData; translation.MatchmakerData = gameSession.MatchmakerData; translation.DnsName = gameSession.DnsName; foreach (var gameProperty in gameSession.GameProperties) { var translatedGameProperty = new GameProperty(); translatedGameProperty.Key = gameProperty.Key; translatedGameProperty.Value = gameProperty.Value; translation.GameProperties.Add(translatedGameProperty); } return(translation); }
public static GameSession ParseFromBufferedGameSession(Aws.GameLift.Protobuf.GameSession gameSession) { var translation = new GameSession(); translation.Name = gameSession.Name; translation.FleetId = gameSession.FleetId; translation.GameSessionId = gameSession.GameSessionId; translation.MaximumPlayerSessionCount = gameSession.MaxPlayers; translation.IpAddress = gameSession.IpAddress; translation.Port = gameSession.Port; translation.GameSessionData = gameSession.GameSessionData; translation.MatchmakerData = gameSession.MatchmakerData; translation.DnsName = gameSession.DnsName; if (gameSession.GameProperties != null) { foreach (var gameProperty in gameSession.GameProperties) { var translatedGameProperty = new GameProperty(); translatedGameProperty.Key = gameProperty.Key; translatedGameProperty.Value = gameProperty.Value; translation.GameProperties.Add(translatedGameProperty); } } return(translation); }