29 lines
612 B
C#
29 lines
612 B
C#
using System;
|
|
|
|
namespace Google.Protobuf
|
|
{
|
|
// Token: 0x02000017 RID: 23
|
|
public static class ProtoPreconditions
|
|
{
|
|
// Token: 0x0600014D RID: 333 RVA: 0x00007A0B File Offset: 0x00005C0B
|
|
public static T CheckNotNull<T>(T value, string name) where T : class
|
|
{
|
|
if (value == null)
|
|
{
|
|
throw new ArgumentNullException(name);
|
|
}
|
|
return value;
|
|
}
|
|
|
|
// Token: 0x0600014E RID: 334 RVA: 0x00007A1D File Offset: 0x00005C1D
|
|
internal static T CheckNotNullUnconstrained<T>(T value, string name)
|
|
{
|
|
if (value == null)
|
|
{
|
|
throw new ArgumentNullException(name);
|
|
}
|
|
return value;
|
|
}
|
|
}
|
|
}
|