@@ -401,34 +401,34 @@ public void Deconstruct(out IAdbClient client, out DeviceData device)
401401 device = Device ;
402402 }
403403
404+ #if ! NET40_OR_GREATER && ! NETCOREAPP2_0_OR_GREATER && ! NETSTANDARD2_0_OR_GREATER && ! UAP10_0_15138_0
405+ /// <inheritdoc/>
406+ public override int GetHashCode ( ) => HashCode . Combine ( EqualityContract , AdbClient , Device ) ;
407+
408+ /// <inheritdoc/>
409+ public virtual bool Equals ( DeviceClient ? other ) =>
410+ ( object ? ) this == other ||
411+ ( other != ( object ? ) null
412+ && EqualityComparer < Type > . Default . Equals ( EqualityContract , other . EqualityContract )
413+ && EqualityComparer < IAdbClient > . Default . Equals ( AdbClient , other . AdbClient )
414+ && EqualityComparer < DeviceData > . Default . Equals ( Device , other . Device ) ) ;
415+ #endif
416+
404417 /// <summary>
405418 /// Throws an <see cref="ArgumentNullException"/> if the <paramref name="device"/>
406419 /// parameter is <see langword="null"/>, and a <see cref="ArgumentOutOfRangeException"/>
407420 /// if <paramref name="device"/> does not have a valid serial number.
408421 /// </summary>
409422 /// <param name="device">A <see cref="DeviceData"/> object to validate.</param>
410423 /// <returns>The <paramref name="device"/> parameter, if it is valid.</returns>
411- protected static DeviceData EnsureDevice ( [ NotNull ] DeviceData ? device )
424+ private static DeviceData EnsureDevice ( [ NotNull ] DeviceData ? device )
412425 {
413426 ExceptionExtensions . ThrowIfNull ( device ) ;
414427 return device . IsEmpty
415428 ? throw new ArgumentOutOfRangeException ( nameof ( device ) , "You must specific a serial number for the device" )
416429 : device ;
417430 }
418431
419- #if ! NET40_OR_GREATER && ! NETCOREAPP2_0_OR_GREATER && ! NETSTANDARD2_0_OR_GREATER && ! UAP10_0_15138_0
420- /// <inheritdoc/>
421- public override int GetHashCode ( ) => HashCode . Combine ( EqualityContract , AdbClient , Device ) ;
422-
423- /// <inheritdoc/>
424- public virtual bool Equals ( DeviceClient ? other ) =>
425- ( object ? ) this == other ||
426- ( other != ( object ? ) null
427- && EqualityComparer < Type > . Default . Equals ( EqualityContract , other . EqualityContract )
428- && EqualityComparer < IAdbClient > . Default . Equals ( AdbClient , other . AdbClient )
429- && EqualityComparer < DeviceData > . Default . Equals ( Device , other . Device ) ) ;
430- #endif
431-
432432#if NET7_0_OR_GREATER
433433 [ GeneratedRegex ( "<\\ ?xml(.?)*" ) ]
434434 private static partial Regex GetXmlRegex ( ) ;
0 commit comments