public void SetValue(string name, object value, RegistryValueKind valueKind)
        {
            value = System.Management.Automation.PSObject.Base(value);
            value = RegistryWrapperUtils.ConvertUIntToValueForRegistryIfNeeded(value, valueKind);

            _regKey.SetValue(name, value, valueKind);
        }
Exemple #2
0
 public void SetValue(string name, object value, RegistryValueKind valueKind)
 {
     using (this.provider.CurrentPSTransaction)
     {
         value = PSObject.Base(value);
         value = RegistryWrapperUtils.ConvertUIntToValueForRegistryIfNeeded(value, valueKind);
         this.txRegKey.SetValue(name, value, valueKind);
     }
 }
        public void SetValue(string name, object value, RegistryValueKind valueKind)
        {
            using (_provider.CurrentPSTransaction)
            {
                value = System.Management.Automation.PSObject.Base(value);
                value = RegistryWrapperUtils.ConvertUIntToValueForRegistryIfNeeded(value, valueKind);

                _txRegKey.SetValue(name, value, valueKind);
            }
        }
Exemple #4
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);
        }
Exemple #5
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);
     }
 }
        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);
            }
        }
Exemple #8
0
 public void SetValue(string name, object value, RegistryValueKind valueKind)
 {
     value = PSObject.Base(value);
     value = RegistryWrapperUtils.ConvertUIntToValueForRegistryIfNeeded(value, valueKind);
     this.regKey.SetValue(name, value, valueKind);
 }