Пример #1
0
 public virtual string[] GetSubKeyNames()
 {
     try
     {
         return(Exists() ? WrappedKey.GetSubKeyNames() : Array.Empty <string>());
     }
     catch (Exception ex) when(!ExceptionHandling.NotExpectedRegistryException(ex))
     {
         throw new RegistryException(ex.Message, Name, ex);
     }
 }
Пример #2
0
        /// <summary>
        /// Gets the names of all sub keys immediately below this registry key
        /// </summary>
        /// <returns></returns>
        public virtual string[] GetSubKeyNames()
        {
            try
            {
                return(Exists() ? WrappedKey.GetSubKeyNames() : new string[] { });
            }
            catch (Exception ex)
            {
                if (NotExpectedException(ex))
                {
                    throw;
                }

                throw new RegistryException(ex.Message, Name, ex);
            }
        }