Use new ArgumentNullException and ObjectDisposedException throw-helper API (#4163)

This commit is contained in:
Berkan Diler
2022-12-27 20:27:11 +01:00
committed by GitHub
parent 470be03c2f
commit 0d3b82477e
15 changed files with 58 additions and 196 deletions

View File

@ -25,10 +25,7 @@ namespace ARMeilleure.Translation
public static Delegate GetDelegate(MethodInfo info)
{
if (info == null)
{
throw new ArgumentNullException(nameof(info));
}
ArgumentNullException.ThrowIfNull(info);
Type[] parameters = info.GetParameters().Select(pI => pI.ParameterType).ToArray();
Type returnType = info.ReturnType;