50 references to Equals
Microsoft.CodeAnalysis.CSharp (50)
Binder\Binder_Expressions.cs (1)
1941Debug.Assert(!symbol.ContainingSymbol.Equals(containingMethod));
Binder\DecisionDagBuilder.cs (1)
679if (bin.InputType.Equals(bin.NarrowedType))
Binder\ForEachLoopBinder.cs (3)
1120Debug.Assert(enumeratorType.OriginalDefinition.Equals(Compilation.GetWellKnownType(WellKnownType.System_Collections_Generic_IAsyncEnumerator_T))); 1735return type.OriginalDefinition.Equals(Compilation.GetWellKnownType(WellKnownType.System_Collections_Generic_IAsyncEnumerable_T)); 1842return type.Equals(compilation.GetWellKnownType(WellKnownType.System_Collections_Generic_IAsyncEnumerable_T));
Binder\Imports.cs (1)
217return x.NamespaceOrType.Equals(y.NamespaceOrType);
Binder\Semantics\Operators\BinaryOperatorOverloadResolution.cs (4)
108if (!isShift && (object)rightOperatorSourceOpt != null && !rightSourceIsInterface && !rightOperatorSourceOpt.Equals(leftOperatorSourceOpt)) 158if (!isShift && (object)secondOperatorSourceOpt != null && !secondOperatorSourceOpt.Equals(firstOperatorSourceOpt)) 443if (!(useIdentityConversion ? Conversions.HasIdentityConversion(leftType, rightType) : leftType.Equals(rightType))) 667if ((object)rightType != null && ((object)leftType == null || !(useIdentityConversion ? Conversions.HasIdentityConversion(rightType, leftType) : rightType.Equals(leftType))))
BoundTree\BoundNullCoalescingAssignmentOperator.cs (1)
22return nullableUnderlying.Equals(RightOperand.Type);
Compiler\MethodCompiler.cs (1)
1559bool isAsyncMainMoveNext = entryPointOpt?.UserMain.Equals(kickoffMethod) == true;
FlowAnalysis\NullableWalker.cs (9)
2212if ((constructor.IsStatic && containingSlot == 0 && constructor.ContainingType.Equals(symbol.ContainingType)) 6383var isStaticEqualsMethod = method.Equals(compilation.GetSpecialTypeMember(SpecialMember.System_Object__EqualsObjectObject)) 6384|| method.Equals(compilation.GetSpecialTypeMember(SpecialMember.System_Object__ReferenceEquals)); 6394.Equals(compilation.GetSpecialTypeMember(SpecialMember.System_Object__Equals)); 6431if (constructedMethod.Equals(method)) 6455if (overriddenMethod.Equals(implementationMethod)) 6477while (!baseType.Equals(implementationMethod.ContainingType) && method is object) 6479if (baseType.Equals(method.ContainingType)) 6493if (method is object && baseType.Equals(method.ContainingType))
Lowering\AsyncRewriter\AsyncIteratorMethodToStateMachineRewriter.cs (1)
254Debug.Assert(_exprReturnLabel.Equals(_currentDisposalLabel));
Lowering\Instrumentation\CodeCoverageInstrumenter.cs (2)
83if (method.Equals(createPayloadForMethodsSpanningSingleFile) || method.Equals(createPayloadForMethodsSpanningMultipleFiles))
Lowering\Instrumentation\LocalStateTracingInstrumenter.cs (1)
190if (type.Equals(otherType))
Lowering\LocalRewriter\LocalRewriter.PatternLocalRewriter.cs (1)
553!loweredInput.Type.OriginalDefinition.Equals(_factory.Compilation.GetWellKnownType(WellKnownType.System_ValueTuple_TRest)) &&
Lowering\LocalRewriter\LocalRewriter_AsOperator.cs (1)
42Debug.Assert(rewrittenTargetType.Type.Equals(rewrittenType));
Lowering\LocalRewriter\LocalRewriter_CollectionExpression.cs (2)
128return addMethod.Equals(collectionInitializer.AddMethod.OriginalDefinition); 970if (spreadOperandAsSpan.Type!.OriginalDefinition.Equals(this._compilation.GetWellKnownType(wellKnownSpanType))
Lowering\LocalRewriter\LocalRewriter_CompoundAssignmentOperator.cs (2)
622Debug.Assert(implicitIndexerAccess.Argument.Type!.Equals(_compilation.GetWellKnownType(WellKnownType.System_Index)) 623|| implicitIndexerAccess.Argument.Type!.Equals(_compilation.GetWellKnownType(WellKnownType.System_Range)));
Symbols\AnonymousTypes\AnonymousTypeManager.Templates.cs (2)
390if (xOwner.Equals(yOwner)) 410if (other.Equals(container))
Symbols\Attributes\AttributeData.cs (1)
370if (firstArgType is object && firstArgType.Equals(compilation.GetWellKnownType(WellKnownType.System_Security_Permissions_SecurityAction)))
Symbols\CustomModifier.cs (2)
101return other != null && other.modifier.Equals(this.modifier); 133return other != null && other.modifier.Equals(this.modifier);
Symbols\ExtendedErrorTypeSymbol.cs (1)
301(object?)this.ContainingSymbol == null ? (object?)other.ContainingSymbol == null : this.ContainingSymbol.Equals(other.ContainingSymbol)) &&
Symbols\MissingMetadataTypeSymbol.cs (1)
397_containingModule.Equals(other._containingModule);
Symbols\NativeIntegerTypeSymbol.cs (1)
82Debug.Assert(_underlyingType.Equals(underlyingMember.ContainingSymbol));
Symbols\Retargeting\RetargetingSymbolTranslator.cs (3)
403Debug.Assert(!type.ContainingModule.Equals(addedModule) && 531bool anythingRetargeted = !originalDefinition.Equals(newDefinition); 723if (!newModifierSymbol.Equals(oldModifierSymbol))
Symbols\Source\SourceComplexParameterSymbol.cs (2)
1230if (!Type.Equals(this.DeclaringCompilation.GetWellKnownType(WellKnownType.System_Threading_CancellationToken))) 1236method.ReturnType.OriginalDefinition.Equals(this.DeclaringCompilation.GetWellKnownType(WellKnownType.System_Collections_Generic_IAsyncEnumerable_T)))
Symbols\Source\SourceMethodSymbolWithAttributes.cs (1)
1584if (ReturnType.OriginalDefinition.Equals(iAsyncEnumerableType) &&
Symbols\Source\SourceNamedTypeSymbol_Bases.cs (1)
228if (baseSym.Equals(curBaseSym))
Symbols\Symbol.cs (2)
778return (object)left == (object)right || right.Equals(left); 803return (object)left != (object)right && !right.Equals(left);
Symbols\Synthesized\ReadOnlyListType\SynthesizedReadOnlyListTypeSymbol.cs (1)
740Debug.Assert(parameterReference.Type.Equals(fieldType) ||
Symbols\SynthesizedNamespaceSymbol.cs (1)
46return other is object && _name.Equals(other._name) && _containingSymbol.Equals(other._containingSymbol);