PowerToys/Wox.Infrastructure/Helper.cs
2016-04-27 22:54:27 +01:00

23 lines
465 B
C#

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;
}
}
}
}