public void RunWebRequest(RequestState requestState, PubNubNonSubBuilder <U, V> pnBuilder)
        {
            try{
                PNBuilder = pnBuilder;

                webRequestId = webRequest.Run(requestState);
            } catch (Exception ex) {
                #if (ENABLE_PUBNUB_LOGGING)
                this.queueManager.PubNubInstance.PNLog.WriteToLog(string.Format("ex.ToString() {0}", ex.ToString()), PNLoggingMethod.LevelInfo);
                #endif
            }
        }
예제 #2
0
        public void Async(PubNubNonSubBuilder <U, V> pnBuilder)
        {
            #if (ENABLE_PUBNUB_LOGGING)
            this.PubNubInstance.PNLog.WriteToLog(string.Format("base Async {0}", OperationType.ToString()), PNLoggingMethod.LevelInfo);
            #endif

            if (Callback == null)
            {
                #if (ENABLE_PUBNUB_LOGGING)
                this.PubNubInstance.PNLog.WriteToLog(string.Format("Callback is null. Stopping request.{0}", OperationType.ToString()), PNLoggingMethod.LevelWarning);
                #endif

                return;
            }

            RequestQueue.Instance.Enqueue(Callback, OperationType, pnBuilder, this.PubNubInstance);
        }
예제 #3
0
        protected void RunWebRequest(QueueManager qm, Uri request, RequestState requestState, int timeout, int pause, PubNubNonSubBuilder <U, V> pnBuilder)
        {
            #if (ENABLE_PUBNUB_LOGGING)
            this.PubNubInstance.PNLog.WriteToLog(string.Format("{1}: {0}", request.OriginalString, requestState.OperationType), PNLoggingMethod.LevelInfo);
            #endif
            NonSubscribeWorker <U, V> nonSubscribeWorker = new NonSubscribeWorker <U, V> (qm);
            requestState.URL       = request.OriginalString;
            requestState.Timeout   = timeout;
            requestState.Pause     = 0;
            requestState.Reconnect = false;

            nonSubscribeWorker.RunWebRequest(requestState, pnBuilder);
        }