public RoomViewModel(Room room) : base(room) { name.SetValue(room.Name); RoomGroupId = room.RoomGroup_Id.HasValue ? room.RoomGroup_Id.Value : -1; serviceIp.SetValue(room.ServiceIp); rtmpUrl.SetValue("rtmp://" + ServiceIp + "/oflaDemo"); MaxUserCount = room.MaxUserCount.Value; }
public RoomModel(Room room) : base(room) { if (room != null) { Name = room.Name; Description = room.Description; HostUser_Id = room.HostUser_Id; AgentUser_Id = room.AgentUser_Id; RoomGroup_Id = room.RoomGroup_Id; MaxUserCount = room.MaxUserCount; Hide = room.Hide; PublicMicCount = room.PublicMicCount; PrivateMicCount = room.PrivateMicCount; SecretMicCount = room.SecretMicCount; PublicChatEnabled = room.PublicChatEnabled?1:0; PrivateChatEnabled = room.PrivateChatEnabled?1:0; GiftEnabled = room.GiftEnabled?1:0; ServiceIp = room.ServiceIp; PublicMicTime = room.PublicMicTime; Password = room.Password; Enabled = room.Enabled.HasValue?(room.Enabled.Value?1:0):0; } }
public Room GetRoom(int appid, int userId, string token, int id) { try { CheckToken(appid, userId, token); Room room = new Room { Id = id }; modelAccesser.Get(room); return room.Loaded ? room : null; } catch (Exception) { throw new DatabaseException(); } }
public YoYoStudio.Model.Chat.Room AddRoom(int userId, string token, YoYoStudio.Model.Chat.Room room) { return(client.AddRoom(application_Id, userId, token, room)); }
public void UpdateRoom(int userId, string token, YoYoStudio.Model.Chat.Room room) { client.UpdateRoom(application_Id, userId, token, room); }