Exemplo n.º 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);
            }
        }
Exemplo n.º 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);
            }
        }
Exemplo n.º 3
0
        public XElement Process(EpcisEvent quantityEvent)
        {
            _root = XmlEventFormatter.CreateEvent("QuantityEvent", quantityEvent);

            AddQuantityEpc(quantityEvent);
            AddBusinessStep(quantityEvent);
            AddDisposition(quantityEvent);
            AddReadPoint(quantityEvent);
            AddBusinessLocation(quantityEvent);
            AddBusinessTransactions(quantityEvent);
            AddEventExtension(quantityEvent);
            AddExtensionField();
            AddCustomFields(quantityEvent);

            return(_root);
        }
Exemplo n.º 4
0
        public XElement Process(EpcisEvent transformationEvent)
        {
            _root = XmlEventFormatter.CreateEvent("TransformationEvent", transformationEvent);

            AddEpcList(transformationEvent);
            AddBusinessStep(transformationEvent);
            AddDisposition(transformationEvent);
            AddReadPoint(transformationEvent);
            AddBusinessLocation(transformationEvent);
            AddBusinessTransactions(transformationEvent);
            AddSourceDestinations(transformationEvent);
            AddEventExtension(transformationEvent);
            AddExtensionField();
            AddCustomFields(transformationEvent);

            return(new XElement("extension", _root));
        }
Exemplo n.º 5
0
        public XElement Process(EpcisEvent epcisEvent)
        {
            Root = XmlEventFormatter.CreateEvent("TransactionEvent", epcisEvent);

            AddBusinessTransactions(epcisEvent);
            AddEpcList(epcisEvent);
            AddAction(epcisEvent);
            AddBusinessStep(epcisEvent);
            AddDisposition(epcisEvent);
            AddReadPoint(epcisEvent);
            AddBusinessLocation(epcisEvent);
            AddEventExtension(epcisEvent);
            AddSourceDestinations(epcisEvent, Extension);
            AddExtensionField();
            AddCustomFields(epcisEvent);

            return(Root);
        }
Exemplo n.º 6
0
        public XElement Process(EpcisEvent aggregationEvent)
        {
            _root = XmlEventFormatter.CreateEvent("AggregationEvent", aggregationEvent);

            AddParentId(aggregationEvent);
            AddChildEpcs(aggregationEvent);
            AddAction(aggregationEvent);
            AddBusinessStep(aggregationEvent);
            AddDisposition(aggregationEvent);
            AddReadPoint(aggregationEvent);
            AddBusinessLocation(aggregationEvent);
            AddBusinessTransactions(aggregationEvent);
            AddSourceDestinations(aggregationEvent);
            AddEventExtension(aggregationEvent);
            AddExtensionField();
            AddCustomFields(aggregationEvent);

            return(_root);
        }
Exemplo n.º 7
0
        public XElement Process(EpcisEvent objectEvent)
        {
            _root = XmlEventFormatter.CreateEvent("ObjectEvent", objectEvent);

            AddEpcList(objectEvent);
            AddAction(objectEvent);
            AddBusinessStep(objectEvent);
            AddDisposition(objectEvent);
            AddReadPoint(objectEvent);
            AddBusinessLocation(objectEvent);
            AddBusinessTransactions(objectEvent);
            AddEventExtension(objectEvent);
            AddSourceDestinations(objectEvent);
            AddIlmdFields(objectEvent);
            AddExtensionField();
            AddCustomFields(objectEvent);

            return(_root);
        }
Exemplo n.º 8
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);
            }
        }
Exemplo n.º 9
0
 private void AddBusinessLocation(EpcisEvent evt)
 {
     _root.AddIfNotNull(XmlEventFormatter.GenerateBusinessLocation(evt));
 }
Exemplo n.º 10
0
 private void AddReadPoint(EpcisEvent evt)
 {
     _root.AddIfNotNull(XmlEventFormatter.GenerateReadPoint(evt));
 }
Exemplo n.º 11
0
 public void AddDisposition(EpcisEvent evt)
 {
     _root.AddIfNotNull(XmlEventFormatter.GenerateDisposition(evt));
 }
Exemplo n.º 12
0
 private void AddCustomFields(EpcisEvent evt)
 {
     _root.AddIfAny(XmlEventFormatter.GenerateCustomFields(evt, FieldType.CustomField));
 }
Exemplo n.º 13
0
 public override void When()
 {
     Result = XmlEventFormatter.FormatList(new[] { Event }, new CancellationTokenSource().Token).FirstOrDefault();
 }
Exemplo n.º 14
0
 protected virtual void AddReadPoint(EpcisEvent evt)
 {
     Root.AddIfNotNull(XmlEventFormatter.GenerateReadPoint(evt));
 }
Exemplo n.º 15
0
 private void AddSourceDestinations(EpcisEvent evt)
 {
     _root.AddIfAny(XmlEventFormatter.GenerateSourceDest(evt));
 }
Exemplo n.º 16
0
        public void AddEventExtension(EpcisEvent evt)
        {
            var extension = new XElement("extension", XmlEventFormatter.GenerateCustomFields(evt, FieldType.EventExtension));

            _extension.AddIfNotNull(extension);
        }
Exemplo n.º 17
0
 protected override void AddEventExtension(EpcisEvent evt)
 {
     Extension.AddIfAny(XmlEventFormatter.GenerateCustomFields(evt, FieldType.EventExtension));
 }
Exemplo n.º 18
0
 public override void Act()
 {
     Result = new XmlEventFormatter().Format(ObjectEvent);
 }
Exemplo n.º 19
0
 protected virtual void AddSourceDestinations(EpcisEvent evt, XElement element)
 {
     element.AddIfAny(XmlEventFormatter.GenerateSourceDest(evt));
 }
Exemplo n.º 20
0
        protected virtual void AddIlmdFields(EpcisEvent evt, XElement element)
        {
            var ilmdElement = new XElement("ilmd", XmlEventFormatter.GenerateCustomFields(evt, FieldType.Ilmd));

            element.AddIfNotNull(ilmdElement);
        }
Exemplo n.º 21
0
 protected virtual void AddBusinessTransactions(EpcisEvent evt)
 {
     Root.AddIfNotNull(XmlEventFormatter.GenerateBusinessTransactions(evt));
 }
Exemplo n.º 22
0
 private void AddBusinessTransactions(EpcisEvent evt)
 {
     _root.AddIfNotNull(XmlEventFormatter.GenerateBusinessTransactions(evt));
 }
Exemplo n.º 23
0
 protected virtual void AddBusinessStep(EpcisEvent evt)
 {
     Root.AddIfNotNull(XmlEventFormatter.GenerateBusinesStep(evt));
 }
Exemplo n.º 24
0
 private void AddIlmdFields(EpcisEvent evt)
 {
     _extension.AddIfAny(XmlEventFormatter.GenerateCustomFields(evt, FieldType.Ilmd));
 }
Exemplo n.º 25
0
 public void AddEventExtension(EpcisEvent evt)
 {
     _extension.AddIfAny(XmlEventFormatter.GenerateCustomFields(evt, FieldType.EventExtension));
 }
Exemplo n.º 26
0
 protected virtual void AddCustomFields(EpcisEvent evt)
 {
     Root.AddIfAny(XmlEventFormatter.GenerateCustomFields(evt, FieldType.CustomField));
 }
Exemplo n.º 27
0
 protected virtual void AddDisposition(EpcisEvent evt)
 {
     Root.AddIfNotNull(XmlEventFormatter.GenerateDisposition(evt));
 }