mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-06 03:07:04 +02:00
rename
This commit is contained in:
22
Wox.Infrastructure/Helper.cs
Normal file
22
Wox.Infrastructure/Helper.cs
Normal 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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user