This commit is contained in:
bao-qian
2016-04-27 22:54:27 +01:00
parent 5ab33e831d
commit b8d12bd0cd

View File

@@ -0,0 +1,22 @@
using System;
namespace Wox.Infrastructure
{
static class Helper
{
/// <summary>
/// http://www.yinwang.org/blog-cn/2015/11/21/programming-philosophy
/// </summary>
public static T RequireNonNull<T>(this T obj)
{
if (obj == null)
{
throw new NullReferenceException();
}
else
{
return obj;
}
}
}
}