/// <summary> /// Gets the LastUpdateCheckDate value from the registry. /// </summary> /// <returns>The value.</returns> private static DateTime GetLastUpdateCheckDate() { var dateTime = new RegistryUtils().CUGetValue("LastUpdateCheckDate"); if (dateTime == null) { // Default to now. dateTime = DateTime.UtcNow; SetLastUpdateCheckDate((DateTime)dateTime); } return Convert.ToDateTime(dateTime, CultureInfo.InvariantCulture); }
/// <summary> /// Adds a subkey under the StyleCop HKCU key. /// </summary> /// <param name="name">The path to the subkey to add.</param> /// <returns>Returns the new key object.</returns> public RegistryKey CUAddKey(string name) { Param.RequireValidString(name, "name"); return(RegistryUtils.AddKey(this.curoot, name)); }
/// <summary> /// Deletes a key under the StyleCop HKCU key. /// </summary> /// <param name="name">The path to the key to delete.</param> public void CUDeleteKey(string name) { Param.RequireValidString(name, "name"); RegistryUtils.DeleteKey(this.curoot, name); }
/// <summary> /// Gets a value under the StyleCop HKCU key. /// </summary> /// <param name="name">The path to the value.</param> /// <returns>Returns the object retrieved.</returns> public object CUGetValue(string name) { Param.RequireValidString(name, "name"); return(RegistryUtils.GetValue(this.curoot, name)); }