本文整理汇总了C#中Pubnub.RemoveChannelGroup方法的典型用法代码示例。如果您正苦于以下问题:C# Pubnub.RemoveChannelGroup方法的具体用法?C# Pubnub.RemoveChannelGroup怎么用?C# Pubnub.RemoveChannelGroup使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Pubnub
的用法示例。
在下文中一共展示了Pubnub.RemoveChannelGroup方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Main
//.........这里部分代码省略.........
string addChannelGroupNamespace = Console.ReadLine();
Console.ForegroundColor = ConsoleColor.Blue;
Console.WriteLine(string.Format("namespace = {0}", addChannelGroupNamespace));
Console.ResetColor();
Console.WriteLine("Enter channel group name");
string addChannelGroupName = Console.ReadLine();
Console.ForegroundColor = ConsoleColor.Blue;
Console.WriteLine(string.Format("channel group name = {0}", addChannelGroupName));
Console.ResetColor();
Console.WriteLine("Enter CHANNEL name. Use comma to enter multiple channels.");
channel = Console.ReadLine();
Console.ForegroundColor = ConsoleColor.Blue;
Console.WriteLine(string.Format("Channel = {0}",channel));
Console.ResetColor();
Console.WriteLine();
pubnub.AddChannelsToChannelGroup<string>(channel.Split(','), addChannelGroupNamespace, addChannelGroupName, DisplayReturnMessage, DisplayErrorMessage);
break;
case "39":
Console.WriteLine("Enter namespace");
string removeChannelGroupNamespace = Console.ReadLine();
Console.ForegroundColor = ConsoleColor.Blue;
Console.WriteLine(string.Format("namespace = {0}", removeChannelGroupNamespace));
Console.ResetColor();
if (removeChannelGroupNamespace.Trim().Length > 0)
{
Console.WriteLine("Do you want to remove the namespace and all its group names and all its channels? Default is No. Enter Y for Yes, Else just hit ENTER key");
string removeExistingNamespace = Console.ReadLine();
if (removeExistingNamespace.ToLower() == "y")
{
pubnub.RemoveChannelGroupNameSpace<string>(removeChannelGroupNamespace, DisplayReturnMessage, DisplayErrorMessage);
break;
}
}
Console.WriteLine("Enter channel group name");
string removeChannelGroupName = Console.ReadLine();
Console.ForegroundColor = ConsoleColor.Blue;
Console.WriteLine(string.Format("channel group name = {0}", removeChannelGroupName));
Console.ResetColor();
if (removeChannelGroupName.Trim().Length <= 0)
{
Console.WriteLine("Channel group not provided. Try again");
break;
}
Console.WriteLine("Do you want to remove the channel group and all its channels? Default is No. Enter Y for Yes, Else just hit ENTER key");
string removeExistingGroup = Console.ReadLine();
if (removeExistingGroup.ToLower() == "y")
{
pubnub.RemoveChannelGroup<string>(removeChannelGroupNamespace, removeChannelGroupName, DisplayReturnMessage, DisplayErrorMessage);
break;
}
Console.WriteLine("Enter CHANNEL name. Use comma to enter multiple channels.");
channel = Console.ReadLine();
Console.ForegroundColor = ConsoleColor.Blue;
Console.WriteLine(string.Format("Channel = {0}",channel));
Console.ResetColor();
Console.WriteLine();
pubnub.RemoveChannelsFromChannelGroup<string>(channel.Split(','), removeChannelGroupNamespace, removeChannelGroupName, DisplayReturnMessage, DisplayErrorMessage);
break;
case "40":