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); } }
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); } }
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); }
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)); }
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); }
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); }
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); }
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); } }
private void AddBusinessLocation(EpcisEvent evt) { _root.AddIfNotNull(XmlEventFormatter.GenerateBusinessLocation(evt)); }
private void AddReadPoint(EpcisEvent evt) { _root.AddIfNotNull(XmlEventFormatter.GenerateReadPoint(evt)); }
public void AddDisposition(EpcisEvent evt) { _root.AddIfNotNull(XmlEventFormatter.GenerateDisposition(evt)); }
private void AddCustomFields(EpcisEvent evt) { _root.AddIfAny(XmlEventFormatter.GenerateCustomFields(evt, FieldType.CustomField)); }
public override void When() { Result = XmlEventFormatter.FormatList(new[] { Event }, new CancellationTokenSource().Token).FirstOrDefault(); }
protected virtual void AddReadPoint(EpcisEvent evt) { Root.AddIfNotNull(XmlEventFormatter.GenerateReadPoint(evt)); }
private void AddSourceDestinations(EpcisEvent evt) { _root.AddIfAny(XmlEventFormatter.GenerateSourceDest(evt)); }
public void AddEventExtension(EpcisEvent evt) { var extension = new XElement("extension", XmlEventFormatter.GenerateCustomFields(evt, FieldType.EventExtension)); _extension.AddIfNotNull(extension); }
protected override void AddEventExtension(EpcisEvent evt) { Extension.AddIfAny(XmlEventFormatter.GenerateCustomFields(evt, FieldType.EventExtension)); }
public override void Act() { Result = new XmlEventFormatter().Format(ObjectEvent); }
protected virtual void AddSourceDestinations(EpcisEvent evt, XElement element) { element.AddIfAny(XmlEventFormatter.GenerateSourceDest(evt)); }
protected virtual void AddIlmdFields(EpcisEvent evt, XElement element) { var ilmdElement = new XElement("ilmd", XmlEventFormatter.GenerateCustomFields(evt, FieldType.Ilmd)); element.AddIfNotNull(ilmdElement); }
protected virtual void AddBusinessTransactions(EpcisEvent evt) { Root.AddIfNotNull(XmlEventFormatter.GenerateBusinessTransactions(evt)); }
private void AddBusinessTransactions(EpcisEvent evt) { _root.AddIfNotNull(XmlEventFormatter.GenerateBusinessTransactions(evt)); }
protected virtual void AddBusinessStep(EpcisEvent evt) { Root.AddIfNotNull(XmlEventFormatter.GenerateBusinesStep(evt)); }
private void AddIlmdFields(EpcisEvent evt) { _extension.AddIfAny(XmlEventFormatter.GenerateCustomFields(evt, FieldType.Ilmd)); }
public void AddEventExtension(EpcisEvent evt) { _extension.AddIfAny(XmlEventFormatter.GenerateCustomFields(evt, FieldType.EventExtension)); }
protected virtual void AddCustomFields(EpcisEvent evt) { Root.AddIfAny(XmlEventFormatter.GenerateCustomFields(evt, FieldType.CustomField)); }
protected virtual void AddDisposition(EpcisEvent evt) { Root.AddIfNotNull(XmlEventFormatter.GenerateDisposition(evt)); }