Mercurial > pub > ImplabNet
comparison Implab/Safe.cs @ 272:9d1cca834b05 v3
preview version of Unity xml configuration
| author | cin | 
|---|---|
| date | Thu, 26 Apr 2018 03:14:54 +0300 | 
| parents | 7d52dc684bbd | 
| children | 
   comparison
  equal
  deleted
  inserted
  replaced
| 271:d4d437ec4483 | 272:9d1cca834b05 | 
|---|---|
| 51 | 51 | 
| 52 [MethodImpl(MethodImplOptions.AggressiveInlining)] | 52 [MethodImpl(MethodImplOptions.AggressiveInlining)] | 
| 53 internal static void ArgumentGreaterEqThan(int value, int min, string paramName) { | 53 internal static void ArgumentGreaterEqThan(int value, int min, string paramName) { | 
| 54 if (value < min) | 54 if (value < min) | 
| 55 throw new ArgumentOutOfRangeException(paramName); | 55 throw new ArgumentOutOfRangeException(paramName); | 
| 56 } | |
| 57 | |
| 58 public static object CreateDefaultValue(Type type) { | |
| 59 if (type.IsValueType) | |
| 60 return Activator.CreateInstance(type); | |
| 61 | |
| 62 return null; | |
| 56 } | 63 } | 
| 57 | 64 | 
| 58 [MethodImpl(MethodImplOptions.AggressiveInlining)] | 65 [MethodImpl(MethodImplOptions.AggressiveInlining)] | 
| 59 public static void ArgumentInRange(bool condition, string paramName) { | 66 public static void ArgumentInRange(bool condition, string paramName) { | 
| 60 if (!condition) | 67 if (!condition) | 
