AgGateway.ADAPT.ISOv4Plugin.Loaders.FieldLoader.LoadCropZone C# (CSharp) Метод

LoadCropZone() приватный Метод

private LoadCropZone ( XmlNode inputNode, Field field, string fieldId ) : void
inputNode System.Xml.XmlNode
field AgGateway.ADAPT.ApplicationDataModel.Logistics.Field
fieldId string
Результат void
        private void LoadCropZone(XmlNode inputNode, Field field, string fieldId)
        {
            var cropId = inputNode.GetXmlNodeValue("@G");
            if (string.IsNullOrEmpty(cropId))
                return;

            Crop crop;
            if (!_taskDocument.Crops.TryGetValue(cropId, out crop))
                return;

            var cropZone = new CropZone();
            cropZone.CropId = crop.Id.ReferenceId;
            cropZone.FieldId = field.Id.ReferenceId;
            cropZone.Description = field.Description;
            cropZone.Area = field.Area.Copy();
            cropZone.GuidanceGroupIds = field.GuidanceGroupIds != null ? field.GuidanceGroupIds.ToList() : null;

            _taskDocument.CropZones[fieldId] = cropZone;
        }