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)
2212
if ((constructor.IsStatic && containingSlot == 0 && constructor.ContainingType.
Equals
(symbol.ContainingType))
6383
var 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));
6431
if (constructedMethod.
Equals
(method))
6455
if (overriddenMethod.
Equals
(implementationMethod))
6477
while (!baseType.
Equals
(implementationMethod.ContainingType) && method is object)
6479
if (baseType.
Equals
(method.ContainingType))
6493
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)
1230
if (!Type.
Equals
(this.DeclaringCompilation.GetWellKnownType(WellKnownType.System_Threading_CancellationToken)))
1236
method.ReturnType.OriginalDefinition.
Equals
(this.DeclaringCompilation.GetWellKnownType(WellKnownType.System_Collections_Generic_IAsyncEnumerable_T)))
Symbols\Source\SourceMethodSymbolWithAttributes.cs (1)
1584
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);