コード例 #1
0
        private void AddChildEpcs(EpcisEvent evt)
        {
            var childQuantity = new XElement("childQuantityList", XmlEventFormatter.FormatEpcQuantity(evt, EpcType.ChildQuantity));

            Root.Add(new XElement("childEPCs", XmlEventFormatter.FormatEpcList(evt, EpcType.ChildEpc)));
            if (childQuantity.HasElements)
            {
                Extension.Add(childQuantity);
            }
        }
コード例 #2
0
        protected virtual void AddEpcList(EpcisEvent evt)
        {
            var inputEpcList = new XElement("inputEPCList", XmlEventFormatter.FormatEpcList(evt, EpcType.InputEpc));
            var quantityList = new XElement("quantityList", XmlEventFormatter.FormatEpcQuantity(evt, EpcType.Quantity));

            Root.Add(new XElement("epcList", XmlEventFormatter.FormatEpcList(evt, EpcType.List)));
            if (inputEpcList.HasElements)
            {
                Root.Add(inputEpcList);
            }
            if (quantityList.HasElements)
            {
                Extension.Add(quantityList);
            }
        }
コード例 #3
0
        private void AddInputOutputEpcList(EpcisEvent evt)
        {
            var inputEpcList   = new XElement("inputEPCList", XmlEventFormatter.FormatEpcList(evt, EpcType.InputEpc));
            var inputQuantity  = new XElement("inputQuantityList", XmlEventFormatter.FormatEpcQuantity(evt, EpcType.InputQuantity));
            var outputQuantity = new XElement("outputQuantityList", XmlEventFormatter.FormatEpcQuantity(evt, EpcType.OutputQuantity));
            var outputEpcList  = new XElement("outputEPCList", XmlEventFormatter.FormatEpcList(evt, EpcType.OutputEpc));

            if (inputEpcList.HasElements)
            {
                Root.Add(inputEpcList);
            }
            if (inputQuantity.HasElements)
            {
                Root.Add(inputQuantity);
            }
            if (outputEpcList.HasElements)
            {
                Root.Add(outputEpcList);
            }
            if (outputQuantity.HasElements)
            {
                Root.Add(outputQuantity);
            }
        }