public static SessionType SessionType(this IMySession session) { var flags = 0; if (session.IsController()) { flags |= (int)Utils.SessionType.PlayerController; } if (session.IsDecider()) { flags |= (int)Utils.SessionType.ServerDecider; } return((SessionType)flags); }