当前位置: 首页>>代码示例>>C#>>正文


C# PubnubClientError类代码示例

本文整理汇总了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 ();
 }
开发者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


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