public override bool Equals(object obj) { SupportedFramework other = obj as SupportedFramework; if (other == null) { return(false); } return(this.Identifier == other.Identifier && this.Profile == other.Profile && object.Equals(this.MinimumVersion, other.MinimumVersion) && this.DisplayName == other.DisplayName && this.MinimumVersionDisplayName == other.MinimumVersionDisplayName); }
/// <summary> /// Gets whether this supported framework is a more general version of the specified framework. /// </summary> public bool IsMoreGeneralThan(SupportedFramework fx) { if (this.Identifier != fx.Identifier) return false; if (this.Profile.EndsWith("*", StringComparison.OrdinalIgnoreCase)) { string prefix = this.Profile.Substring(0, this.Profile.Length - 1); if (!fx.Profile.StartsWith(prefix, StringComparison.OrdinalIgnoreCase)) return false; } else { if (!this.Profile.Equals(fx.Profile, StringComparison.OrdinalIgnoreCase)) return false; } return this.MinimumVersion <= fx.MinimumVersion; }
/// <summary> /// Gets whether this supported framework is a more general version of the specified framework. /// </summary> public bool IsMoreGeneralThan(SupportedFramework fx) { if (this.Identifier != fx.Identifier) { return(false); } if (this.Profile.EndsWith("*", StringComparison.OrdinalIgnoreCase)) { string prefix = this.Profile.Substring(0, this.Profile.Length - 1); if (!fx.Profile.StartsWith(prefix, StringComparison.OrdinalIgnoreCase)) { return(false); } } else { if (!this.Profile.Equals(fx.Profile, StringComparison.OrdinalIgnoreCase)) { return(false); } } return(this.MinimumVersion <= fx.MinimumVersion); }
public SupportedFrameworkGroup(IEnumerable <SupportedFramework> availableVersions) { this.availableVersions = availableVersions.OrderBy(v => v.MinimumVersion).ToList(); this.isChecked = true; this.selectedVersion = this.availableVersions.First(); }
public SupportedFrameworkGroup(IEnumerable<SupportedFramework> availableVersions) { this.availableVersions = availableVersions.OrderBy(v => v.MinimumVersion).ToList(); this.isChecked = true; this.selectedVersion = this.availableVersions.First(); }