public void SetSum([InjectGroup] Group group, string name, long?number) { if (!number.HasValue) { group.GetOrCreateValue <long>(name); return; } var value = group.GetOrCreateValue <long>(name); group.SetValue(name, value + number); }
public void SetMin([InjectGroup] Group group, string name, decimal?value) { if (!value.HasValue) { group.GetOrCreateValue <decimal>(name); return; } var storedValue = group.GetOrCreateValue <decimal>(name); if (storedValue > value) { group.SetValue(name, value); } }
public void SetSumOutcome([InjectGroup] Group group, string name, decimal?number) { if (!number.HasValue) { group.GetOrCreateValue <decimal>(name); return; } var value = group.GetOrCreateValue <decimal>(name); if (number < 0) { group.SetValue(name, value + number); } }
public void SetCount([InjectGroup] Group group, string name, DateTimeOffset?value) { var values = group.GetOrCreateValue <int>(name); group.SetValue(name, values + 1); }
public void SetStringAsNumericSum([InjectGroup] Group group, string name, string number) { var value = group.GetOrCreateValue <decimal>(name); group.SetValue(name, value + ToDecimal(number)); }