本文整理汇总了C#中PubnubClientError类的典型用法代码示例。如果您正苦于以下问题:C# PubnubClientError类的具体用法?C# PubnubClientError怎么用?C# PubnubClientError使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
PubnubClientError类属于命名空间,在下文中一共展示了PubnubClientError类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ErrorCallbackForCleanUpAccessAtChannelLevel
void ErrorCallbackForCleanUpAccessAtChannelLevel (PubnubClientError receivedMessage)
{
if (receivedMessage != null) {
Console.WriteLine (receivedMessage.Message);
}
auditManualEvent.Set ();
}
示例2: ErrorCallbackForSampleGrantAtChannelLevel
void ErrorCallbackForSampleGrantAtChannelLevel (PubnubClientError receivedMessage)
{
if (receivedMessage != null) {
Console.WriteLine (receivedMessage);
}
grantManualEvent.Set ();
}
示例3: PublishErrorCallback
private void PublishErrorCallback(PubnubClientError obj)
{
throw new NotImplementedException();
}
示例4: DummySubscribeErrorCallback
private void DummySubscribeErrorCallback(PubnubClientError result)
{
Console.WriteLine(result.ToString());
if (currentUnitTestCase == "Init")
{
grantManualEvent.Set();
}
else
{
subscribeManualEvent.Set();
}
}
示例5: NoExistChannelErrorCallback
private void NoExistChannelErrorCallback(PubnubClientError result)
{
if (result != null && result.Message.ToLower().Contains("not subscribed"))
{
receivedNotSubscribedMessage = true;
}
meNotSubscribed.Set();
}
示例6: DisplayErrorMessageSegments
void DisplayErrorMessageSegments (PubnubClientError pubnubError)
{
// These are all the attributes you may be interested in logging, switchiing on etc:
Console.WriteLine ("<STATUS CODE>: {0}", pubnubError.StatusCode); // Unique ID of Error
Display (String.Format ("Error: {0}", pubnubError.Message));
Console.WriteLine ("<MESSAGE>: {0}", pubnubError.Message); // Message received from server/clent or from .NET exception
Console.WriteLine ("<SEVERITY>: {0}", pubnubError.Severity); // Info can be ignored, Warning and Error should be handled
if (pubnubError.DetailedDotNetException != null) {
Console.WriteLine (pubnubError.IsDotNetException); // Boolean flag to check .NET exception
Console.WriteLine ("<DETAILED DOT.NET EXCEPTION>: {0}", pubnubError.DetailedDotNetException.ToString ()); // Full Details of .NET exception
}
Console.WriteLine ("<MESSAGE SOURCE>: {0}", pubnubError.MessageSource); // Did this originate from Server or Client-side logic
if (pubnubError.PubnubWebRequest != null) {
//Captured Web Request details
Console.WriteLine ("<HTTP WEB REQUEST>: {0}", pubnubError.PubnubWebRequest.RequestUri.ToString ());
Console.WriteLine ("<HTTP WEB REQUEST - HEADERS>: {0}", pubnubError.PubnubWebRequest.Headers.ToString ());
}
if (pubnubError.PubnubWebResponse != null) {
//Captured Web Response details
Console.WriteLine ("<HTTP WEB RESPONSE - HEADERS>: {0}", pubnubError.PubnubWebResponse.Headers.ToString ());
}
Console.WriteLine ("<DESCRIPTION>: {0}", pubnubError.Description); // Useful for logging and troubleshooting and support
Display (String.Format ("DESCRIPTION: {0}", pubnubError.Description));
Console.WriteLine ("<CHANNEL>: {0}", pubnubError.Channel); //Channel name(s) at the time of error
Console.WriteLine ("<DATETIME>: {0}", pubnubError.ErrorDateTimeGMT); //GMT time of error
}
示例7: DisplayErrorMessage
static void DisplayErrorMessage (PubnubClientError result)
{
Console.WriteLine ();
Console.WriteLine (result.Description);
Console.WriteLine ();
}
示例8: DummyErrorCallback
private void DummyErrorCallback(PubnubClientError result)
{
channelGroupManualEvent.Set();
}
示例9: PollUserAnswerPublishErrorCallback
private static void PollUserAnswerPublishErrorCallback(PubnubClientError publishError)
{
}
示例10: DummyErrorCallback
private void DummyErrorCallback(PubnubClientError result)
{
if (currentUnitTestCase == "ThenRevokeAtChannelLevelReturnSuccess")
{
grantManualEvent.Set();
}
}
示例11: DummyErrorCallback
void DummyErrorCallback(PubnubClientError result)
{
Debug.Log("WhenGetRequestServerTime ErrorCallback = " + result.Description);
}
示例12: DummySubscribeErrorCallback
private void DummySubscribeErrorCallback(PubnubClientError result)
{
unsubscribeManualEvent.Set();
}
示例13: DummyErrorCallback
void DummyErrorCallback(PubnubClientError result)
{
if (currentTestCase == "DetailHistoryWithNullKeysReturnsError")
{
messageReceived = true;
mreDetailedHistory.Set();
}
}
示例14: ReturnPublishMessageTooLargeErrorCallback
private void ReturnPublishMessageTooLargeErrorCallback(PubnubClientError pubnubError)
{
Console.WriteLine(pubnubError);
if (pubnubError != null)
{
if (pubnubError.Message.ToLower().IndexOf("message too large") >= 0)
{
isLargeMessagePublished = true;
}
}
mreLaregMessagePublish.Set();
}
示例15: DisplayErrorMessage
private void DisplayErrorMessage(PubnubClientError obj)
{
//throw new NotImplementedException();
}