예제 #1
0
        public static async Task <Tuple <HttpStatusCode, string> > QuerySessionHistoryByXuidAsync(
            string scid,
            string templateName,
            long xuid,
            DateTime startAt,
            DateTime endAt,
            string continuationToken,
            string eToken)
        {
            string url = string.Format("{0}/serviceconfigs/{1}/sessiontemplates/{2}/query?take={3}", RequestRoot, scid, templateName, TakeSize);

            if (continuationToken != null)
            {
                url += string.Format("&continuationtoken={0}", continuationToken);
            }

            var postBody = new SessionHistoryQueryByXuidRequest
            {
                Xuid    = xuid.ToString(),
                StartAt = startAt,
                EndAt   = endAt
            };

            return(await SessionHistory.RunSessionHistoryRequestAsync(CreateSessionHistoryPostRequest(url, eToken, postBody.SerializeToJsonByteArray())));
        }
예제 #2
0
        public static async Task <Tuple <HttpStatusCode, string> > QuerySessionHistoryBranches(
            string scid,
            string templateName,
            string sessionName,
            string eToken)
        {
            string url = string.Format("{0}/serviceconfigs/{1}/sessiontemplates/{2}/sessions/{3}/branches", RequestRoot, scid, templateName, sessionName);

            WebRequest webRequest = CreateSessionHistoryGetRequest(url, eToken);

            return(await SessionHistory.RunSessionHistoryRequestAsync(webRequest));
        }
예제 #3
0
        public static async Task <Tuple <HttpStatusCode, string> > GetSessionHistoryDocumentChangeAsync(
            string scid,
            string templateName,
            string sessionName,
            string branch,
            long changeNumber,
            string eToken)
        {
            string url = string.Format("{0}/serviceconfigs/{1}/sessiontemplates/{2}/sessions/{3}/branches/{4}/changes/{5}", RequestRoot, scid, templateName, sessionName, branch, changeNumber);

            WebRequest webRequest = CreateSessionHistoryGetRequest(url, eToken);

            return(await SessionHistory.RunSessionHistoryRequestAsync(webRequest));
        }
예제 #4
0
        public static async Task <Tuple <HttpStatusCode, string> > QuerySessionHistoryByCorrelationIdAsync(
            string scid,
            string templateName,
            string correlationId,
            string eToken)
        {
            string url = string.Format("{0}/serviceconfigs/{1}/sessiontemplates/{2}/query", RequestRoot, scid, templateName);

            var postBody = new SessionHistoryQueryByCorrelationIdRequest
            {
                CorrelationId = correlationId,
            };

            return(await SessionHistory.RunSessionHistoryRequestAsync(CreateSessionHistoryPostRequest(url, eToken, postBody.SerializeToJsonByteArray())));
        }