Exemple #1
0
 /// <summary>
 /// Used to validate a <see cref="crop"/> to see if its a valid <see cref="Crop"/>
 /// </summary>
 /// <param name="crop"></param>
 /// <returns></returns>
 public static (bool, string) ValidateCrop(Crop crop)
 {
     if (crop.Equals(null))
     {
         return(false, "The crop cannot be null");
     }
     if (!Crop.IsDefined(typeof(Crop), crop))
     {
         return(false, "The crop cannot be undefined");
     }
     else
     {
         return(true, string.Empty);
     }
 }