forked from FarmMaps/FarmMapsApiClient
		
	can now specify geojson bounds for upload.
changed how to get agents for haulmkilling.
This commit is contained in:
		@@ -5,26 +5,11 @@ namespace FarmmapsHaulmkilling.Models
 | 
			
		||||
{
 | 
			
		||||
    public class HaulmkillingAgent
 | 
			
		||||
    {
 | 
			
		||||
        public string Name { get; set; }
 | 
			
		||||
        public List<string> SupportedOptions { get; set; }
 | 
			
		||||
        public Dictionary<string, List<HaulmkillingAgentValue>> Values { get; set; }
 | 
			
		||||
        public string Cl { get; set; }
 | 
			
		||||
        public string Code { get; set; }
 | 
			
		||||
        public string Label { get; set; }
 | 
			
		||||
        public string Options { get; set; }
 | 
			
		||||
 | 
			
		||||
        public HaulmkillingAgentValue? GetAgentValue(string inputName, string optionKey)
 | 
			
		||||
        {
 | 
			
		||||
            if (!Values.ContainsKey(inputName))
 | 
			
		||||
                return null;
 | 
			
		||||
 | 
			
		||||
            var agentDataValues = Values[inputName];
 | 
			
		||||
            return agentDataValues.FirstOrDefault(v => v.Option.Equals(optionKey));
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public struct HaulmkillingAgentValue
 | 
			
		||||
    {
 | 
			
		||||
        public string Option { get; set; }
 | 
			
		||||
        public float Min { get; set; }
 | 
			
		||||
        public float Max { get; set; }
 | 
			
		||||
        public float FMul { get; set; }
 | 
			
		||||
        public float FExp { get; set; }
 | 
			
		||||
        public List<string> ValidOptions => Options.Split(',').ToList();
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
		Reference in New Issue
	
	Block a user