[NSSecureCoding] Enable nullability and a few other code improvements. (#13679)

This commit is contained in:
Rolf Bjarne Kvinge 2022-01-12 20:51:11 +01:00 коммит произвёл GitHub
Родитель 70851a0e9a
Коммит 677b45b91c
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
1 изменённых файлов: 6 добавлений и 4 удалений

Просмотреть файл

@ -3,6 +3,8 @@
using System;
using ObjCRuntime;
#nullable enable
namespace Foundation {
#if XAMCORE_4_0
@ -19,8 +21,8 @@ namespace Foundation {
public static bool SupportsSecureCoding (Type type)
{
if (type == null)
throw new ArgumentNullException ("type");
if (type is null)
ObjCRuntime.ThrowHelper.ThrowArgumentNullException (nameof (type));
#if MONOMAC
try {
@ -39,8 +41,8 @@ namespace Foundation {
public static bool SupportsSecureCoding (Class klass)
{
if (klass == null)
throw new ArgumentNullException ("klass");
if (klass is null)
ObjCRuntime.ThrowHelper.ThrowArgumentNullException (nameof (klass));
return SupportsSecureCoding (klass.Handle);
}