本文整理汇总了C#中Channel.Join方法的典型用法代码示例。如果您正苦于以下问题:C# Channel.Join方法的具体用法?C# Channel.Join怎么用?C# Channel.Join使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Channel
的用法示例。
在下文中一共展示了Channel.Join方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Query
public void Query()
{
var ch = new Channel("world");
ch.Join(new Session());
ch.Join(new Session());
Assert.AreEqual(
2,
ch.Query().Count);
}
示例2: JoinPrimaryChannel
private void JoinPrimaryChannel()
{
ChatConnector.DefaultCredentials = new Credentials { AuthKey = MasterConfig.AuthKey, Username = MasterConfig.Username };
//PrimaryChannel = ChatConnector.GetConnection("maritaria");
PrimaryChannel = ChatConnector.GetConnection("qazitv");
PrimaryChannel.Join();
PrimaryChannel.Announce(@"is now online");
ChatConnector.WhisperServer.WhisperReceived += WhisperServer_WhisperReceived;
}
示例3: JoinChannel
public ChannelResult JoinChannel(out Channel Chan, string ChannelName, string ChannelPassword, string PlayerName, int MaxPlayers, bool Create)
{
ChannelResult Result = ChannelResult.CHANNEL_OK;
Chan = GetChannel(ChannelName);
if (Chan == null && Create)
Result = CreateChannel(out Chan, ChannelName, ChannelPassword, "", MaxPlayers);
if (Chan == null)
return Result;
return Chan.Join(PlayerName, ChannelPassword, true);
}
示例4: JoinTest
public void JoinTest()
{
Channel channel = new Channel("#channel");
Messages.Send.Join join = channel.Join();
string output = TestHelpers.GetSendMessageOutput(join);
Assert.AreEqual("JOIN #channel", output);
}