using System.Security.Cryptography;
using System.Security.Cryptography.X509Certificates;
using Microsoft.Win32.SafeHandles;
+using System.Diagnostics.CodeAnalysis;
internal static partial class Interop
{
public bool Equals(X509VerifyStatusCode other) => Code == other.Code;
- public override bool Equals(object? obj) => obj is X509VerifyStatusCode other && Equals(other);
+ public override bool Equals([NotNullWhen(true)] object? obj) => obj is X509VerifyStatusCode other && Equals(other);
public override int GetHashCode() => Code.GetHashCode();
public int Id { get { throw null; } }
public string? Name { get { throw null; } }
public bool Equals(Microsoft.Extensions.Logging.EventId other) { throw null; }
- public override bool Equals(object? obj) { throw null; }
+ public override bool Equals([System.Diagnostics.CodeAnalysis.NotNullWhenAttribute(true)] object? obj) { throw null; }
public override int GetHashCode() { throw null; }
public static bool operator ==(Microsoft.Extensions.Logging.EventId left, Microsoft.Extensions.Logging.EventId right) { throw null; }
public static implicit operator Microsoft.Extensions.Logging.EventId (int i) { throw null; }
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
+using System.Diagnostics.CodeAnalysis;
+
namespace Microsoft.Extensions.Logging
{
/// <summary>
}
/// <inheritdoc />
- public override bool Equals(object? obj)
+ public override bool Equals([NotNullWhen(true)] object? obj)
{
if (obj is null)
{
_delegate.DynamicInvoke((object[]?)arg);
}
- public override bool Equals(object? other)
+ public override bool Equals([NotNullWhen(true)] object? other)
{
return other is SystemEventInvokeInfo otherInvoke && otherInvoke._delegate.Equals(_delegate);
}
using System.Collections;
using System.ComponentModel;
+using System.Diagnostics.CodeAnalysis;
namespace System.DirectoryServices.ActiveDirectory
{
return result;
}
- public override bool Equals(object? obj)
+ public override bool Equals([NotNullWhen(true)] object? obj)
{
if (obj is DistinguishedName other)
{
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Text.Encodings.Web;
+using System.Diagnostics.CodeAnalysis;
// Contains a polyfill implementation of System.Text.Rune that works on netstandard2.0.
// Implementation copied from:
return OperationStatus.NeedMoreData;
}
- public override bool Equals(object? obj) => (obj is Rune other) && Equals(other);
+ public override bool Equals([NotNullWhen(true)] object? obj) => (obj is Rune other) && Equals(other);
public bool Equals(Rune other) => this == other;
-// Licensed to the .NET Foundation under one or more agreements.
+// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
using System.Runtime.CompilerServices;
+using System.Diagnostics.CodeAnalysis;
namespace System.Text.Json.Serialization
{
{
private object _object;
public ReferenceEqualsWrapper(object obj) => _object = obj;
- public override bool Equals(object? obj) => obj is ReferenceEqualsWrapper otherObj && Equals(otherObj);
+ public override bool Equals([NotNullWhen(true)] object? obj) => obj is ReferenceEqualsWrapper otherObj && Equals(otherObj);
public bool Equals(ReferenceEqualsWrapper obj) => ReferenceEquals(_object, obj._object);
public override int GetHashCode() => RuntimeHelpers.GetHashCode(_object);
}