public static string ToStr(this IJoinGameRequest info, bool isFromOp = true) { StringBuilder builder = new StringBuilder(); if (info == null) { builder.AppendLine(string.Format("IJoinGameRequest=null")); } else { if (!isFromOp) { ToStr((IOperationRequest)info, true); } builder.AppendLine(string.Format("IJoinGameRequest.ActorNr={0}", info.ActorNr)); builder.AppendLine(string.Format("IJoinGameRequest.GameId={0}", info.GameId)); builder.AppendLine(string.Format("IJoinGameRequest.BroadcastActorProperties={0}", info.BroadcastActorProperties)); builder.AppendLine(string.Format("IJoinGameRequest.CreateIfNotExists={0}", info.CreateIfNotExists)); builder.AppendLine(string.Format("IJoinGameRequest.EmptyRoomLiveTime={0}", info.EmptyRoomLiveTime)); builder.AppendLine(string.Format("IJoinGameRequest.JoinMode={0}", info.JoinMode)); builder.AppendLine(string.Format("IJoinGameRequest.LobbyName={0}", info.LobbyName)); builder.AppendLine(string.Format("IJoinGameRequest.SuppressRoomEvents={0}", info.SuppressRoomEvents)); builder.AppendLine(info.ActorProperties.ToStr("IJoinGameRequest.ActorProperties")); builder.AppendLine(info.GameProperties.ToStr("IJoinGameRequest.GameProperties")); } return(builder.ToString()); }
private static void CheckIJoinGameRequest(IJoinGameRequest request) { Assert.IsNotNull(request.ActorProperties); Assert.IsNotNull(request.GameProperties); Assert.IsNotNull(request.LobbyName); Assert.IsFalse(request.BroadcastActorProperties); Assert.IsFalse(request.CreateIfNotExists); Assert.IsFalse(request.DeleteCacheOnLeave); Assert.IsFalse(request.SuppressRoomEvents); Assert.AreEqual(0, request.EmptyRoomLiveTime); Assert.AreEqual(0, request.LobbyType); Assert.IsNotNullOrEmpty(request.GameId); }