internal static bool IsSameUnitAs(this UnitInfo unit1, UnitInfo unit2) { if (unit1 == null) { throw new ArgumentNullException("unit1"); } if (unit2 == null) { return(false); } // if the Projects are known if (!unit1.ProjectIsUnknown() && !unit2.ProjectIsUnknown()) { // equals the Project and Download Time if (unit1.EqualsProject(unit2) && unit1.DownloadTime.Equals(unit2.DownloadTime)) { return(true); } } return(false); }