/// <summary> /// Checks if the passed un-resolved configuration is the same as this definition's configuration elements. If the global properties are not present on either /// then just compare the file name and the tools version /// </summary> public bool AreSameDefinitions(BuildRequestConfiguration config) { if (_globalProperties.Count == 0 && ((PropertyDictionary <ProjectPropertyInstance>)(config.Properties)).Count == 0) { if ( String.Compare(_fileName, config.ProjectFullPath, StringComparison.OrdinalIgnoreCase) == 0 && String.Compare(_toolsVersion, config.ToolsVersion, StringComparison.OrdinalIgnoreCase) == 0 ) { return(true); } } else { if ( String.Compare(_fileName, config.ProjectFullPath, StringComparison.OrdinalIgnoreCase) == 0 && String.Compare(_toolsVersion, config.ToolsVersion, StringComparison.OrdinalIgnoreCase) == 0 && _globalProperties.Equals((PropertyDictionary <ProjectPropertyInstance>)(config.Properties)) ) { return(true); } } return(false); }
/// <summary> /// Compares this object with another for equality /// </summary> /// <param name="other">The object with which to compare this one.</param> /// <returns>True if the objects contain the same data, false otherwise.</returns> private bool InternalEquals(BuildRequestConfiguration other) { if (Object.ReferenceEquals(this, other)) { return(true); } if ((other.WasGeneratedByNode == WasGeneratedByNode) && (other._configId != 0) && (_configId != 0)) { return(_configId == other._configId); } else { return(_projectFullPath.Equals(other._projectFullPath, StringComparison.OrdinalIgnoreCase) && _toolsVersion.Equals(other._toolsVersion, StringComparison.OrdinalIgnoreCase) && _globalProperties.Equals(other._globalProperties)); } }