コード例 #1
0
 public IEnumerable <string> FromUnits()
 {
     AuditApi.Audit(new Library.Models.ActionAuditModel
     {
         Action    = "FromUnits",
         Component = "ConvertController",
         User      = RequestUser
     });
     return(WebApi.GetFromUnits());
 }
コード例 #2
0
 public double Convert(string fromUnit, string toUnit, double fromValue)
 {
     AuditApi.Audit(new Library.Models.ActionAuditModel
     {
         Action    = "Convert",
         Component = "ConvertController",
         User      = RequestUser,
         Value     = $"fromUnit: '{fromUnit}', toUnit: '{toUnit}', value: '{fromValue}'"
     });
     return(WebApi.GetConversion(fromUnit, toUnit, fromValue));
 }
コード例 #3
0
 public IEnumerable <string> ToUnits(string fromUnit)
 {
     AuditApi.Audit(new Library.Models.ActionAuditModel
     {
         Action    = "ToUnits",
         Component = "ConvertController",
         User      = RequestUser,
         Value     = "fromUnit " + fromUnit
     });
     return(WebApi.GetToUnits(fromUnit));
 }