/// <summary> /// 注册表路径信息类复制构造函数。 /// </summary> /// <param name="regPath"> /// 注册表路径信息类。 /// </param> public RegPath(RegPath regPath) { HKey = regPath.HKey; LpSubKey = regPath.LpSubKey; LpValueName = regPath.LpValueName; Is64BitRegistry = regPath.Is64BitRegistry; }
/// <summary> /// 判断对象是否相等。 /// </summary> /// <param name="regPath"> /// 待判断的对象。 /// </param> /// <returns> /// 对象是否与本对象相同。 /// true表示相同。 /// false表示不同。 /// </returns> protected bool Equals(RegPath regPath) { /*return HKey == regPath.HKey && * string.Equals(LpSubKey, regPath.LpSubKey) && * string.Equals(LpValueName, regPath.LpValueName) && * Is64BitRegistry == regPath.Is64BitRegistry;*/ return(BinaryUtil.ComputeSHA1(this) == BinaryUtil.ComputeSHA1(regPath)); }
/// <inheritdoc /> /// <summary> /// 注册表键信息类构造函数。 /// </summary> /// <param name="regPath"> /// 注册表键路径信息类。 /// </param> /// <param name="lpType"> /// 注册表键值类型。 /// </param> /// <param name="lpValue"> /// 注册表键值。 /// </param> public RegKey(RegPath regPath, REG_KEY_TYPE lpType = REG_KEY_TYPE.REG_UNKNOWN, object lpValue = null) : base(regPath) { LpType = lpType; LpValue = lpValue; }