Exemple #1
0
 /// <summary>
 /// Gets the <see cref="StoreType"/> with the specified supp name.
 /// </summary>
 /// <value>
 /// The <see cref="StoreType"/>.
 /// </value>
 /// <param name="suppName">Name of the supp.</param>
 /// <returns></returns>
 public StoreType this[string suppName]
 {
     get
     {
         int i = theModel.IndexOf(suppName);
         if (i < 0)
         {
             return(null);
         }
         StoreType result = new StoreType();
         result.Name       = theModel[i].sName;
         result.Stored     = theModel[i].Amount;
         result.IsRoughage = theModel[i].IsRoughage;
         result.DMContent  = theModel[i].DM_Propn;
         result.DMD        = theModel[i].DM_Digestibility;
         result.MEContent  = theModel[i].ME_2_DM;
         result.CPConc     = theModel[i].CrudeProt;
         result.ProtDg     = theModel[i].DgProt;
         result.PConc      = theModel[i].Phosphorus;
         result.SConc      = theModel[i].Sulphur;
         result.EEConc     = theModel[i].EtherExtract;
         result.ADIP2CP    = theModel[i].ADIP_2_CP;
         result.AshAlk     = theModel[i].AshAlkalinity;
         result.MaxPassage = theModel[i].MaxPassage;
         return(result);
     }
 }
Exemple #2
0
 /// <summary>
 /// Gets the <see cref="StoreType"/> with the specified supp name.
 /// </summary>
 /// <value>
 /// The <see cref="StoreType"/>.
 /// </value>
 /// <param name="suppName">Name of the supp.</param>
 /// <returns></returns>
 public StoreType this[string suppName]
 {
     get
     {
         int i = theModel.IndexOf(suppName);
         if (i < 0)
             return null;
         StoreType result = new StoreType();
         result.Name = theModel[i].sName;
         result.Stored = theModel[i].Amount;
         result.IsRoughage = theModel[i].IsRoughage;
         result.DMContent = theModel[i].DM_Propn;
         result.DMD = theModel[i].DM_Digestibility;
         result.MEContent = theModel[i].ME_2_DM;
         result.CPConc = theModel[i].CrudeProt;
         result.ProtDg = theModel[i].DgProt;
         result.PConc = theModel[i].Phosphorus;
         result.SConc = theModel[i].Sulphur;
         result.EEConc = theModel[i].EtherExtract;
         result.ADIP2CP = theModel[i].ADIP_2_CP;
         result.AshAlk = theModel[i].AshAlkalinity;
         result.MaxPassage = theModel[i].MaxPassage;
         return result;
     }
 }