AgGateway.ADAPT.ISOv4Plugin.Loaders.ProductMixLoader.GetProduct C# (CSharp) Method

GetProduct() private method

private GetProduct ( XmlNode inputNode ) : AgGateway.ADAPT.ApplicationDataModel.Products.ProductMix
inputNode System.Xml.XmlNode
return AgGateway.ADAPT.ApplicationDataModel.Products.ProductMix
        private ProductMix GetProduct(XmlNode inputNode)
        {
            var product = new ProductMix { ProductType = ProductTypeEnum.Mix, Form = ProductFormEnum.Unknown };

            var groupId = inputNode.GetXmlNodeValue("@C");
            if (string.IsNullOrEmpty(groupId))
                return product;

            var groupNode = _taskDocument.RootNode.SelectSingleNode(
                string.Format(CultureInfo.InvariantCulture, "PGP[@A='{0}']", groupId));
            if (groupNode == null)
                return product;

            var groupType = groupNode.GetXmlNodeValue("@C");
            if (string.IsNullOrEmpty(groupType))
                return product;

            if (string.Equals(groupType, "2", StringComparison.OrdinalIgnoreCase))
                product.ProductType = ProductTypeEnum.Variety;

            return product;
        }