diff --git a/Wox.Infrastructure/StringMatcher.cs b/Wox.Infrastructure/StringMatcher.cs index 6261d9a067..1c8f6ab0b7 100644 --- a/Wox.Infrastructure/StringMatcher.cs +++ b/Wox.Infrastructure/StringMatcher.cs @@ -1,4 +1,7 @@ -namespace Wox.Infrastructure +using System; +using JetBrains.Annotations; + +namespace Wox.Infrastructure { public class StringMatcher { diff --git a/Wox.Infrastructure/SyntaxSuger.cs b/Wox.Infrastructure/SyntaxSuger.cs new file mode 100644 index 0000000000..40be92fe29 --- /dev/null +++ b/Wox.Infrastructure/SyntaxSuger.cs @@ -0,0 +1,19 @@ +using System; + +namespace Wox.Infrastructure +{ + static class SyntaxSuger + { + public static T RequireNonNull(T obj) + { + if (obj == null) + { + throw new NullReferenceException(); + } + else + { + return obj; + } + } + } +} diff --git a/Wox.Infrastructure/Wox.Infrastructure.csproj b/Wox.Infrastructure/Wox.Infrastructure.csproj index 0b1d86dae7..76c669bc22 100644 --- a/Wox.Infrastructure/Wox.Infrastructure.csproj +++ b/Wox.Infrastructure/Wox.Infrastructure.csproj @@ -68,6 +68,7 @@ +