• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# PubnubClientError类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中PubnubClientError的典型用法代码示例。如果您正苦于以下问题:C# PubnubClientError类的具体用法?C# PubnubClientError怎么用?C# PubnubClientError使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



PubnubClientError类属于命名空间,在下文中一共展示了PubnubClientError类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: ErrorCallbackForCleanUpAccessAtChannelLevel

 void ErrorCallbackForCleanUpAccessAtChannelLevel (PubnubClientError receivedMessage)
 {
     if (receivedMessage != null) {
         Console.WriteLine (receivedMessage.Message);
     }
     auditManualEvent.Set ();
 }
开发者ID:hakangs,项目名称:c-sharp,代码行数:7,代码来源:CleanupGrant.cs


示例2: ErrorCallbackForSampleGrantAtChannelLevel

 void ErrorCallbackForSampleGrantAtChannelLevel (PubnubClientError receivedMessage)
 {
     if (receivedMessage != null) {
         Console.WriteLine (receivedMessage);
     }
     grantManualEvent.Set ();
 }
开发者ID:hakangs,项目名称:c-sharp,代码行数:7,代码来源:GenerateSampleGrant.cs


示例3: PublishErrorCallback

 private void PublishErrorCallback(PubnubClientError obj)
 {
     throw new NotImplementedException();
 }
开发者ID:johncharris,项目名称:SprinklerControl,代码行数:4,代码来源:ZoneMQ.cs


示例4: DummySubscribeErrorCallback

 private void DummySubscribeErrorCallback(PubnubClientError result)
 {
     Console.WriteLine(result.ToString());
     if (currentUnitTestCase == "Init")
     {
         grantManualEvent.Set();
     }
     else
     {
         subscribeManualEvent.Set();
     }
 }
开发者ID:RecursosOnline,项目名称:c-sharp,代码行数:12,代码来源:WhenSubscribedToAChannelGroup.cs


示例5: NoExistChannelErrorCallback

 private void NoExistChannelErrorCallback(PubnubClientError result)
 {
     if (result != null && result.Message.ToLower().Contains("not subscribed"))
     {
         receivedNotSubscribedMessage = true;
     }
     meNotSubscribed.Set();
 }
开发者ID:RecursosOnline,项目名称:c-sharp,代码行数:8,代码来源:WhenUnsubscribedToAChannel.cs


示例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

        }
开发者ID:pubnub,项目名称:c-sharp,代码行数:30,代码来源:MainActivity.cs


示例7: DisplayErrorMessage

 static void DisplayErrorMessage (PubnubClientError result)
 {
     Console.WriteLine ();
     Console.WriteLine (result.Description);
     Console.WriteLine ();
 }
开发者ID:RecursosOnline,项目名称:c-sharp,代码行数:6,代码来源:TrafficUpdates.cs


示例8: DummyErrorCallback

 private void DummyErrorCallback(PubnubClientError result)
 {
     channelGroupManualEvent.Set();
 }
开发者ID:RecursosOnline,项目名称:c-sharp,代码行数:4,代码来源:WhenChannelGroupIsRequested.cs


示例9: PollUserAnswerPublishErrorCallback

 private static void PollUserAnswerPublishErrorCallback(PubnubClientError publishError)
 {
 }
开发者ID:RecursosOnline,项目名称:c-sharp,代码行数:3,代码来源:PollWorker.cs


示例10: DummyErrorCallback

 private void DummyErrorCallback(PubnubClientError result)
 {
     if (currentUnitTestCase == "ThenRevokeAtChannelLevelReturnSuccess")
     {
         grantManualEvent.Set();
     }
 }
开发者ID:RecursosOnline,项目名称:c-sharp,代码行数:7,代码来源:WhenGrantIsRequested.cs


示例11: DummyErrorCallback

        void DummyErrorCallback(PubnubClientError result)
        {
			Debug.Log("WhenGetRequestServerTime ErrorCallback = " + result.Description);
        }
