public bool Equals(VisualBasicImportReference other) { if (other == null) { return(false); } if (object.ReferenceEquals(this, other)) { return(true); } if (this.EarlyBoundAssembly != other.EarlyBoundAssembly) { return(false); } if (string.Compare(this.Import, other.Import, StringComparison.OrdinalIgnoreCase) != 0) { return(false); } if ((this.AssemblyName == null) && (other.AssemblyName == null)) { return(true); } if ((this.AssemblyName == null) && (other.AssemblyName != null)) { return(false); } if ((this.AssemblyName != null) && (other.AssemblyName == null)) { return(false); } return(equalityComparer.Equals(this.AssemblyName, other.AssemblyName)); }
public bool Equals(VisualBasicImportReference other) { if (other == null) { return(false); } if (Object.ReferenceEquals(this, other)) { return(true); } if (this.EarlyBoundAssembly != other.EarlyBoundAssembly) { return(false); } // VB does case insensitive comparisons for imports if (string.Compare(this.Import, other.Import, StringComparison.OrdinalIgnoreCase) != 0) { return(false); } // now compare the assemblies if (this.AssemblyName == null && other.AssemblyName == null) { return(true); } else if (this.AssemblyName == null && other.AssemblyName != null) { return(false); } else if (this.AssemblyName != null && other.AssemblyName == null) { return(false); } return(equalityComparer.Equals(this.AssemblyName, other.AssemblyName)); }