This class is used to maintain the sub request token for ms-fsshttpb.
예제 #1
0
        /// <summary>
        /// Override the Reset function.
        /// </summary>
        public override void Reset()
        {
            base.Reset();

            // Clear the ms-fsshttpb sub request mapping
            MsfsshttpbSubRequestMapping.Clear();

            // Gracefully close the proxy.
            this.CloseProxy();
        }
        /// <summary>
        /// Used to add the sub request
        /// </summary>
        /// <param name="subRequest">Sub request</param>
        /// <param name="dataElement">Date elements list</param>
        public void AddSubRequest(FsshttpbCellSubRequest subRequest, List <DataElement> dataElement)
        {
            if (this.SubRequests == null)
            {
                this.SubRequests = new List <FsshttpbCellSubRequest>();
            }

            this.SubRequests.Add(subRequest);

            // Add the sub-request mapping for further validation usage.
            MsfsshttpbSubRequestMapping.Add((int)subRequest.RequestID, subRequest.GetType(), SharedContext.Current.Site);

            if (dataElement != null)
            {
                if (this.DataElementPackage == null)
                {
                    this.DataElementPackage = new DataElementPackage();
                }

                this.DataElementPackage.DataElements.AddRange(dataElement);
            }
        }