Example #1
0
        public static void ParseReadPoint(this XElement element, EpcisEvent Event)
        {
            Event.ReadPoint = element.Element("id").Value;

            foreach (var innerElement in element.Elements().Where(x => x.Name.Namespace != XNamespace.None))
            {
                Event.CustomFields.Add(XmlEventsParser.ParseCustomField(innerElement, Event, FieldType.ReadPointExtension));
            }
        }
Example #2
0
        public static ErrorDeclaration ToErrorDeclaration(this XElement element, EpcisEvent Event)
        {
            foreach (var innerElement in element.Elements().Where(x => !new[] { "id", "corrective" }.Contains(x.Name.LocalName)))
            {
                Event.CustomFields.Add(XmlEventsParser.ParseCustomField(innerElement, Event, FieldType.ErrorDeclarationExtension));
            }

            var declarationTime = DateTime.Parse(element.Element("declarationTime").Value, CultureInfo.InvariantCulture);

            return(new ErrorDeclaration {
                DeclarationTime = declarationTime, Reason = element.Element("reason").Value
            });
        }