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