开发者ID:TharinduMunasinge,项目名称:c-sharp,代码行数:4,代码来源:WhenGetRequestServerTime.cs


示例12: DummySubscribeErrorCallback

 private void DummySubscribeErrorCallback(PubnubClientError result)
 {
     unsubscribeManualEvent.Set();
 }
开发者ID:RecursosOnline,项目名称:c-sharp,代码行数:4,代码来源:WhenUnsubscribedToAChannelGroup.cs


示例13: DummyErrorCallback

 void DummyErrorCallback(PubnubClientError result)
 {
     if (currentTestCase == "DetailHistoryWithNullKeysReturnsError")
     {
         messageReceived = true;
         mreDetailedHistory.Set();
     }
 }
开发者ID:RecursosOnline,项目名称:c-sharp,代码行数:8,代码来源:WhenDetailedHistoryIsRequested.cs


示例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();
        }
开发者ID:RecursosOnline,项目名称:c-sharp,代码行数:13,代码来源:WhenAMessageIsPublished.cs


示例15: DisplayErrorMessage

 private void DisplayErrorMessage(PubnubClientError obj)
 {
     //throw new NotImplementedException();
 }
开发者ID:johncharris,项目名称:SprinklerControl,代码行数:4,代码来源:ZoneMQ.cs


示例16: DummyErrorCallback

 private void DummyErrorCallback(PubnubClientError result)
 {
     if (result != null)
     {
         Console.WriteLine("DummyErrorCallback result = " + result.Message);
     }
     if (currentTestCase == "Init")
     {
         mreGrant.Set();
     }
 }
开发者ID:RecursosOnline,项目名称:c-sharp,代码行数:11,代码来源:WhenSubscribedToWildcardChannel.cs


示例17: PollQuestionMonitorErrorCallback

 private static void PollQuestionMonitorErrorCallback(PubnubClientError monitorError)
 {
 }
开发者ID:RecursosOnline,项目名称:c-sharp,代码行数:3,代码来源:PollWorker.cs


示例18: DummyErrorCallback

 private void DummyErrorCallback(PubnubClientError result)
 {
     if (result != null)
     {
         //Console.WriteLine(result.Message);
     }
 }
开发者ID:RecursosOnline,项目名称:c-sharp,代码行数:7,代码来源:WhenAMessageIsPublished.cs


示例19: PollResultsErrorCallback

 private static void PollResultsErrorCallback(PubnubClientError pollResultError)
 {
 }
开发者ID:RecursosOnline,项目名称:c-sharp,代码行数:3,代码来源:PollWorker.cs


示例20: ReturnPublishMessageTooLargeErrorCallback

 private void ReturnPublishMessageTooLargeErrorCallback(PubnubClientError pubnubError)
 {
     //Console.WriteLine(pubnubError);
     if (pubnubError != null)
     {
         if (pubnubError.Message.ToLower().IndexOf("message too large") >= 0)
         {
             isLargeMessagePublished = true;
         }
     }
     //if (!string.IsNullOrEmpty(result) && !string.IsNullOrEmpty(result.Trim()))
     //{
     //    object[] deserializedMessage = JsonConvert.DeserializeObject<object[]>(result);
     //    if (deserializedMessage is object[])
     //    {
     //        long statusCode = Int64.Parse(deserializedMessage[0].ToString().Trim());
     //        string statusMessage = (string)deserializedMessage[1];
     //        if (statusCode == 0 && statusMessage.ToLower() == "message too large")
     //        {
     //            isLargeMessagePublished = true;
     //        }
     //    }
     //}
     mreLaregMessagePublish.Set();
 }
开发者ID:RecursosOnline,项目名称:c-sharp,代码行数:25,代码来源:WhenAMessageIsPublished.cs



注:本文中的PubnubClientError类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# PullRequestsClient类代码示例发布时间:2022-05-24
下一篇:
C# Pubnub类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap