Esempio n. 1
0
        private void StartBatchRequest(XmlDocument xmldoc)
        {
            string str = "<batchRequest xmlns=\"urn:oasis:names:tc:DSML:2:0:core\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" />";

            xmldoc.LoadXml(str);
            XmlAttribute           xmlAttribute           = xmldoc.CreateAttribute("processing", null);
            DsmlDocumentProcessing dsmlDocumentProcessing = this.docProcessing;

            switch (dsmlDocumentProcessing)
            {
            case DsmlDocumentProcessing.Sequential:
            {
                xmlAttribute.InnerText = "sequential";
                break;
            }

            case DsmlDocumentProcessing.Parallel:
            {
                xmlAttribute.InnerText = "parallel";
                break;
            }
            }
            xmldoc.DocumentElement.Attributes.Append(xmlAttribute);
            xmlAttribute = xmldoc.CreateAttribute("responseOrder", null);
            DsmlResponseOrder dsmlResponseOrder = this.resOrder;

            switch (dsmlResponseOrder)
            {
            case DsmlResponseOrder.Sequential:
            {
                xmlAttribute.InnerText = "sequential";
                break;
            }

            case DsmlResponseOrder.Unordered:
            {
                xmlAttribute.InnerText = "unordered";
                break;
            }
            }
            xmldoc.DocumentElement.Attributes.Append(xmlAttribute);
            xmlAttribute = xmldoc.CreateAttribute("onError", null);
            DsmlErrorProcessing dsmlErrorProcessing = this.errProcessing;

            switch (dsmlErrorProcessing)
            {
            case DsmlErrorProcessing.Resume:
            {
                xmlAttribute.InnerText = "resume";
                break;
            }

            case DsmlErrorProcessing.Exit:
            {
                xmlAttribute.InnerText = "exit";
                break;
            }
            }
            xmldoc.DocumentElement.Attributes.Append(xmlAttribute);
            if (this.dsmlRequestID != null)
            {
                xmlAttribute           = xmldoc.CreateAttribute("requestID", null);
                xmlAttribute.InnerText = this.dsmlRequestID;
                xmldoc.DocumentElement.Attributes.Append(xmlAttribute);
            }
        }
Esempio n. 2
0
		public DsmlRequestDocument()
		{
			this.errProcessing = DsmlErrorProcessing.Exit;
			Utility.CheckOSVersion();
			this.dsmlRequests = new ArrayList();
		}
Esempio n. 3
0
 public DsmlRequestDocument()
 {
     this.errProcessing = DsmlErrorProcessing.Exit;
     Utility.CheckOSVersion();
     this.dsmlRequests = new ArrayList();
 }