コード例 #1
0
        protected override void RunWebRequest(QueueManager qm)
        {
            RequestState requestState = new RequestState();

            requestState.OperationType = base.OperationType;

            #if (ENABLE_PUBNUB_LOGGING)
            this.PubNubInstance.PNLog.WriteToLog(string.Format("FetchMessagesRequestBuilder: \nChannel {0} \nStartTime: {1} \nthis.EndTime:{2} \nthis.HistoryCount:{3} \nthis.ReverseHistory:{4}", string.Join(",", this.ChannelsToUse.ToArray()), this.StartTime, this.EndTime, this.HistoryCount, this.ReverseHistory), PNLoggingMethod.LevelInfo);
            #endif

            if (IncludeMessageActionsInHistory || ChannelsToUse.Count > 1)
            {
                this.HistoryCount = 25;
            }

            Uri request = BuildRequests.BuildFetchRequest(
                ChannelsToUse.ToArray(),
                this.StartTime,
                this.EndTime,
                this.HistoryCount,
                this.ReverseHistory,
                this.IncludeTimetokenInHistory,
                this.PubNubInstance,
                this.QueryParams,
                this.IncludeMetaInHistory,
                this.IncludeMessageActionsInHistory,
                this.IncludeMessageTypeInHistory,
                this.IncludeUUIDInHistory
                );

            base.RunWebRequest(qm, request, requestState, this.PubNubInstance.PNConfig.NonSubscribeTimeout, 0, this);
        }