NullReferenceException
This commit is contained in:
@ -24,15 +24,15 @@ public sealed class FaceEncoding : DisposableObject, ISerializable
|
||||
private FaceEncoding(SerializationInfo info, StreamingContext context)
|
||||
{
|
||||
if (info == null)
|
||||
throw new ArgumentNullException(nameof(info));
|
||||
throw new NullReferenceException(nameof(info));
|
||||
|
||||
double[]? array = info.GetValue(nameof(_Encoding), typeof(double[])) as double[];
|
||||
int? row = (int?)info.GetValue(nameof(_Encoding.Rows), typeof(int));
|
||||
int? column = (int?)info.GetValue(nameof(_Encoding.Columns), typeof(int));
|
||||
if (row is null)
|
||||
throw new ArgumentNullException(nameof(row));
|
||||
throw new NullReferenceException(nameof(row));
|
||||
if (column is null)
|
||||
throw new ArgumentNullException(nameof(column));
|
||||
throw new NullReferenceException(nameof(column));
|
||||
_Encoding = new Matrix<double>(array, row.Value, column.Value);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user