public CampfireChatClient(CampfireNetClient campfireNetClient, CampfireChatSettings campfireChatSettings, ChatRoomTable chatRoomTable, ChatMessageSender messageSender) { this.campfireChatSettings = campfireChatSettings; CampfireNetClient = campfireNetClient; ChatRoomTable = chatRoomTable; MessageSender = messageSender; }
public static CampfireChatClient Create(CampfireNetClient campfireNetClient) { var campfireChatSettings = new CampfireChatSettings { LocalFriendlyName = "Anonymous" }; var chatRoomTable = new ChatRoomTable(); var messageSender = new ChatMessageSender(campfireNetClient, chatRoomTable); var campfireChatClient = new CampfireChatClient(campfireNetClient, campfireChatSettings, chatRoomTable, messageSender); chatRoomTable.SetChatMessageSender(messageSender); chatRoomTable.SetCampfireChatClient(campfireChatClient); campfireChatClient.Initialize(); return(campfireChatClient); }