本文整理匯總了C#中PubNub_Messaging.Pubnub.generateGUID方法的典型用法代碼示例。如果您正苦於以下問題:C# Pubnub.generateGUID方法的具體用法?C# Pubnub.generateGUID怎麽用?C# Pubnub.generateGUID使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類PubNub_Messaging.Pubnub
的用法示例。
在下文中一共展示了Pubnub.generateGUID方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。
示例1: Main
public static void Main()
{
Pubnub pubnub = new Pubnub(
"demo",
"demo",
"",
false
);
string channel = "my/channel";
string message = "Pubnub API Usage Example";
pubnub.PropertyChanged += new PropertyChangedEventHandler(Pubnub_PropertyChanged);
Console.WriteLine("UUID -> " + pubnub.generateGUID());
pubnub.publish(channel, message);
pubnub.history(channel, 10);
pubnub.time();
pubnub.subscribe(channel);
Console.ReadKey();
}
示例2: ThenItShouldGenerateUniqueIdentifier
public void ThenItShouldGenerateUniqueIdentifier()
{
Pubnub pubnub = new Pubnub(
"demo",
"demo",
"",
"",
false
);
Assert.NotNull(pubnub.generateGUID());
}
示例3: ThenPubnubShouldGenerateUniqueIdentifier
public void ThenPubnubShouldGenerateUniqueIdentifier()
{
ThreadPool.QueueUserWorkItem((s) =>
{
Pubnub pubnub = new Pubnub("demo", "demo", "", "", false);
Deployment.Current.Dispatcher.BeginInvoke(() =>
{
Assert.IsNotNull(pubnub.generateGUID());
TestComplete();
});
});
}