public bool Equals([AllowNull] AngularProject b) { if (b is null) { return(false); } // Optimization for a common success case. if (Object.ReferenceEquals(this, b)) { return(true); } // If run-time types are not exactly the same, return false. if (this.GetType() != b.GetType()) { return(false); } if (b.Name != Name) { return(false); } return(true); }
// <summary> /// Returns an exact copy of the current project /// </summary> /// <returns></returns> public AngularProject Copy() { AngularProject b = new AngularProject(); b.Name = Name; return(b); }
public bool Equals([AllowNull] SlugCIConfig b) { if (b is null) { return(false); } // Optimization for a common success case. if (Object.ReferenceEquals(this, b)) { return(true); } // If run-time types are not exactly the same, return false. if (this.GetType() != b.GetType()) { return(false); } if (b.CodeCoverageThreshold != CodeCoverageThreshold) { return(false); } if (b.DeployFolderUsesSemVer != DeployFolderUsesSemVer) { return(false); } if (b.DeployToAssemblyFolders != DeployToAssemblyFolders) { return(false); } if (b.DeployToVersionedFolder != DeployToVersionedFolder) { return(false); } if (b.DeployAlphaRoot != DeployAlphaRoot) { return(false); } if (b.DeployProdRoot != DeployProdRoot) { return(false); } if (b.DeployDevRoot != DeployDevRoot) { return(false); } if (b.UseCodeCoverage != UseCodeCoverage) { return(false); } if (b.Projects.Count != Projects.Count) { return(false); } if (b.GitRemote != GitRemote) { return(false); } if (b.ConfigStructureVersion != ConfigStructureVersion) { return(false); } // Loop thru projects looking for complete matches foreach (SlugCIProject project in Projects) { // Find project in other object SlugCIProject c = b.Projects.Find(p => p.Name == project.Name); if (c == null) { return(false); } if (c != project) { return(false); } } // Loop thru Angular Projects looking for complete matches foreach (AngularProject project in AngularProjects) { // Find project in other object AngularProject c = b.AngularProjects.Find(p => p.Name == project.Name); if (c == null) { return(false); } if (c != project) { return(false); } } return(true); }