in src/Microsoft.VisualStudio.Composition/ComposablePartDefinition.cs [202:226]
public bool Equals(ComposablePartDefinition? other)
{
if (other == null)
{
return false;
}
if (object.ReferenceEquals(this, other))
{
return true;
}
bool result = EqualityComparer<TypeRef>.Default.Equals(this.TypeRef, other.TypeRef)
&& ByValueEquality.Metadata.Equals(this.Metadata, other.Metadata)
&& this.SharingBoundary == other.SharingBoundary
&& this.IsSharingBoundaryInferred == other.IsSharingBoundaryInferred
&& this.CreationPolicy == other.CreationPolicy
&& this.OnImportsSatisfiedMethodRefs.SequenceEqual(other.OnImportsSatisfiedMethodRefs, EqualityComparer<MethodRef?>.Default)
&& ByValueEquality.EquivalentIgnoreOrder<ExportDefinition>().Equals(this.ExportedTypes, other.ExportedTypes)
&& ByValueEquality.Dictionary<MemberRef, IReadOnlyCollection<ExportDefinition>>(ByValueEquality.EquivalentIgnoreOrder<ExportDefinition>()).Equals(this.ExportingMembers, other.ExportingMembers)
&& EqualityComparer<MethodRef?>.Default.Equals(this.ImportingConstructorOrFactoryRef, other.ImportingConstructorOrFactoryRef)
&& this.ImportingMembers.SetEquals(other.ImportingMembers)
&& ((this.ImportingConstructorImports == null && other.ImportingConstructorImports == null) || (this.ImportingConstructorImports != null && other.ImportingConstructorImports != null && this.ImportingConstructorImports.SequenceEqual(other.ImportingConstructorImports)));
return result;
}