ab56a9bcf7
SVN-Revision: r240
27 lines
597 B
C#
27 lines
597 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace Lskj.Push.Util
|
|
{
|
|
class Preconditions
|
|
{
|
|
public static void checkArgument(bool expression)
|
|
{
|
|
if (!expression)
|
|
{
|
|
throw new ArgumentNullException();
|
|
}
|
|
}
|
|
public static void checkArgument(bool expression, object errorMessage)
|
|
{
|
|
if (!expression)
|
|
{
|
|
throw new ArgumentException(errorMessage.ToString());
|
|
}
|
|
}
|
|
}
|
|
}
|