Ejemplo n.º 1
0
        /// <summary>
        /// Add new instance of <see cref="XdsQuery"/> that has the specified query string and request type
        /// </summary>
        /// <param name="query">query string to execute</param>
        /// <param name="requestKind">request type</param>
        /// <returns>Return added <see cref="XdsQuery"/></returns>
        public virtual XdsQuery AddQuery(string query, XmlDataRequestKind requestKind)
        {
            var xq = new XdsQuery(query, requestKind);

            base.Add(xq);
            return(xq);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// 서버에서 수행할 쿼리문을 요청문서에 등록한다.
        /// </summary>
        /// <param name="query">simple query string to execute</param>
        /// <param name="requestKind">request type</param>
        /// <param name="responseKind">response type</param>
        /// <param name="pageSize">page size</param>
        /// <param name="pageNo">page number (start with 1)</param>
        /// <returns>index of added <see cref="XdsRequestItem"/></returns>
        public virtual int AddRequestItem(string query, XmlDataRequestKind requestKind, XmlDataResponseKind responseKind,
                                          int pageSize, int pageNo)
        {
            if (IsDebugEnabled)
            {
                log.Debug(@"Add new Request Item. query=[{0}], requestKind=[{1}], responseKind=[{2}], pageSize=[{3}], pageNo=[{4}]",
                          query, requestKind, responseKind, pageSize, pageNo);
            }

            var request = new XdsRequestItem
            {
                Query        = query,
                RequestKind  = requestKind,
                ResponseKind = responseKind,
                PageSize     = pageSize,
                PageNo       = pageNo
            };

            lock (this) {
                request.Id = Count;
                Add(request);
            }

            return(request.Id);
        }
Ejemplo n.º 3
0
 /// <summary>
 /// 서버에서 수행할 쿼리문을 요청문서에 등록한다.
 /// </summary>
 /// <param name="query">simple query string to execute</param>
 /// <param name="requestKind">request type</param>
 /// <param name="responseKind">response type</param>
 /// <returns>index of added <see cref="XdsRequestItem"/></returns>
 public int AddRequestItem(string query, XmlDataRequestKind requestKind, XmlDataResponseKind responseKind)
 {
     return(AddRequestItem(query, requestKind, responseKind, MsgConsts.NO_PAGE_INDEX, MsgConsts.NO_PAGE_INDEX));
 }
Ejemplo n.º 4
0
 /// <summary>
 /// Constructor with the specified query string, request type
 /// </summary>
 /// <param name="query">simple query string to execute</param>
 /// <param name="requestKind">request type</param>
 public XdsQuery(string query, XmlDataRequestKind requestKind)
 {
     Query       = query;
     RequestKind = requestKind;
 }