public static string Create(SmsModel inputMessage) { DosageCalulcator dosageCaclulator = null; double rawDosage, roundedDosage = 0; var variables = inputMessage.Parse(); dosageCaclulator = new DosageCalulcator(variables); rawDosage = dosageCaclulator.Calculate(); roundedDosage = rawDosage.Round((double)0.5); return MessageFormater(rawDosage, roundedDosage, inputMessage.Body, variables) + string.Format("\r\n: {0}",inputMessage.DateSent.ToString("G")); }
public static string Create(SmsModel inputMessage) { DosageCalulcator dosageCaclulator = null; double rawDosage, roundedDosage = 0; var variables = inputMessage.Parse(); dosageCaclulator = new DosageCalulcator(variables); rawDosage = dosageCaclulator.Calculate(); roundedDosage = rawDosage.Round((double)0.5); return(MessageFormater(rawDosage, roundedDosage, inputMessage.Body, variables) + string.Format("\r\n: {0}", inputMessage.DateSent.ToString("G"))); }