Browse Source

fix merge error

pull/12602/head
j0nimost 4 years ago
parent
commit
643d045cc4
  1. 28
      framework/src/Volo.Abp.Core/Volo/Abp/Check.cs

28
framework/src/Volo.Abp.Core/Volo/Abp/Check.cs

@ -163,18 +163,7 @@ public static class Check
return value;
}
public static T NotDefault<T>(
T value,
[InvokerParameterName][NotNull] string parameterName)
where T : struct
{
if(value.Equals(default(T)))
{
throw new ArgumentException($"{parameterName} has a default value or is empty!", parameterName);
}
return value;
}
public static Int16 Positive(
Int16 value,
@ -319,6 +308,10 @@ public static class Check
if (value < minimumValue || value > maximumValue)
{
throw new ArgumentException($"{parameterName} is out of range min: {minimumValue} - max: {maximumValue}");
}
return value;
}
public static double Range(
double value,
@ -349,4 +342,17 @@ public static class Check
return value;
}
public static T NotDefault<T>(
T value,
[InvokerParameterName][NotNull] string parameterName)
where T : struct
{
if(value.Equals(default(T)))
{
throw new ArgumentException($"{parameterName} has a default value or is empty!", parameterName);
}
return value;
}
}

Loading…
Cancel
Save