moved to logic from api to lib
All checks were successful
FarmMaps.Develop/CarbonLib/pipeline/head This commit looks good
All checks were successful
FarmMaps.Develop/CarbonLib/pipeline/head This commit looks good
This commit is contained in:
39
Models/SoilPropertyType.cs
Normal file
39
Models/SoilPropertyType.cs
Normal file
@@ -0,0 +1,39 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace FarmMapsAPI.Carbon.Models
|
||||
{
|
||||
public class SoilPropertyType
|
||||
{
|
||||
public double OM_Cont { get; set; }
|
||||
public double OM_Corr { get; set; }
|
||||
public double Bulk_Density { get; set; }
|
||||
public double Clay_Content { get; set; }
|
||||
public double Depth { get; set; }
|
||||
}
|
||||
|
||||
struct SoilTypePropertyKey
|
||||
{
|
||||
public string SoilType { get; set; }
|
||||
public string SoilProperty{ get; set; }
|
||||
|
||||
public override int GetHashCode()
|
||||
{
|
||||
return SoilType.GetHashCode() ^ SoilProperty.GetHashCode();
|
||||
}
|
||||
|
||||
public override bool Equals(object obj)
|
||||
{
|
||||
if (obj is SoilTypePropertyKey)
|
||||
{
|
||||
SoilTypePropertyKey compositeKey = (SoilTypePropertyKey)obj;
|
||||
|
||||
return ((this.SoilType == compositeKey.SoilType) &&
|
||||
(this.SoilProperty == compositeKey.SoilProperty));
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user