示例#1
0
        public object GetValue(string name, object defaultValue, RegistryValueOptions options)
        {
            object obj2 = this.regKey.GetValue(name, defaultValue, options);

            try
            {
                obj2 = RegistryWrapperUtils.ConvertValueToUIntFromRegistryIfNeeded(name, obj2, this.GetValueKind(name));
            }
            catch (IOException)
            {
            }
            return(obj2);
        }
示例#2
0
 public object GetValue(string name)
 {
     using (this.provider.CurrentPSTransaction)
     {
         object obj2 = this.txRegKey.GetValue(name);
         try
         {
             obj2 = RegistryWrapperUtils.ConvertValueToUIntFromRegistryIfNeeded(name, obj2, this.GetValueKind(name));
         }
         catch (IOException)
         {
         }
         return(obj2);
     }
 }
示例#3
0
        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);
        }
示例#4
0
        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);
            }
        }