Пример #1
0
 public override int GetHashCode()
 {
     return(DisplayName.GetHashCode()
            & DisplayVersion.GetHashCode()
            & UninstallString.to_string().GetHashCode()
            & KeyPath.GetHashCode());
 }
Пример #2
0
 /// <summary>
 ///   Is an application listed in ARP (Programs and Features)?
 /// </summary>
 /// <returns>true if the key should be listed as a program</returns>
 /// <remarks>
 ///   http://community.spiceworks.com/how_to/show/2238-how-add-remove-programs-works
 /// </remarks>
 public bool is_in_programs_and_features()
 {
     return(!string.IsNullOrWhiteSpace(DisplayName) &&
            !string.IsNullOrWhiteSpace(UninstallString.to_string()) &&
            InstallerType != InstallerType.HotfixOrSecurityUpdate &&
            InstallerType != InstallerType.ServicePack &&
            string.IsNullOrWhiteSpace(ParentKeyName) &&
            !NoRemove &&
            !SystemComponent
            );
 }
Пример #3
0
        bool IEquatable <RegistryApplicationKey> .Equals(RegistryApplicationKey other)
        {
            if (ReferenceEquals(other, null))
            {
                return(false);
            }

            return(DisplayName.to_string().is_equal_to(other.DisplayName) &&
                   DisplayVersion.is_equal_to(other.DisplayVersion) &&
                   UninstallString.to_string().is_equal_to(other.UninstallString.to_string()) &&
                   KeyPath.is_equal_to(other.KeyPath)
                   );
        }