Exemple #1
0
		protected static string GetRegistryKeyDisplayString(RegistryHive hive, string key,
			string valueName = null, RegistryValueKind valueKind = RegistryValueKind.None)
		{
			var result = new StringBuilder();
			result.AppendFormat(@"{0}\{1}", hive.AsRegistryHiveString(), key);
			if (string.IsNullOrEmpty(valueName))
				return result.ToString();

			result.AppendFormat(@"\{0}", valueName);
			if (valueKind == RegistryValueKind.None)
				return result.ToString();

			result.AppendFormat(@":{0}", valueKind.AsRegistryValueTypeString());
			return result.ToString();
		}
        protected static string GetRegistryKeyDisplayString(RegistryHive hive, string key,
                                                            string valueName = null, RegistryValueKind valueKind = RegistryValueKind.None)
        {
            var result = new StringBuilder();

            result.AppendFormat(@"{0}\{1}", hive.AsRegistryHiveString(), key);
            if (string.IsNullOrEmpty(valueName))
            {
                return(result.ToString());
            }

            result.AppendFormat(@"\{0}", valueName);
            if (valueKind == RegistryValueKind.None)
            {
                return(result.ToString());
            }

            result.AppendFormat(@":{0}", valueKind.AsRegistryValueTypeString());
            return(result.ToString());
        }
		public void Then_RegistryHive_should_display_user_friendly_string(RegistryHive hive, string expectedString)
		{
			Assert.AreEqual(expectedString, hive.AsRegistryHiveString());
		}
 public void Then_RegistryHive_should_display_user_friendly_string(RegistryHive hive, string expectedString)
 {
     Assert.AreEqual(expectedString, hive.AsRegistryHiveString());
 }