本文整理汇总了C#中Pubnub.SetPubnubLog方法的典型用法代码示例。如果您正苦于以下问题:C# Pubnub.SetPubnubLog方法的具体用法?C# Pubnub.SetPubnubLog怎么用?C# Pubnub.SetPubnubLog使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Pubnub
的用法示例。
在下文中一共展示了Pubnub.SetPubnubLog方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Main
//.........这里部分代码省略.........
string publishKey = Console.ReadLine();
Console.ForegroundColor = ConsoleColor.Blue;
if (publishKey.Trim().Length > 0)
{
Console.WriteLine("Publish key provided.");
}
else
{
Console.WriteLine("Default demo publish key provided");
publishKey = "demo-36";
}
Console.ResetColor();
Console.WriteLine();
Console.WriteLine("ENTER secret key.");
Console.WriteLine("If you don't want to avail at this time, press ENTER.");
string secretKey = Console.ReadLine();
Console.ForegroundColor = ConsoleColor.Blue;
if (secretKey.Trim().Length > 0)
{
Console.WriteLine("Secret key provided.");
}
else
{
Console.WriteLine("Default demo Secret key provided");
secretKey = "demo-36";
}
Console.ResetColor();
Console.WriteLine();
pubnub = new Pubnub(publishKey, subscribeKey, secretKey, cipherKey,
(enableSSL.Trim().ToLower() == "y") ? true : false);
pubnub.SetPubnubLog(new PlatformPubnubLog());
pubnub.Origin = origin;
Console.WriteLine("Use Custom Session UUID? ENTER Y for Yes, else N");
string enableCustomUUID = Console.ReadLine();
if (enableCustomUUID.Trim().ToLower() == "y")
{
Console.WriteLine("ENTER Session UUID.");
string sessionUUID = Console.ReadLine();
pubnub.SessionUUID = sessionUUID;
Console.ForegroundColor = ConsoleColor.Blue;
Console.WriteLine("Accepted Custom Session UUID.");
Console.ResetColor();
}
else
{
Console.ForegroundColor = ConsoleColor.Blue;
Console.WriteLine("Default Session UUID opted.");
Console.ResetColor();
}
Console.WriteLine();
Console.WriteLine("By default Resume On Reconnect is enabled. Do you want to disable it? ENTER Y for Yes, else N");
string disableResumeOnReconnect = Console.ReadLine();
Console.ForegroundColor = ConsoleColor.Blue;
if (disableResumeOnReconnect.Trim().ToLower() == "y")
{
Console.WriteLine("Resume On Reconnect Disabled");
pubnub.EnableResumeOnReconnect = false;
}
else
{