public object GetValue(string name, object defaultValue, RegistryValueOptions options)
        {
            object value = _regKey.GetValue(name, defaultValue, options);

            try
            {
                value = RegistryWrapperUtils.ConvertValueToUIntFromRegistryIfNeeded(name, value, GetValueKind(name));
            }
            catch (System.IO.IOException)
            {
                // This is expected if the value does not exist.
            }

            return(value);
        }
        public object GetValue(string name)
        {
            using (_provider.CurrentPSTransaction)
            {
                object value = _txRegKey.GetValue(name);

                try
                {
                    value = RegistryWrapperUtils.ConvertValueToUIntFromRegistryIfNeeded(name, value, GetValueKind(name));
                }
                catch (System.IO.IOException)
                {
                    // This is expected if the value does not exist.
                }

                return(value);
            }
        }