public void GetChat() { this.TestWrapper(async(MixerClient client) => { ChannelChatModel chat = await ChatsServiceUnitTests.GetChat(client); }); }
public void GetChat() { TestWrapper(async(MixerConnection connection) => { ChannelChatModel chat = await ChatsServiceUnitTests.GetChat(connection); }); }
private ChatClient(ChannelModel channel, UserModel user, ChannelChatModel channelChat) { Validator.ValidateVariable(channel, "channel"); Validator.ValidateVariable(user, "user"); Validator.ValidateVariable(channelChat, "channelChat"); this.Channel = channel; this.User = user; this.channelChat = channelChat; }
/// <summary> /// Creates a chat client for the specified connection and channel. /// </summary> /// <param name="connection">The connection to use for client creation</param> /// <param name="channel">The channel to connect to</param> /// <returns>The chat client for the specified channel</returns> public static async Task <ChatClient> CreateFromChannel(MixerConnection connection, ChannelModel channel) { Validator.ValidateVariable(connection, "connection"); Validator.ValidateVariable(channel, "channel"); UserModel user = await connection.Users.GetCurrentUser(); ChannelChatModel chat = await connection.Chats.GetChat(channel); return(new ChatClient(channel, user, chat)); }
public static async Task <ChannelChatModel> GetChat(MixerClient client) { ChannelModel channel = await ChannelsServiceUnitTests.GetChannel(client); ChannelChatModel chat = await client.Chats.GetChat(channel); Assert.IsNotNull(chat); Assert.IsTrue(chat.endpoints.Count() > 0); return(chat); }
public ChatClient(ChannelModel channel, UserModel user, ChannelChatModel channelChat) { Validator.ValidateVariable(channel, "channel"); Validator.ValidateVariable(user, "user"); Validator.ValidateVariable(channelChat, "channelChat"); this.Channel = channel; this.User = user; this.channelChat = channelChat; this.CurrentPacketID = 0; }